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



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



  • @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!



  • @Nicolas I have version 3.0.5 installed as of now Sept 13, 2016 @657^1.

    I had to manually install it as an update was not shown from my ACP. (I am running NodeBB v1.0.2)



  • @Nicolas Works like a charm for now 👍
    Thanks



  • @Nicolas I have errors from the plugin 3.0.5 but it did not crash my NodeBB instance.

    14/9 17:26 [7677] - error: [plugins/twitch-monitor] Error has occurred, message: connect ETIMEDOUT 
    14/9 17:28 [7677] - error: [plugins/twitch-monitor] Error has occurred, message: connect ETIMEDOUT 
    14/9 17:38 [7677] - error: [plugins/twitch-monitor] Error has occurred, message: connect ETIMEDOUT 
    

    And also

    15/9 07:58 [7677] - error: [plugins/twitch-monitor] Error has occurred, can not get streams resource
    , code: 503
    

  • Plugin & Theme Dev

    First 3, timeout was reached to get data from Twitch.
    Last one, Twitch was not available.



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

    First 3, timeout was reached to get data from Twitch.
    Last one, Twitch was not available.

    Would those types of errors caused previous versions of your plugin to cause NodeBB to restart?

    I am very happy that although the plugin could not communicate with Twitch it did not cause the double restart of NodeBB that previous versions were triggering.

    Thank you.


  • Plugin & Theme Dev

    Before, I had 100% trust in Twitch API. 3.0.5 introduced several checks, if something goes wrong with Twitch. So answer is yes, such errors could produce exceptions.


  • Plugin & Theme Dev

    Version 3.1.0

    New version is available. Summary: improved UX for a Client ID. Also validation method is changed.

    • Add validation for a Client ID as a separate action
    • Add ability to save any Client ID
    • Change Client ID validation method


  • @Nicolas, thanks for the work on this! My members love it!

    I ran into an error today that crashed my NodeBB instance. The error appears to come from Twitch Monitor:

    13/12 09:57 [30258] - error: [plugins/twitch-monitor] Error has occurred, can not get streams resource, code: 500
    node_redis: Deprecated: The ZRANK command contains a "null" argument.
    This is converted to a "null" string now and will return an error from v.3.0 on.
    Please handle this in your code to make sure everything works as you intended it to.
    Unhandled rejection ReplyError: EXECABORT Transaction discarded because of previous errors.
        at parseError (/var/www/nodebb/forums/node_modules/redis-parser/lib/parser.js:167:12)
        at parseType (/var/www/nodebb/forums/node_modules/redis-parser/lib/parser.js:228:14)
    

  • Plugin & Theme Dev

    @teh_g no, error is not from a Twitch Monitor.

    After this error notification:

    13/12 09:57 [30258] - error: [plugins/twitch-monitor] Error has occurred, can not get streams resource, code: 500

    Twitch monitor schedules next update. There is no work with a database.



  • @Nicolas I've been running into a ton of errors from the Twitch plugin lately. It actually caused the NodeBB process to full on die eventually. Here is the error that has been happening:

    26/4 13:27:19 [20245] - error:  TypeError: Cannot read property 'forEach' of null
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:78:36
        at transform (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:105:27)
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:76:35
        at fn (/var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/async/lib/async.js:746:34)
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/async/lib/async.js:1213:16
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/async/lib/async.js:166:37
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/async/lib/async.js:706:43
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/async/lib/async.js:167:37
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/async/lib/async.js:1209:30
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/plugin/twitch/api.js:52:13
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/node_modules/async/lib/async.js:52:16
        at /var/www/nodebb/forums/node_modules/nodebb-plugin-ns-twitch-monitor/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:45:21)
        at Request.self.callback (/var/www/nodebb/forums/node_modules/request/request.js:188:22)
        at emitTwo (events.js:106:13)
        at Request.emit (events.js:191:7)
    26/4 13:27:19 [20245] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    26/4 13:27:19 [20245] - info: [app] Database connection closed.
    26/4 13:27:19 [20245] - info: [app] Web server closed to connections.
    26/4 13:27:19 [20245] - info: [app] Shutdown complete.
    [cluster] Child Process (20245) has exited (code: 1, signal: null)
    

Log in to reply
 

Suggested Topics

| |