Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    NodeBB general flakiness, suspected broken install?

    NodeBB
    2
    11
    389
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wu-lee last edited by wu-lee

      We have semi-intermittent problems using NodeBB. These come in more than one form - they may have the same cause? There seem to be components missing.

      The kind of problems I've noticed are loosely as follows.

      • A page submit will take you to a raw javascript page (this may not always be the same one, but I've definitely seen an attempted login do this, with the URL path /service-worker.js?loggedin=true)
      • Log-ins don't work, with errors in the JS console about the following:
        • "Script error for "bootbox", needed by: forum/category/tools"
        • "Uncaught TypeError: t is not a function" (in serialiser.js within the poll module)
        • "Uncaught Error: Script error for "timeago/jquery.timeago" in require.js

      Recently, having seen the raw javascript page, my subsequent attempts to log in either have no visible effect - I remain on the log-in page - or I get taken to a blank page in a new tab with just the word "Forbidden" (the URL path for this page is /login).

      The missing components and the related errors can be seen all over the site, causing problems.

      There seems to be some state to these problems. Telling my browser to forget all state about the site helps reset it such that I can log in, but does not eliminate these problems.

      Inspecting the network tab in the browser console I see "404 not found" errors for the following components:

      • /plugins/nodebb-plugin-markdown/styles/railscasts.css
      • /assets/src/modules/bootbox.js?v=ohhorhrib2o
      • /assets/src/modules/timeago/jquery.timeago.js?v=ohhorhrib2o

      These seem to explain some of the errors in the console. However, I can't tell why these files are absent, and neither using the rebuild-and-restart option or the cloudron restart service option seem to rectify it.

      Uncaught TypeError: t is not a function
          <anonymous> serializer.js:17
          <anonymous> serializer.js:162
      serializer.js:17:25
      
      Loading failed for the <script> with source “https://forum.code-operative.co.uk/assets/src/modules/bootbox.js?v=ohhorhrib2o”. login:1:1
      Uncaught Error: Script error for "bootbox", needed by: forum/category/tools
      https://requirejs.org/docs/errors.html#scripterror
          makeError require.js:168
          onScriptError require.js:1738
          load require.js:1943
          load require.js:1685
          load require.js:834
          fetch require.js:824
          check require.js:856
          enable require.js:1176
          enable require.js:1557
          enable require.js:1161
          bind require.js:134
          each require.js:59
          enable require.js:1113
          init require.js:788
          o require.js:1460
          setTimeout handler*req.nextTick< require.js:1815
          o require.js:1449
          requirejs require.js:1797
          <anonymous> wrapper.js:3
      require.js:168:16
      
      Loading failed for the <script> with source “https://forum.code-operative.co.uk/assets/src/modules/timeago/jquery.timeago.js?v=ohhorhrib2o”. login:1:1
      Uncaught Error: Script error for "timeago/jquery.timeago"
      https://requirejs.org/docs/errors.html#scripterror
          makeError require.js:168
          onScriptError require.js:1738
          load require.js:1943
          load require.js:1685
          load require.js:834
          fetch require.js:824
          check require.js:856
          enable require.js:1176
          enable require.js:1557
          enable require.js:1161
          bind require.js:134
          each require.js:59
          enable require.js:1113
          init require.js:788
          o require.js:1460
          setTimeout handler*req.nextTick< require.js:1815
          o require.js:1449
          requirejs require.js:1797
          load app.js:97
          <anonymous> app.js:23
          jQuery 12
      require.js:168:16
      
      ServiceWorker registration failed:  DOMException: The operation is insecure. app.js:793:13
      

      There are also a slew of errors on restart, in the server-side log, which I can provide on request.

      Our Cloudron platform is v v6.0.1. The NodeBB Cloudron package version is v1.17.0-1. (However, the version reported by NodeBB itself is v1.16.0. Should I expect these to be different?)

      I find much help googling for any of the above errors - most cases the discussions seem to be several years old, and there is nothing I can see on this forum.

      Are other people are not experiencing these problems? If not, it does seem like my installation may be damaged.

      In which case, how can I safely rebuild it without losing the content? I suspect a Cloudron backup restore might restore the broken source code state as well as the content, and so I'm wary about trying that without some advice.

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @wu-lee last edited by

        @wu-lee It seems the assets were not build properly. If you go into the NodeBB's admin panel, there is a button on the top right to Rebuild assets & Restart. Can you try clicking that button and see if it helps?

        Otherwise, usually these things happens if you install plugins. What plugins do you have installed? A good start will be to disable all the ones you installed and try to enable them one by one to find the offending plugin.

        W 1 Reply Last reply Reply Quote 0
        • W
          wu-lee @girish last edited by

          @girish I've tried the rebuild and restart several times. It did rectify some other problems we were having, but these seem to be persistent.

          But I'll try it again, just in case. I'll list the plugins after it starts again.

          W 1 Reply Last reply Reply Quote 0
          • W
            wu-lee @wu-lee last edited by

            No, that still doesn't resolve the problems. The console shows these errors again on first visit, following erasing the browser information for the forum domain:

            This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. [...]
            Uncaught TypeError: t is not a function
                <anonymous> serializer.js:17
                <anonymous> serializer.js:162
            serializer.js:17:25
            Loading failed for the <script> with source “[...]/assets/src/modules/bootbox.js?v=1mjvdi86tsu”. [...]:1:1
            Uncaught Error: Script error for "bootbox", needed by: forum/category/tools
            https://requirejs.org/docs/errors.html#scripterror
                makeError require.js:168
                onScriptError require.js:1738
            require.js:168:16
            ServiceWorker registration failed:  DOMException: The operation is insecure. app.js:793:13
            Loading failed for the <script> with source “[...]/assets/src/modules/timeago/jquery.timeago.js?v=1mjvdi86tsu”. forum.code-operative.co.uk:1:1
            Uncaught Error: Script error for "timeago/jquery.timeago"
            https://requirejs.org/docs/errors.html#scripterror
                makeError require.js:168
                onScriptError require.js:1738
            require.js:168:16
            
            W 1 Reply Last reply Reply Quote 0
            • W
              wu-lee @wu-lee last edited by

              The installed plugins:

              # ./nodebb plugins
              Active plugins:
                      * nodebb-plugin-code-button (installed, enabled)
                      * nodebb-plugin-composer-default (installed, enabled)
                      * nodebb-plugin-dbsearch (installed, enabled)
                      * nodebb-plugin-discord-bot (installed, enabled)
                      * nodebb-plugin-discord-notification (installed, enabled)
                      * nodebb-plugin-emoji (installed, enabled)
                      * nodebb-plugin-emoji-android (installed, enabled)
                      * nodebb-plugin-markdown (installed, enabled)
                      * nodebb-plugin-mentions (installed, enabled)
                      * nodebb-plugin-poll (installed, enabled)
                      * nodebb-plugin-poll2 (installed, enabled)
                      * nodebb-plugin-private-forum (installed, enabled)
                      * nodebb-plugin-soundpack-default (installed, disabled)
                      * nodebb-plugin-spam-be-gone (installed, disabled)
                      * nodebb-rewards-essentials (installed, enabled)
                      * nodebb-theme-lavender (installed, enabled)
                      * nodebb-theme-persona (installed, disabled)
                      * nodebb-theme-slick (installed, disabled)
                      * nodebb-theme-vanilla (installed, disabled)
                      * nodebb-widget-essentials (installed, enabled)
              
              W girish 2 Replies Last reply Reply Quote 0
              • W
                wu-lee @wu-lee last edited by

                I'm trying to disable plugins and will report back.

                Should the NodeBB Cloudron package version (v1.17.0-1) match that reported by NodeBB itself (v1.16.0)?

                girish W 3 Replies Last reply Reply Quote 0
                • girish
                  girish Staff @wu-lee last edited by

                  @wu-lee said in NodeBB general flakiness, suspected broken install?:

                  Should the NodeBB Cloudron package version (v1.17.0-1) match that reported by NodeBB itself (v1.16.0)?

                  They don't need to match. The package version is completely separate from NodeBB version.

                  1 Reply Last reply Reply Quote 0
                  • girish
                    girish Staff @wu-lee last edited by

                    @wu-lee BTW, one thing you can do is to simply clone the app from latest backup. And then play around in the cloned instance (i.e disable all plugins and then test one by one).

                    1 Reply Last reply Reply Quote 0
                    • girish
                      girish Staff @wu-lee last edited by

                      @wu-lee I found this thread https://community.nodebb.org/topic/15211/errors-when-updating-from-latest-1-15-to-1-16 which has same error as yours. It seems to come from that poll2 plugin.

                      1 Reply Last reply Reply Quote 0
                      • W
                        wu-lee @wu-lee last edited by

                        After disabling all the plugins and rebuilding, there is just this error:

                        Failed to load ‘https://forum.code-operative.co.uk/assets/vendor/fontawesome/fonts/fontawesome-webfont.woff2?v=4.7.0’. A ServiceWorker intercepted the request and encountered an unexpected error.

                        Re-enabling these plug-ins:

                        • nodebb-plugin-markdown
                        • nodebb-plugin-mentions

                        Then I see 404s on /plugins/nodebb-plugin-markdown/styles/railscasts.css. Seems to be a bug in the markdown plugin, I filed a bug here:

                        I also get more occasional .ttf//.woff errors as above. And lots of [benchmark] warnings in the server logs, I think these can be ignored.

                        Renabling these seem to go without faults:

                        • nodebb-plugin-composer-default
                        • nodebb-plugin-dbsearch
                        • nodebb-widget-essentials

                        However, nodebb-plugin-private-forum introduces errors, when visiting anonymously.

                        https://github.com/LM1LC3N7/nodebb-plugin-private-forum/issues/2

                        Finally, installing nodebb-plugin-poll doesn't (so far) seem to create any errors....

                        Will keep an eye on things. There were some other plug-ins (code-button, emoji-related) which I didn't consider important enough to re-enable.

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          wu-lee @wu-lee last edited by

                          Rereading, could be worth noting for other readers of this thread: the poll2 plug-in (which seems to be marked as possibly not working with this version of NodeBB) is not the same as the poll plug-in (which seems to be marked as working)/ I'm not sure why I had both installed.

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          Powered by NodeBB