Closed Jutosa closed 8 years ago
Give a try for 3.0.1
version. Refactored a bit how references are managed.
Thank you for the quick response. I updated and how I get this error:
8/6 21:05 [867] - error: TypeError: Cannot read property 'cid' of undefined
at List.findChannelIndexById (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:90:33)
at List.setChannel (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:151:26)
at List.<anonymous> (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:171:22)
at Array.forEach (native)
at List.update (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:167:23)
at /usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/streammanager.js:93:30
at /usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:47:13
at /usr/src/app/node_modules/async/lib/async.js:52:16
at /usr/src/app/node_modules/async/lib/async.js:1209:30
at Request._callback (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:40:21)
at Request.self.callback (/usr/src/app/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/usr/src/app/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/usr/src/app/node_modules/request/request.js:988:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:913:12)
at /usr/src/app/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31
at nextTickCallbackWith2Args (node.js:442:9)
TypeError: Cannot read property 'cid' of undefined
at List.findChannelIndexById (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:90:33)
at List.setChannel (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:151:26)
at List.<anonymous> (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:171:22)
at Array.forEach (native)
at List.update (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:167:23)
at /usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/streammanager.js:93:30
at /usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:47:13
at /usr/src/app/node_modules/async/lib/async.js:52:16
at /usr/src/app/node_modules/async/lib/async.js:1209:30
at Request._callback (/usr/src/app/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:40:21)
at Request.self.callback (/usr/src/app/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/usr/src/app/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/usr/src/app/node_modules/request/request.js:988:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:913:12)
at /usr/src/app/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31
at nextTickCallbackWith2Args (node.js:442:9)
It causes nodebb to restart after a couple of seconds so it's hard for me to look for the cause. Do you have any ideas?
Yes, I have an overall idea, that something sets channel to the empty value. That is why in both cases, values aren't accessible.
Give a try 3.0.2
This is on 3.0.2
at List.<anonymous> (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:170:48)
at Array.forEach (native)
at List.update (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:169:23)
at /var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/streammanager.js:93:30
at /var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:47:13
at /var/nodebb/node_modules/async/lib/async.js:52:16
at /var/nodebb/node_modules/async/lib/async.js:1209:30
at Request._callback (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:40:21)
at Request.self.callback (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/request/request.js:988:12)
at emitNone (events.js:72:20)
TypeError: Cannot read property 'name' of undefined
at List.<anonymous> (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:170:48)
at Array.forEach (native)
at List.update (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/model/streamlist.js:169:23)
at /var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/streammanager.js:93:30
at /var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:47:13
at /var/nodebb/node_modules/async/lib/async.js:52:16
at /var/nodebb/node_modules/async/lib/async.js:1209:30
at Request._callback (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:40:21)
at Request.self.callback (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/var/nodebb/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/request/request.js:988:12)
at emitNone (events.js:72:20)
@Niller2005 do you have this error in your logs, just after plugin installation?
@NicolasSiver, yes
i did a logger.log('error', this.channels);
above the line that fails and it outputs this:
error: [plugins/twitch-monitor] 0=undefined, 1=undefined, 2=undefined, 3=undefined, 4=undefined, 5=undefined, 6=undefined, 7=undefined, 8=undefined, 9=undefined, 10=undefined, 11=undefined, 12=undefined, 13=undefined, 14=undefined, 15=undefined, 16=undefined
Interesting. @Niller2005 how many channels do you have? 17?
Published 3.0.3
, with several checks on undefined
.
It should give more insight: either It's a Database or Twitch API.
getting error: [plugins/twitch-monitor] Stream initialization warning, detected "undefined" channel in the list
now. But how do i clear the list, when i can't see anything in the acp?
@Niller2005 Do you use Redis or MongoDB?
MongoDB
And no, I don't have 17 channels, I think it's because I tried to add the same channel so many times when nothing happened.
If you are familiar with MongoDB, you could check, for the records in Database, via such request (when you will select your database via use
)
getCollection('objects').find({_key:/twitch_monitor:channel$/})
It should return values, while db.getCollection('objects').find({_key:/twitch_monitor:channel:\d/})
should not return anything in your case (as you said you don't have any channels in the list now)
For now, I'm going to check if It's possible to have partial records in Database, like these ones.
I just deleted all the undefined records in the database, and tried to add a new channel, and it did the same thing.
Yes, It will not work for now. Working on another patch version, which should address this ticket ;) Stay tuned.
Okay :+1:
Everything works fine after last update.
Closing the ticket. Don't hesitate to provide an update if issue is still around.
Helllo,
I'm getting the following error that crashes my nodebb. (I can reset the plugin, though)
One of site admins might have entered some wrong setting but he isn't exactly sure what he did anymore.
Nodebb is running on Ubuntu 16.04 inside a Docker container, using MongoDB and nginx as a proxy.
I can give you more specific information if you tell me what you need to know.