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.