Latest version, error when uploading default profile image: error uploading, code : 0



  • I'm running on Windows 7, I've tried running via command prompt as admin, as well as power shell.
    I launch using node app.js, since ./nodebb start doesn't seem to run anything on localhost.

    Here's the error.

    26/2 10:55 [5940] - error: /api/admin/uploadDefaultAvatar
     Error: Can't set headers after they are sent.
        at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
        at ServerResponse.header (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\response.js:718:10)
        at ServerResponse.send (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\response.js:163:12)
        at ServerResponse.json (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\response.js:249:15)
        at C:\Users\Jacob\Desktop\Forum\src\routes\index.js:176:16
        at Layer.handle [as handle_request] (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\layer.js:95:5
    )
        at trim_prefix (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:312:13)
        at C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:280:7
        at Function.process_params (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:330:12)
        at next (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:271:10)
        at serveStatic (C:\Users\Jacob\Desktop\Forum\node_modules\express\node_modules\serve-static\index.js:74:16)
        at Layer.handle [as handle_request] (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\layer.js:95:5
    )
        at trim_prefix (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:312:13)
        at C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:280:7
        at Function.process_params (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:330:12)
        at next (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:271:10)
    Error: Can't set headers after they are sent.
        at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
        at ServerResponse.header (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\response.js:718:10)
        at ServerResponse.send (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\response.js:163:12)
        at ServerResponse.json (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\response.js:249:15)
        at C:\Users\Jacob\Desktop\Forum\src\routes\index.js:204:8
        at Layer.handle_error (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\layer.js:71:5)
        at trim_prefix (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:310:13)
        at C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:280:7
        at Function.process_params (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:330:12)
        at next (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:271:10)
        at Layer.handle [as handle_request] (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\layer.js:97:5
    )
        at trim_prefix (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:312:13)
        at C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:280:7
        at Function.process_params (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:330:12)
        at next (C:\Users\Jacob\Desktop\Forum\node_modules\express\lib\router\index.js:271:10)
        at serveStatic (C:\Users\Jacob\Desktop\Forum\node_modules\express\node_modules\serve-static\index.js:74:16)
    


  • NodeBB can't find your file. You'll get same error after choosing a file and deleting it locally.

    Add Node.js/NodeBB to system path.


  • Admin

    This looks like a real bug.



  • Reported an issue.
    https://github.com/NodeBB/NodeBB/issues/4277

    nhlpl created this issue in NodeBB/NodeBB

    closed Changing avatar issues #4277


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.