hubotio / hubot-redis-brain

A hubot script to persist hubot's brain using redis
69 stars 55 forks source link

Load time error #35

Closed petrovicboban closed 6 years ago

petrovicboban commented 6 years ago

Looks like there is some kind of error here:

[Fri Dec 15 2017 11:06:12 GMT+0000 (UTC)] INFO hubot-redis-brain: Discovered redis from REDIS_URL environment variable
[Fri Dec 15 2017 11:06:12 GMT+0000 (UTC)] ERROR Unable to load /opt/hubot/node_modules/hubot-redis-brain/src/redis-brain: TypeError: ref.toString is not a function
    at module.exports (/opt/hubot/node_modules/hubot-redis-brain/src/redis-brain.coffee:44:26)
    at Robot.loadFile (/opt/hubot/node_modules/hubot/src/robot.coffee:358:11)
    at /opt/hubot/node_modules/hubot-redis-brain/index.coffee:12:17
    at FSReqWrap.cb [as oncomplete] (fs.js:258:19)

Is there a way to solve it?
hubot-brain is installed as in instructions: npm install hubot-redis-brain --save

mose commented 6 years ago

Did you set REDIS_URL environment variable to some exotic string? Maybe it has some formatting issue. It should be formatted like redis://localhost:6379

petrovicboban commented 6 years ago

It seems that REDIS_URL string is not parsed correctly if password contains special characters. I had to embed credentials directly into code, and it works now.

mose commented 6 years ago

It appears it's a node problem that was fixed in more recent version of node. cf https://github.com/nodejs/node/issues/1802