Image uploading: "Something went wrong while parsing server response"



  • Hi all,

    since updating to v1.11.1, it is no longer possible for any user to upload images to the forum. The loading message appears, but once it reaches 100%, this message is received:

    "Something went wrong while parsing server response"

    ...then the user loses connection to the forum and has to wait a few seconds to get back in. The image is not visible in the post.

    There's nothing in the server log about what's going on. I've seen this thread, but I'm not running nodebb as root. Plus, it always worked until the upgrade from v1.9.1 to v1.11.1.

    Got any clue? Thank you!


  • Global Moderator

    What version of Node are you on? Have you tried running npm install and restarting?



  • @PitaJ said in Image uploading: "Something went wrong while parsing server response":

    What version of Node are you on? Have you tried running npm install and restarting?

    The Node version is 11.6.0. I recall it complained about Node being old when I tried to upgrade to NodeBB v1.11.1, so I updated it.

    As for npm, I was on 6.5.0-next.0. I've upgraded to the latest now, 6.6.0.

    I run a node ./nodebb upgrade and ./nodebb build, no luck. What would I need to restart?


  • Global Moderator

    Try downgrading to Node 10, running npm install in the nodebb directory, and restarting.



  • @PitaJ said in Image uploading: "Something went wrong while parsing server response":

    Try downgrading to Node 10, running npm install in the nodebb directory, and restarting.

    I'm down to Node v10.15.0 and npm v6.4.1. No luck. Also, I noticed it's not only disconnecting me when uploading an image, it's just going down for a few seconds, likely restarting, without saying anything in the logs.

    One "good" news though is that I could find another instance of a crash/restart with actual info in the logs, here it is:

    2019-01-24T19:52:05.729Z [4567/5583] - error: uncaughtException: The module '/opt/nodebb/node_modules/sharp/build/Release/sharp.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 48. This version of Node.js requires
    NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
    Error: The module '/opt/nodebb/node_modules/sharp/build/Release/sharp.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 48. This version of Node.js requires
    NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
        at Object.Module._extensions..node (internal/modules/cjs/loader.js:750:18)
        at Module.load (internal/modules/cjs/loader.js:620:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
        at Function.Module._load (internal/modules/cjs/loader.js:552:3)
        at Module.require (internal/modules/cjs/loader.js:657:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (/opt/nodebb/node_modules/sharp/lib/constructor.js:10:15)
        at Module._compile (internal/modules/cjs/loader.js:721:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
        at Module.load (internal/modules/cjs/loader.js:620:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
        at Function.Module._load (internal/modules/cjs/loader.js:552:3)
        at Module.require (internal/modules/cjs/loader.js:657:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (/opt/nodebb/node_modules/sharp/lib/index.js:3:15)
        at Module._compile (internal/modules/cjs/loader.js:721:30) {"error":{},"stack":"Error: The module '/opt/nodebb/node_modules/sharp/build/Release/sharp.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION 48. This version of Node.js requires\nNODE_MODULE_VERSION 67. Please try re-compiling or re-installing\nthe module (for instance, using `npm rebuild` or `npm install`).\n    at Object.Module._extensions..node (internal/modules/cjs/loader.js:750:18)\n    at Module.load (internal/modules/cjs/loader.js:620:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:552:3)\n    at Module.require (internal/modules/cjs/loader.js:657:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.<anonymous> (/opt/nodebb/node_modules/sharp/lib/constructor.js:10:15)\n    at Module._compile (internal/modules/cjs/loader.js:721:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)\n    at Module.load (internal/modules/cjs/loader.js:620:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:552:3)\n    at Module.require (internal/modules/cjs/loader.js:657:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.<anonymous> (/opt/nodebb/node_modules/sharp/lib/index.js:3:15)\n    at Module._compile (internal/modules/cjs/loader.js:721:30)","exception":true,"date":"Thu Jan 24 2019 14:52:05 GMT-0500 (GMT-05:00)","process":{"pid":5583,"uid":108,"gid":114,"cwd":"/opt/nodebb","execPath":"/usr/local/bin/node","version":"v11.6.0","argv":["/usr/local/bin/node","/opt/nodebb/app.js"],"memoryUsage":{"rss":221216768,"heapTotal":181747712,"heapUsed":149283464,"external":38473797}},"os":{"loadavg":[0.1904296875,0.2861328125,0.212890625],"uptime":15467752},"trace":[{"column":18,"file":"internal/modules/cjs/loader.js","function":"Object.Module._extensions..node","line":750,"method":"Module._extensions..node","native":false},{"column":32,"file":"internal/modules/cjs/loader.js","function":"Module.load","line":620,"method":"load","native":false},{"column":12,"file":"internal/modules/cjs/loader.js","function":"tryModuleLoad","line":560,"method":null,"native":false},{"column":3,"file":"internal/modules/cjs/loader.js","function":"Function.Module._load","line":552,"method":"Module._load","native":false},{"column":17,"file":"internal/modules/cjs/loader.js","function":"Module.require","line":657,"method":"require","native":false},{"column":18,"file":"internal/modules/cjs/helpers.js","function":"require","line":22,"method":null,"native":false},{"column":15,"file":"/opt/nodebb/node_modules/sharp/lib/constructor.js","function":"","line":10,"method":null,"native":false},{"column":30,"file":"internal/modules/cjs/loader.js","function":"Module._compile","line":721,"method":"_compile","native":false},{"column":10,"file":"internal/modules/cjs/loader.js","function":"Object.Module._extensions..js","line":732,"method":"Module._extensions..js","native":false},{"column":32,"file":"internal/modules/cjs/loader.js","function":"Module.load","line":620,"method":"load","native":false},{"column":12,"file":"internal/modules/cjs/loader.js","function":"tryModuleLoad","line":560,"method":null,"native":false},{"column":3,"file":"internal/modules/cjs/loader.js","function":"Function.Module._load","line":552,"method":"Module._load","native":false},{"column":17,"file":"internal/modules/cjs/loader.js","function":"Module.require","line":657,"method":"require","native":false},{"column":18,"file":"internal/modules/cjs/helpers.js","function":"require","line":22,"method":null,"native":false},{"column":15,"file":"/opt/nodebb/node_modules/sharp/lib/index.js","function":"","line":3,"method":null,"native":false},{"column":30,"file":"internal/modules/cjs/loader.js","function":"Module._compile","line":721,"method":"_compile","native":false}]}
    2019-01-24T19:52:05.730Z [4567/5583] - error: The module '/opt/nodebb/node_modules/sharp/build/Release/sharp.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 48. This version of Node.js requires
    NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
    Error: The module '/opt/nodebb/node_modules/sharp/build/Release/sharp.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 48. This version of Node.js requires
    NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
        at Object.Module._extensions..node (internal/modules/cjs/loader.js:750:18)
        at Module.load (internal/modules/cjs/loader.js:620:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
        at Function.Module._load (internal/modules/cjs/loader.js:552:3)
        at Module.require (internal/modules/cjs/loader.js:657:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (/opt/nodebb/node_modules/sharp/lib/constructor.js:10:15)
        at Module._compile (internal/modules/cjs/loader.js:721:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
        at Module.load (internal/modules/cjs/loader.js:620:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
        at Function.Module._load (internal/modules/cjs/loader.js:552:3)
        at Module.require (internal/modules/cjs/loader.js:657:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (/opt/nodebb/node_modules/sharp/lib/index.js:3:15)
        at Module._compile (internal/modules/cjs/loader.js:721:30)
    2019-01-24T19:52:05.730Z [4567/5583] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    2019-01-24T19:52:05.738Z [4567/5583] - info: [app] Web server closed to connections.
    2019-01-24T19:52:06.090Z [4567/8009] - info: Initializing NodeBB v1.11.1 https://***.com
    [benchpressjs] Unable to build or find a suitable native module, falling back to JS version
    2019-01-24T19:52:08.023Z [4567/8009] - info: [socket.io] Restricting access to origin: https://***.com:*
    2019-01-24T19:52:08.243Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./meta')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at Object.<anonymous> (/opt/nodebb/node_modules/nodebb-plugin-emailer-smtp-complete/index.js:4:26)
    2019-01-24T19:52:08.358Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./database')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:5:14
    2019-01-24T19:52:08.359Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./settings')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:6:20
    2019-01-24T19:52:08.360Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./meta')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:7:16
    2019-01-24T19:52:08.360Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./user')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:8:16
    2019-01-24T19:52:08.361Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./posts')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:9:17
    2019-01-24T19:52:08.361Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./topics')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:10:18
    2019-01-24T19:52:08.362Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./privileges')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:11:22
    2019-01-24T19:52:08.362Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./socket.io/plugins')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:12:25
    2019-01-24T19:52:08.363Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./socket.io/admin')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:13:24
    2019-01-24T19:52:08.363Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('./socket.io/index')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:14:23
    2019-01-24T19:52:08.363Z [4567/8009] - warn: [deprecated] requiring core modules with `module.parent.require('../public/src/modules/translator')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /opt/nodebb/node_modules/nodebb-plugin-poll/lib/nodebb.js:15:22
    2019-01-24T19:52:08.466Z [4567/8009] - info: [plugins/spam-be-gone] Settings loaded
    2019-01-24T19:52:08.479Z [4567/8009] - info: [session-sharing] Settings OK
    2019-01-24T19:52:08.497Z [4567/8009] - info: Routes added
    2019-01-24T19:52:08.502Z [4567/8009] - info: NodeBB Ready
    2019-01-24T19:52:08.508Z [4567/8009] - info: Enabling 'trust proxy'
    2019-01-24T19:52:08.512Z [4567/8009] - info: NodeBB is now listening on: 0.0.0.0:4567
    

  • Global Moderator

    Try running npm rebuild



  • @PitaJ said in Image uploading: "Something went wrong while parsing server response":

    Try running npm rebuild

    Alright, image upload works now! I'll keep an eye for the other crashes and let you know in case!


Log in to reply
 

Suggested Topics

  • 12
  • 4
  • 13
  • 8
  • 3
| |