Can't upload logo

Technical Support
  • @julian favicon is uploading just fine, why the issue are only with uploading logo and touchicon ?
    I didn't think its the issue with nodejs as its using official repo installation (centos 7)

  • Please try using Ubuntu 18.04

  • I met just same probelm too when I try to install nodebb last day. I can upload favicon but can't upload any other images. I used the same centos7 and v12.15.0 node.js. I looked up the installation log, it shows some modules did not installed well. For me it were sharp and some other modules. I guess it's the sharp module which is used to crop the images uploaded caused this problem. Sharp module need 'CXXABI_1.3.8' to compile and my default yum source did not have the gcc version needed. Maybe you can upgrade your gcc version and try reinstalling it by using "npm install sharp"? Hope this can help.

  • That is a good clue @BAKA, this is likely the issue. Perhaps sharp needs to be compiled manually by npm.

  • @BAKA said in Can't upload logo:

    I met just same probelm too when I try to install nodebb last day. I can upload favicon but can't upload any other images. I used the same centos7 and v12.15.0 node.js. I looked up the installation log, it shows some modules did not installed well. For me it were sharp and some other modules. I guess it's the sharp module which is used to crop the images uploaded caused this problem. Sharp module need 'CXXABI_1.3.8' to compile and my default yum source did not have the gcc version needed. Maybe you can upgrade your gcc version and try reinstalling it by using "npm install sharp"? Hope this can help.

    thanks @BAKA for the info, i'll install ubuntu 18.04 and get back here.

  • @julian thanks on ubuntu 18.04 there is no such issue. Centos 7 have issues which @BAKA mentioned with GCC version.

  • hopefully centos 8 doesn't have this issues 🙂 thanks @BAKA

  • I've updated the gcc version but there is still the issue with RHEL/centos 7 @julian you should check nodebb compatibility with EL7. Else remove EL7 from the supported list.

  • @Sandeep where do we say we support CentOS? Just wondering, because we shouldn't, we try to be platform agnostic but target Ubuntu mainly.

  • okay thanks, probably stop using nodebb then 🙂

    remove the docs from here
    https://docs.nodebb.org/installing/os/

  • @Sandeep yes, the CentOS guide here is community supported, it should still work regardless (though you'll likely need to install the build tools so sharp can compile).

  • sharp compiles fine no issue @julian

    its on centos 7 :

    [root@server nodebb]# npm install sharp
    
    > [email protected] install /home/removed/web/removed.com/nodebb/node_modules/husky
    > node husky install
    
    husky > Setting up git hooks
    husky > Done
    
    > [email protected] install /home/removed/web/removed.com/nodebb/node_modules/sharp
    > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
    
    info sharp Detected globally-installed libvips v8.9.1
    info sharp Building from source via node-gyp
    make: Entering directory `/home/removed/web/removed.com/nodebb/node_modules/sharp/build'
      TOUCH Release/obj.target/libvips-cpp.stamp
      CXX(target) Release/obj.target/sharp/src/common.o
      CXX(target) Release/obj.target/sharp/src/metadata.o
      CXX(target) Release/obj.target/sharp/src/stats.o
      CXX(target) Release/obj.target/sharp/src/operations.o
      CXX(target) Release/obj.target/sharp/src/pipeline.o
      CXX(target) Release/obj.target/sharp/src/sharp.o
      CXX(target) Release/obj.target/sharp/src/utilities.o
      SOLINK_MODULE(target) Release/obj.target/sharp.node
      COPY Release/sharp.node
    make: Leaving directory `/home/removed/web/removed.com/nodebb/node_modules/sharp/build'
    
    > [email protected] postinstall /home/removed/web/removed.com/nodebb/node_modules/husky
    > opencollective-postinstall || exit 0
    
    Thank you for using husky!
    If you rely on this package, please consider supporting our open collective:
    > https://opencollective.com/husky/donate
    
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    
    + [email protected]
    added 618 packages from 785 contributors, updated 1 package and audited 15834 packages in 44.557s
    
    33 packages are looking for funding
      run `npm fund` for details
    
    found 1 high severity vulnerability
      run `npm audit fix` to fix them, or `npm audit` for details
    
  • @julian please let me know if you still think its sharp issue, since it is installed fine.


Suggested Topics


  • 1 Votes
    6 Posts
    630 Views

    Finally getting back around to testing this, still not having much luck. After digging through a lot of the code, and reading through the unit tests for the /api/post/upload endpoint, a user is logged in first.

    I have been trying to do this with only an API token, as this process is loading data from another system. I really don't want to have to store a password in addition to an API token when doing my data load.

    I guess my next question is: Is /api/post/upload even usable without logging in with a username/password?

  • Post's Dropdown Menu Doesn't Work

    Unsolved Technical Support
    0 Votes
    3 Posts
    283 Views

    Works fine in latest firefox.

  • 0 Votes
    2 Posts
    214 Views

    I set the domain name in the CDN to https://xxx.yyy This points to the address provided by the CDN to me.
    For some special reasons, my server is a dynamic IP address, so my CDN back-to-source domain name is
    https://cdn.yyy which points to the server where nodebb is deployed.

    Since my CDN does not support websocket, I have the following configuration in config.json

    "socket.io": { "origins": "*:*", "transports": ["polling"] }, "url": "https://xxx.yyy",

    I have the following configuration in nginx.conf
    server_name xxx.yyy cdn.yyy;

    When I upload a profile picture, I can find the error in the chrome console

    Failed to load resource: the server responded with a status of 400 () socket.io.js:7 POST https://xxx.yyy/socket.io/?EIO=3&transport=polling&t=NCtuzk2&sid=3Ud1Gzokb0tf8jODAAAC 400 o.create @ nodebb.min.js?v=r00khbol8e4:1 o @ nodebb.min.js?v=r00khbol8e4:1 r.request @ nodebb.min.js?v=r00khbol8e4:1 r.doWrite @ nodebb.min.js?v=r00khbol8e4:1 (anonymous) @ nodebb.min.js?v=r00khbol8e4:1 (anonymous) @ nodebb.min.js?v=r00khbol8e4:1 r @ nodebb.min.js?v=r00khbol8e4:1 (anonymous) @ nodebb.min.js?v=r00khbol8e4:1 (anonymous) @ nodebb.min.js?v=r00khbol8e4:1 t.encodePacket @ nodebb.min.js?v=r00khbol8e4:1 o @ nodebb.min.js?v=r00khbol8e4:1 o @ nodebb.min.js?v=r00khbol8e4:1 c @ nodebb.min.js?v=r00khbol8e4:1 t.encodePayload @ nodebb.min.js?v=r00khbol8e4:1 i.write @ nodebb.min.js?v=r00khbol8e4:1 e @ nodebb.min.js?v=r00khbol8e4:1 i.doClose @ nodebb.min.js?v=r00khbol8e4:1 i.close @ nodebb.min.js?v=r00khbol8e4:1 i.onClose @ nodebb.min.js?v=r00khbol8e4:1 i.onError @ nodebb.min.js?v=r00khbol8e4:1 (anonymous) @ nodebb.min.js?v=r00khbol8e4:1 i.emit @ nodebb.min.js?v=r00khbol8e4:1 i.onError @ nodebb.min.js?v=r00khbol8e4:1 (anonymous) @ nodebb.min.js?v=r00khbol8e4:1 i.emit @ nodebb.min.js?v=r00khbol8e4:1 o.onError @ nodebb.min.js?v=r00khbol8e4:1 (anonymous) @ nodebb.min.js?v=r00khbol8e4:1 setTimeout (async) hasXDR.t.onreadystatechange @ nodebb.min.js?v=r00khbol8e4:1

    0c1101c1-5d4f-4dc7-9e56-c9a2df3e005d-image.png e137037c-7780-4b2b-a774-2486c8522693-image.png

    When I upload pictures in the post, I can find the error in the chrome console

    Failed to load resource: the server responded with a status of 400 () /socket.io/?EIO=3&transport=polling&t=NCtuzk2&sid=3Ud1Gzokb0tf8jODAAAC:1 Failed to load resource: the server responded with a status of 400 () /socket.io/?EIO=3&transport=polling&t=NCtv4FE&sid=MZuuQLlpnXxI4yPOAAAC:1 Failed to load resource: the server responded with a status of 400 () /socket.io/?EIO=3&transport=polling&t=NCtv4Jf&sid=MZuuQLlpnXxI4yPOAAAC:1 Failed to load resource: the server responded with a status of 400 () /socket.io/?EIO=3&transport=polling&t=NCtvjAz&sid=Hy92qn1n-0XFzAGzAAAA:1 Failed to load resource: the server responded with a status of 400 () /api/post/upload:1 Failed to load resource: the server responded with a status of 500 ()

    fa8c17ad-2d34-4583-b4ef-703ba683712e-image.png

    Please help me, thanks!

  • 0 Votes
    1 Posts
    272 Views

    Hi Devs,

    I am running the latest nodebb master, and updated to the latest redactor-composer.

    I tried to upload a file using redactor, but it did not work, and no error message was posted. With further digging I found that the file was too big (higher than the predefined value in the admin page).
    Is there a way to catch and display errors from nodebb callback routed into the Redactor plugin?

    Minor issue, I see that when @media width>1000 Redactor is full page, but the topic title placeholder disappears. Further research identified that the div above it has "display = flex". Unsettling that brings back the title placeholder.

    Thanks,
    JJ.

  • can't send emails

    Technical Support
    0 Votes
    7 Posts
    3k Views

    I tried the other emailer (nodebb-plugin-emailer-ssl-smtp) and that works... weird, as I had the local emailer working before, when I had it on my freebsd machine (now centos).

    Thanks for trying, it is much appreciated 🙂