[nodebb-plugin-ns-twitch-monitor] NS Twitch Monitor


  • @Nicolas Yes it appears so. No problems since I've installed it. Thanks for your work on it.


  • @Nicolas Moments ago my NodeBB forum went "offline." I captured this error message. As before I am not sure this is from the Twitch plugin. Possibly you will know:

    6/7 11:18 [10085] - error: TypeError: Cannot call method 'forEach' of undefined
    
    events.js:72
            throw er; // Unhandled 'error' event
                  ^
    Error: write after end
        at writeAfterEnd (_stream_writable.js:133:12)
        at LogStream.Writable.write (_stream_writable.js:181:5)
        at write (_stream_readable.js:602:24)
        at flow (_stream_readable.js:611:7)
        at Socket.pipeOnReadable (_stream_readable.js:643:5)
        at Socket.emit (events.js:92:17)
        at emitReadable_ (_stream_readable.js:427:10)
        at emitReadable (_stream_readable.js:423:5)
        at readableAddChunk (_stream_readable.js:166:9)
        at Socket.Readable.push (_stream_readable.js:128:10)
    

    Thank you.


  • How often is the game text updated? I have the GamesDoneQuick stream up on my widget, and it hasn't updated the game since I added it. The image does update at least :)


  • @Nicolas Seeing some crashing as well in my logs:

    6/7 15:53 [8090] - error: TypeError: Cannot read property 'streams' of undefined
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:74:28
        at transform (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:89:25)
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:72:35
        at fn (/var/www/nodebb/forums/node_modules/async/lib/async.js:746:34)
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1213:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:166:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:706:43
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:167:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:48:13
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:52:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at Request._callback (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:41:21)
        at Request.self.callback (/var/www/nodebb/forums/node_modules/request/request.js:200:22)
        at emitTwo (events.js:106:13)
        at Request.emit (events.js:191:7)
    TypeError: Cannot read property 'streams' of undefined
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:74:28
        at transform (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:89:25)
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:72:35
        at fn (/var/www/nodebb/forums/node_modules/async/lib/async.js:746:34)
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1213:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:166:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:706:43
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:167:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:48:13
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:52:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at Request._callback (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:41:21)
        at Request.self.callback (/var/www/nodebb/forums/node_modules/request/request.js:200:22)
        at emitTwo (events.js:106:13)
        at Request.emit (events.js:191:7)
  • Plugin & Theme Dev

    Is it related to Twitch API?
    I mean, they now require correct API keys. Did you generate your API key?


  • @Nicolas Yes, if you are referring to the field "Client ID" in your plugin settings I have registered for a twitch API and have it installed. I have just upgraded my plugin to version 3.0.4. I will report if it crashes again.

    Thank you.


  • @Nicolas said in [nodebb-plugin-ns-twitch-monitor] NS Twitch Monitor:

    Is it related to Twitch API?
    I mean, they now require correct API keys. Did you generate your API key?

    I've got my API key setup as well. It was properly displaying the stream, but the forums were crashing periodically with the stack I quoted above.


  • Is this something to be concerned about or a normal error?

    13/7 13:05 [14354] - error: [plugins/twitch-monitor] Error has occurred, message: read ECONNRESET


  • @teh_g said in [nodebb-plugin-ns-twitch-monitor] NS Twitch Monitor:

    @Nicolas Seeing some crashing as well in my logs:

    6/7 15:53 [8090] - error: TypeError: Cannot read property 'streams' of undefined
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:74:28
        at transform (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:89:25)
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:72:35
        at fn (/var/www/nodebb/forums/node_modules/async/lib/async.js:746:34)
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1213:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:166:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:706:43
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:167:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:48:13
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:52:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at Request._callback (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:41:21)
        at Request.self.callback (/var/www/nodebb/forums/node_modules/request/request.js:200:22)
        at emitTwo (events.js:106:13)
        at Request.emit (events.js:191:7)
    TypeError: Cannot read property 'streams' of undefined
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:74:28
        at transform (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:89:25)
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:72:35
        at fn (/var/www/nodebb/forums/node_modules/async/lib/async.js:746:34)
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1213:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:166:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:706:43
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:167:37
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:48:13
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:52:16
        at /var/www/nodebb/forums/node_modules/async/lib/async.js:1209:30
        at Request._callback (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:41:21)
        at Request.self.callback (/var/www/nodebb/forums/node_modules/request/request.js:200:22)
        at emitTwo (events.js:106:13)
        at Request.emit (events.js:191:7)
    

    Any chance to look at this yet? I haven't tried re-enabling the plugin since it was causing major issues in NodeBB.

  • Plugin & Theme Dev

    I think issue was resolved, but in order to have a benefit of latest changes you have to remove Twitch Plugin data also from the database.

    Clearing for all documents with a twitch should be enough: db.getCollection('objects').find({_key:/twitch/})

    Why it could be a deal? Because at some point, there was not sanitization of the response from Twitch, and they changed their response a bit.


  • @Nicolas How would I go about that with redis? I don't want to kill my install by guessing :D


  • @teh_g For redis I did it this way:

    First I uninstalled the ns-twitch-monitor plugin from the ACP. I then deleted the database entries, as follows.

    $ redis-cli -n 0 (Change the -n 0 to whichever database your forum is using. Most likely zero)

    I ran the following command to locate the twitch keys

    > KEYS *twitch*

    which created output like

    1) "ns:twitch_monitor:channel:11"
    2) "ns:twitch_monitor:channel:8"
    3) "settings:ns:twitch_monitor"
    4) "tag:twitch:topics"
    

    I then deleted every entry that had twitch in it with:

    > DEL ns:twitch_monitor:channel:11

    I then installed the ns-twitch-monitor plugin and re-configured it. I suggest saving your Twich API key and the channels you were subscribed to somewhere to make it handy to re-populate after the installation.


  • @Nicolas I took your advice and un-installed your plugin. Deleted the twitch database entries and then installed and configured the plugin again. Alas, just as before I had a "crash" and re-start (3 times). This is the output of the initial crash that began the cycle (after removing the plugin, database entries delete, etc.):

    30/8 16:42 [29744] - info: [plugins/twitch-monitor] Start monitoring of channels, delay is 30000 ms
    30/8 17:46 [29744] - error: TypeError: Cannot call method 'forEach' of undefined
        at /usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:74:37
        at transform (/usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:89:25)
        at /usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:72:35
        at fn (/usr/share/nodebb/PROD/node_modules/async/lib/async.js:746:34)
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:1213:16
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:166:37
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:706:43
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:167:37
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:1209:30
        at /usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:48:13
    TypeError: Cannot call method 'forEach' of undefined
        at /usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:74:37
        at transform (/usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:89:25)
        at /usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:72:35
        at fn (/usr/share/nodebb/PROD/node_modules/async/lib/async.js:746:34)
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:1213:16
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:166:37
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:706:43
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:167:37
        at /usr/share/nodebb/PROD/node_modules/async/lib/async.js:1209:30
        at /usr/share/nodebb/PROD/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:48:13
    30/8 17:46 [29744] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    30/8 17:46 [29744] - info: [app] Database connection closed.
    30/8 17:46 [29744] - info: [app] Web server closed to connections.
    30/8 17:46 [29744] - info: [app] Shutdown complete.
    [cluster] Child Process (29744) has exited (code: 1, signal: null)
    [cluster] Spinning up another process...
    30/8 17:46 [30161] - info: Time: Tue Aug 30 2016 17:46:03 GMT-0600 (MDT)
    

    If you would like additional information, such as my subscribed channels, etc., I will gladly provide it.

    I do like this plugin and hope you will be able to find whatever it is that makes it unstable at times.

    I am running NodeBB v1.0.2 and nodebb-plugin-ns-twitch-monitor 3.0.4


  • @rod said in [nodebb-plugin-ns-twitch-monitor] NS Twitch Monitor:

    @Nicolas I took your advice and un-installed your plugin. Deleted the twitch database entries and then installed and configured the plugin again. Alas, just as before I had a "crash" and re-start (3 times). This is the output of the initial crash that began the cycle (after removing the plugin, database entries delete, etc.):

    30/8 16:42 [29744] - info: [plugins/twitch-monitor] Start monitoring of channels, delay is 30000 ms
    30/8 17:46 [29744] - error: TypeError: Cannot call method 'forEach' of undefined
    

    I have the exact same problem, but it happens only sometimes.

  • Plugin & Theme Dev

    Interesting, everyone who has a problem with a plugin uses Redis? Or there are MongoDB users who has the same issue?


  • @Nicolas MongoDB 3.2.9, NodeBB 1.1.2, nodebb-plugin-ns-twitch-monitor 3.0.4

  • Plugin & Theme Dev

    @TimP4w did you try to remove all plugin related data?


  • @Nicolas Yes, I used db.getCollection('objects').find({_key:/twitch/}) and then I deleted all the entries.

  • Plugin & Theme Dev

    Version 3.0.5

    New version is available. Summary: be prepared that Twitch API can not provide response.

    Guys, try this version.


  • @Nicolas said in [nodebb-plugin-ns-twitch-monitor] NS Twitch Monitor:

    Version 3.0.5

    New version is available. Summary: be prepared that Twitch API can not provide response.

    Guys, try this version.

    Just installed, I'll tell you in 48h if I'll encounter some errors. Thanks!

Suggested Topics

| |