Avatar uploading

Bug Reports
  • When I try to upload an avatar it throws this:

    { [Error: bad response on command 'RCPT']
      code: 2,
      smtp: '554 5.7.1 <sonntagskind(at)k0nsl.org>: Relay access denied\n' }
    info: Attempting upload to: /root/nodebb/public/uploads/2-profileimg.jpg
    
    events.js:72
            throw er; // Unhandled 'error' event
                  ^
    Error: spawn ENOENT
        at errnoException (child_process.js:980:11)
        at Process.ChildProcess._handle.onexit (child_process.js:771:34)
    

    Faithfully,
    -k0nsl

  • PS:
    It nevertheless uploaded the avatar.

    -k0nsl

  • That's a little odd -- avatar uploading shouldn't invoke the emailer, and that's what the error seems to be talking about.

    Can you try it again and see if it throws the same error?

  • That's a little odd -- avatar uploading shouldn't invoke the emailer, and that's what the error seems to be talking about.

    Can you try it again and see if it throws the same error?

    Yes, it is the same error over & over - crashes the app instance so it must be re-deployed. Not sure why it does this.

    Regards,
    -k0nsl

  • For some reason I suspected it had to do with 'Imgur Client ID', so I went ahead and clear it, leaving it all empty, then I tried to change my avatar and upload a new one. It resulted in this output:

    [[email protected]]# info: Attempting upload to: /root/nodebb/public/uploads/2-profileimg.jpg
    
    events.js:72
            throw er; // Unhandled 'error' event
                  ^
    Error: spawn ENOENT
        at errnoException (child_process.js:980:11)
        at Process.ChildProcess._handle.onexit (child_process.js:771:34)
    
    [1]+  Exit 8                  node app  (wd: ~/nodebb)
    (wd now: ~/nodebb/public)
    [[email protected]]#
    

    The folder 'uploads' is owned by root and is chmoded 777. I run this NodeBB as root.

    PS:
    I should also note that it only crashes the instance (the issue) - the avatar is actually uploaded and applied.

    Regards,
    -k0nsl

  • Thanks @k0nsl -- @baris, any ideas?

  • Weird. Imgur Client ID and avatar uploading should be totally separate. I will take a look, we never tried to run NodeBB as root I believe. Maybe we should give that a try and see if it causes any problems.

  • I never thought of running NodeBB as an isolated user because I am letting it run on a development box at the moment, so it was a oversight on my part 🙂
    When I put it on the production box later on I will run it isolated.

    Thanks for looking into it.

    Regards,
    -k0nsl

  • Make sure imagemagick is installed

    apt-get install imagemagick
    

    Someone else had the same problem turns out it wasn't installed on their system.

  • apt-get install imagemagick

    Oh, so it was that simple! Well, I can confirm it does work. Good, good.

    info: Attempting upload to: /home/nodebb/nodebb/public/uploads/2-profileimg.jpg
    

    Regards,
    -k0nsl


Suggested Topics


| | | |