Start fails with UnhandledPromiseRejectionWarning on plain 1.3.0 and 1.4.0



  • Hello everybody.

    I am maintaining a docker image with a base NodeBB on it. Using 1.2.1, everything works by using the documented installation path. Since the arrival of NodeBB 1.3.0 I am a stuck with an error I can't get a hold on.
    After a successfull completion of the web install wizard, the forum fails to start with the following log:

    {"level":"info","message":"initializing NodeBB ...","timestamp":"2016-12-05T20:54:27.648Z"}
    {"level":"info","message":"Routes added","timestamp":"2016-12-05T20:54:27.869Z"}
    [minifier] file not found, node_modules/socket.io-client/socket.io.js
    [minifier] file not found, node_modules/socket.io-client/socket.io.js
    (node:103) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Broken @import declaration of "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" - timeout
    {"level":"info","message":"[app] Shutdown (SIGTERM/SIGINT) Initialised.","timestamp":"2016-12-05T20:56:34.667Z"}
    {"level":"info","message":"[app] Database connection closed.","timestamp":"2016-12-05T20:56:34.673Z"}
    {"level":"info","message":"[app] Web server closed to connections.","timestamp":"2016-12-05T20:56:34.673Z"}
    {"level":"info","message":"[app] Shutdown complete.","timestamp":"2016-12-05T20:56:34.674Z"}
    [cluster] Child Process (103) has exited (code: 0, signal: null)

    No matter what combination of NodeJS 6.x, 7.x and NodeBB 1.3.0, 1.4.0 I use. I get the same error.

    The only thing I found on the net about that issue is this:
    https://community.nodebb.org/topic/9871/nodebb-doesnt-work-on-windows

    Since I use a plain install, I don't know which plugin might fail. I even tried to exchange persona for vanilla. No positive effect.

    If someone of you wants to replicate the problem, you can find the Dockerfile on GitHub (https://github.com/nilsramsperger/docker-nodebb/tree/dev).
    A compiled image can be fetched on DockerHub (nilsramsperger/nodebb:dev).

    It would be very nice if someone could give me a hint about what I am missing.

    Greets
    Nils


  • Global Moderator

    @nilsramsperger does the image have network access?



  • When I curl the failed URL from the logs , I get css data. Web access works.


  • Admin

    @nilsramsperger Are you cURLing from the image itself? It's possible that when the script is at that point, network access is not available yet?



  • I CURLed from within the container.
    It may be that the script within Node has no network access, but I wonder why? I have an image with NodeBB 1.2.1 and that runs smooth as silk.



  • I meet the same problem. when I run ./nodebb setup, It hung all the time.

    [nfv@community_test nodebb]$ ./nodebb setup
    20/1 14:08:22 [8396] - info: NodeBB Setup Triggered via Command Line

    Welcome to NodeBB!

    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).

    20/1 14:08:22 [8396] - info: Now configuring redis database:
    Configuration Saved OK
    Populating database with default configs, if not already set...
    Previous theme detected, skipping enabling default theme
    Categories OK. Found 4 categories.
    Administrator found, skipping Admin setup
    20/1 14:08:23 [8396] - info: Global Moderators group found, skipping creation!
    Enabling default plugins
    20/1 14:08:23 [8396] - info: [install/defaultPlugins] customDefaults
    20/1 14:08:23 [8396] - info: [install/enableDefaultPlugins] activating default plugins 0=nodebb-plugin-composer-default, 1=nodebb-plugin-markdown, 2=nodebb-plugin-mentions, 3=nodebb-widget-essentials, 4=nodebb-rewards-essentials, 5=nodebb-plugin-soundpack-default, 6=nodebb-plugin-emoji-extended, 7=nodebb-plugin-emoji-one
    20/1 14:08:23 [8396] - info: Beginning database schema update
    20/1 14:08:23 [8396] - info: [2016/09/22] Setting category recent tids - skipped!
    20/1 14:08:23 [8396] - info: [2016/10/8] favourite -> bookmark refactor - skipped!
    20/1 14:08:23 [8396] - info: [2016/10/14] Creating sorted sets for post replies - skipped!
    20/1 14:08:23 [8396] - info: [2016/11/22] Update global and user language keys - skipped!
    20/1 14:08:23 [8396] - info: [2016/11/25] Creating sorted sets for pinned topics - skipped!
    20/1 14:08:23 [8396] - info: [upgrade] Schema already up to date!
    20/1 14:08:23 [8396] - info: [build] Building javascript
    20/1 14:08:23 [8396] - info: [build] Building client-side CSS
    (node:8396) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Broken @import declaration of "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" - unable to verify the first certificate
    20/1 14:08:32 [8396] - info: [build] js => Completed in 8.38s



  • Hello,

    I haven't had much time for further inverstigations about the problem, but I have at leas some details to share.

    It seems that the failing call to "googleapis" and the failing of nodeBB startup are not connected. When I start up my Docker image with 1.2.1 I get the same error about "googleapis" but nodeBB starts.

    On the images with 1.3.0 and 1.4.0 I did a netstat and it tells me that there is nothing listening on port 4567 while ps tells me that node processes are running. Starting and stopping nodeBB changes the number of node processes, so there is happening something. Unfortunately the nodeBB log stays silent.

    I didn't try nodeBB 1.4.1 and 1.4.2 yet. May be that will bring up some more hints.


  • Global Moderator

    @nilsramsperger it is the Google font failing to load that causes this. There's something wrong with the CSS minifier that doesn't work with proxies.


  • Admin

    I wonder why we're hearing about these issues only now...

    Perhaps we can load the font file locally from repo?


  • Global Moderator

    @julian odds are it was changed from http to https. Normal http works just fine.

    Actually it's because we added the cleancss plugin which is what causes this issue.


  • Global Moderator



  • I just tried out 1.4.2 on my docker image. The result: No Google fonts error and it starts up.
    So, whatever caused the problem is gone in 1.4.2. Very nice.


Log in to reply
 

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