Did you add widget areas to the page in the template?
Please share the template
NodeBB version: 1.10.2
MongoDB version: 4.0.4
When 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?
The only error I see is:
2018-12-05T06:59:42.441Z  - error: message=Cannot find module '../build/Release/sharp.node', stack=Error: Can not find module '../build/Release/sharp.node'
That is what is causing the issue I think. What os and node version are you using?
On Debian 9, a Digital Ocean droplet.
What nodejs version? Last time I tried sharp didn't have binaries for node11, not sure if it has now.
We're using NodeJS version 11.3.0
If there isn't a compatible sharp module, is there an alternative we can use so that we can keep using the picture uploading?
Can you switch to node 10.x until it is added?
We'll give that a shot.
Unfortunately, after downgrading NodeJS to 10.14.2 we still get the same error on the upload screen. As for using the upload by URL option, we get the "misconfigured CORS" error, which seems unrelated.
Did you run npm install after downgrading node?
Yes, npm install was run afterwards
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"
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
@Anjin That worked! Holy cow it worked! Thank you for that.
I run into this problem as well, and I fixed it by simply
npm install --build-from-source sharp, FYI.