Flipez / hubot-rss-rolf

RSS Reader on Hubot
https://www.npmjs.org/package/hubot-rss-rolf
9 stars 4 forks source link

[error] room is not defined #15

Open realrill opened 5 years ago

realrill commented 5 years ago

@Flipez I am able to regenerate the issue #10 with 2.0.0-beta1

Could you please take a look on that?

droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO Filters passed, will receive message
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO hubot-rss-reader: add http://feeds.skynews.com/feeds/rss/world.xml
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO hubot-rss-reader: checker start
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO [sendMessage] Calling (async): [{"msg":"registered http://feeds.skynews.com/feeds/rss/world.xml","bot":{"i":"js.SDK"},"rid":"qswndTHNDruLKmaiz"}]
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO [received] Message in room qswndTHNDruLKmaiz
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO [received] Message in room qswndTHNDruLKmaiz
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO [received] Message in room qswndTHNDruLKmaiz
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:58 GMT+0000 (Coordinated Universal Time)] INFO hubot-rss-reader: wait 600 seconds
droid_1_165c287c5d29 | [Sat Jan 26 2019 21:34:59 GMT+0000 (Coordinated Universal Time)] ERROR ReferenceError: room is not defined
droid_1_165c287c5d29 |   at Timeout._onTimeout (/home/hubot/node_modules/hubot-rss-rolf/scripts/hubot-rss-reader.js:79:61)
droid_1_165c287c5d29 |   at ontimeout (timers.js:436:11)
droid_1_165c287c5d29 |   at tryOnTimeout (timers.js:300:5)
droid_1_165c287c5d29 |   at listOnTimeout (timers.js:263:5)
droid_1_165c287c5d29 |   at Timer.processTimers (timers.js:223:10)
droid_1_165c287c5d29 | 

Originally posted by @realrill in https://github.com/Flipez/hubot-rss-rolf/issues/10#issuecomment-457868085

realrill commented 5 years ago

Quick update.

I have figured out by myslef what caused the issue. I have installed rocketchat adaptor with the yo app. It uses the (old) stable release of hubot-rocketchat that has many bugs (memory leak, wrong references)

With the latest hubot-rocketchat master works as a charm.

IMHO would worth mention somehow that use the latest master hubot-rocketchat adaptor from github rather than install it from node package manager.

Flipez commented 5 years ago

Hi @realrill, thanks for the update!

Do you know where the wrong dependency came from? Is the latest package on npm really outdated or did some tool just pin the wrong version?

Anyway, could you quickly paste which version you are currently using and which you were using?

realrill commented 5 years ago

Hi @Flipez, I do not remember what was the version before but I used in my Dockerfile the next command:

yo hubot --owner="$BOT_OWNER" --name="$BOT_NAME" --description="$BOT_DESC" --adapter=rocketchat

Dockerfile contains currently:

COPY hubot-rocketchat ./hubot-rocketchat
...
RUN yo hubot --owner="$BOT_OWNER" --name="$BOT_NAME" --description="$BOT_DESC" --defaults && \
npm install ./hubot-rocketchat --save
...

The hubot-rocketchat folder is the latest code that cloned from hubot-rocketchat master branch. Install log shows hubot-rocketchat@2.0.0-development

I put them together into one image and pushed to GitHub: https://github.com/realrill/hubot-rocketchat-and-rss

I hope it helps. If something not clear let me know.

realrill commented 5 years ago

Reopen, mistakely clicked on close rather than comment...

I made a quick research and the last relese of hubot-rocketchat adaptor is almost 1.5 year old while the last master commit is 8 months old.

It means to me something not really up to date within the released hubot-rocketchat adaptor.