Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell adapter throwing errors when trying to save history #826

Closed
technicalpickles opened this issue Dec 5, 2014 · 2 comments · Fixed by #877
Closed

shell adapter throwing errors when trying to save history #826

technicalpickles opened this issue Dec 5, 2014 · 2 comments · Fixed by #877
Labels

Comments

@technicalpickles
Copy link
Member

I tried out the new shell adapter in #800 in a non-test hubot, and seeing problems:

Hubot> hubot hel[Fri Dec 05 2014 18:19:08 GMT-0500 (EST)] ERROR Error: EBADF, bad file descriptor
  at Object.fs.writeSync (fs.js:429:18)
  at Interface.rl._addHistory (/Users/technicalpickles/github/hubot-classic/node_modules/hubot/node_modules/readline-history/readline-history.js:106:20)
  at Interface._line (readline.js:516:19)
  at Interface._ttyWrite (readline.js:736:14)
  at ReadStream.onkeypress (readline.js:97:10)
  at ReadStream.EventEmitter.emit (events.js:126:20)
  at emitKey (readline.js:1058:12)
  at ReadStream.onData (readline.js:807:7)
  at ReadStream.EventEmitter.emit (events.js:96:17)
  at TTY.onread (net.js:397:14)


And on a different run:

ERROR Error: UNKNOWN, unknown error
  at Object.fs.writeSync (fs.js:429:18)
  at Interface.rl._addHistory (/Users/technicalpickles/github/hubot-classic/node_modules/hubot/node_modules/readline-history/readline-history.js:106:20)
  at Interface._line (readline.js:516:19)
  at Interface._ttyWrite (readline.js:736:14)
  at ReadStream.onkeypress (readline.js:97:10)
  at ReadStream.EventEmitter.emit (events.js:126:20)
  at emitKey (readline.js:1058:12)
  at ReadStream.onData (readline.js:807:7)
  at ReadStream.EventEmitter.emit (events.js:96:17)
  at TTY.onread (net.js:397:14)

The .hubot_history file does exist, but it's empty.

@technicalpickles
Copy link
Member Author

Did some more testing, and this seems to be caused by node-0.8. I tested the same bot with node-0.10, and it's working as expected.

@schematical
Copy link

If you used sudo to run hubot the first time it creates a .hubot_history as root then if you try to run hubot not as root you get an error like that. Try chowning the .hubot_history file. It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants