Connection lost when attempting to upload a new profile picture or cover picture
-
NodeBB version: 1.10.2
MongoDB version: 4.0.4When I attempt to change either my profile pic or cover pic our forums responds with "Looks like your connection *** was lost, please wait while we try to reconnect." Which seems strange as every other aspect of the forums is working fine.
The exact errors being thrown in the browser console are as follows (this appears twice, I assume the forums attempts twice before giving up):
socket.io.js:7 GET https://forums.WEBSITE.com/socket.io/?EIO=3&transport=polling&t=MT_KUlp 503 (Service Unavailable) o.create @ socket.io.js:7 o @ socket.io.js:7 r.request @ socket.io.js:7 r.doPoll @ socket.io.js:7 i.poll @ socket.io.js:7 i.doOpen @ socket.io.js:7 i.open @ socket.io.js:7 i.open @ socket.io.js:6 i @ socket.io.js:6 i @ socket.io.js:6 i.open.i.connect @ socket.io.js:6 (anonymous) @ socket.io.js:6 setTimeout (async) i.reconnect @ socket.io.js:6 i.onclose @ socket.io.js:6 (anonymous) @ socket.io.js:7 i.emit @ socket.io.js:6 i.onClose @ socket.io.js:6 (anonymous) @ socket.io.js:6 i.emit @ socket.io.js:6 i.onClose @ socket.io.js:7 i.onClose @ socket.io.js:7 ws.onclose @ socket.io.js:7
Is this an issue with our configuration of the forum software or is it a known issue? Note, I've tried using various image formats and made sure they were well within the file size limit. The logs and errors pages do not show any issues.
-
Are there any errors in the NodeBB server logs?
-
That is what is causing the issue I think. What os and node version are you using?
-
After more testing with both the direct upload and URL upload, I am even more confused. The direct upload is still not working but when I try the URL upload I get different error messages depending on the browser I use. Note the image I am uploading is coming from imgur.com using https and the latest versions of the respective browsers.
-
Chrome: "Unable to upload image due to misconfigured CORS"
-
Edge: "SecurityError"
-
IE 11: "SecurityError"
-
Firefox: "The operation is insecure."
-
Opera: "Unable to upload image due to misconfigured CORS"
The inconsistencies are frustrating, any suggestions on what is causing this?
-
-
I had this problem as well, also impacted image uploading in messages.
First updated to the newest nodebb release (1.11.0) and Node.js stable @ (11.2).
Tried to downgrade Node.js back to (10.12) with no love.
Returned to Node.js stable (11.2), and fixed by simply building sharp locally.
npm install --build-from-source sharp
Cheers
Anjin