Forced to refresh page after login because page doesn't load on login

Technical Support
  • Hi i have setup nodebb and was running fine but on last build i get the error below, can anyone help?
    after login is completed page doesn't load and unless i refresh the page i can't see i'm logged in

    setup:
    Linux
    Mongo v4.0.5
    Node v10.15.0
    npm 6.4.1
    nginx version: nginx/1.10.3 (Ubuntu)

    2019-01-29T13:01:01.526Z [4567/22491] - info: [build]         plugin static dirs                               build completed in 0.804sec
    2019-01-29T13:01:04.596Z [4567/22491] - warn: [meta/templates] Partial not loade                             d: partials/account/header.tpl
    2019-01-29T13:01:04.598Z [4567/22491] - warn: [meta/templates] Partial not loade                             d: partials/chats/user.tpl
    2019-01-29T13:01:04.598Z [4567/22491] - warn: [meta/templates] Partial not loade                             d: partials/chats/user.tpl
    io: 1 on [ { type: 2, nsp: '/', id: 28, data: [ 'admin.rooms.getAll' ] } ]
    2019-01-29T13:01:09.575Z [4567/22491] - warn: [meta/templates] Partial not loade                             d: partials/chats/user.tpl
    2019-01-29T13:01:09.576Z [4567/22491] - warn: [meta/templates] Partial not loade                             d: partials/chats/user.tpl
    io: 1 emit [ 'disconnecting', 'ping timeout' ]
    io: 1 emit [ 'disconnect', 'ping timeout' ]
    io: 1 emit [ 'disconnecting', 'ping timeout' ]
    io: 1 emit [ 'disconnect', 'ping timeout' ]
    
    
  • Have you tried running ./nodebb build and restarting? If there are any errors in the build command share them here.

  • @PitaJ that seem to have fixed the issue.

    However now i get this just by simply clicking restart

    2019-01-30T00:06:23.202Z [4567/30189] - warn: [deprecated] requiring core modules with `module.parent.require('./meta')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
        at /home/nodebb/node_modules/nodebb-theme-lavender/lib/theme.js:5:24
    
  • @minerric You can ignore that error it is fixed in the latest version of Lavender. https://github.com/NodeBB/nodebb-theme-lavender/commit/72321de43068c4e41bfff0c2c00116072bad1709

  • @baris thank you for the update should i then reinstall the theme and rebuild?

  • Hello,

    I have the same issue, when I try to login I am getting not redirected, after I refresh the page I am logged in. I can't see any error in the log files but this error appears in the chrome console

    Uncaught (in promise) TypeError: Cannot read property 'slice' of undefined
        at Object.app.reskin (app.js:781)
        at app.js:152
    app.reskin	@	app.js:781
    (anonymous)	@	app.js:152
    Promise.then (async)		
    (anonymous)	@	app.js:145
    execCb	@	require.js:29
    check	@	require.js:18
    enable	@	require.js:23
    init	@	require.js:16
    (anonymous)	@	require.js:26
    setTimeout (async)		
    g.nextTick	@	require.js:32
    c	@	require.js:26
    requirejs	@	require.js:32
    app.updateHeader	@	app.js:115
    success	@	login.js:42
    t.success	@	jquery.form.min.js:7
    c	@	jquery.js:3268
    fireWith	@	jquery.js:3398
    $	@	jquery.js:9305
    (anonymous)	@	jquery.js:9548
    load (async)		
    send	@	jquery.js:9567
    ajax	@	jquery.js:9206
    e.fn.ajaxSubmit	@	jquery.form.min.js:7
    (anonymous)	@	login.js:34
    dispatch	@	jquery.js:5183
    m.handle	@	jquery.js:4991
    

    If it is related to a theme I am using the Material Design Theme

  • @Ne-Ho Try with persona does it happen there?

  • This should be fixed on latest master https://github.com/NodeBB/NodeBB/commit/f6cfbbb520ecae4df9f0f99b1ba8e6d453a3ab7c, thanks for reporting.

  • @baris I forgot to answer your question, with persona everything works fine


Suggested Topics


  • 0 Votes
    1 Posts
    85 Views

    I installed nodebb and it works great with the persona theme, when I try installing it with other themes (even default ones), most or all of the css just does not load.

    This is what shows up with oxide Screenshot 2022-07-29 221632.png
    and lavender (default)
    image_2022-07-29_222053900.png

    I tried looking for the css file with ctrl+u, and for lavender

    <link rel="stylesheet" type="text/css" href="/assets/client.css?v=b8eg2pvnjhs" />

    takes me to a not found page.
    Oddly enough, the client.css shows valid for the oxide theme, but I still dont think its all the css for the theme

    For context I am running nodebb v2.2.5 using docker
    my routing also uses docker on a seperate container

  • 0 Votes
    2 Posts
    274 Views

    @picasso-shief @baris hi ~buddy,can you help me

  • 1 Votes
    13 Posts
    1k Views

    @julia mhmmmm ...
    Optional thing required to enable email confirmation is required to login..
    I think it may help to prevent fake email users.
    Genuine email with verification only the option to access the forum then automatically they Register and verify the email.
    Now they just typing random words followed by @gmail.com and automatically it logged in without verifying email..
    If they put random email also it should not redirect to logged in state from Registration page.
    Whether they again put that email, password it should not log in, and it should give an error email confirmation is required to login please click the verification link sent to your email.. something like that..

  • 0 Votes
    8 Posts
    908 Views

    @baris Those are already updated on my side. So the developers need to bring out updates, right?

    Thank you - no more errors/warnings.

  • 0 Votes
    14 Posts
    4k Views

    @ron_jeremy said:

    I'm not 100% sure.

    I have "failed" to install NodeBB on a DigitalOcean Droplet about 25 times by now. Seriously, I'm not exaggerating. The people at DO must have wondered "wtf is this guy doing?" because I was creating and destroying Droplets non-stop for days.

    I think what made the difference for me this time was not installing redis or nodejs as per the official NodeBB install document. Instead, I only installed the Chris Lea files.

    I was so tired to trying different methods of installation I actually started keeping a log of what I was doing. I got it down to where only a few lines would change, and I am pretty sure this is what finally worked for me (remember, this is on a DO Droplet running Ubuntu 14.04 x64):

    add-apt-repository ppa:chris-lea/redis-server apt-get update apt-get install redis-server apt-get update apt-get install git apt-get install build-essential apt-get install imagemagick apt-get install python-software-properties add-apt-repository ppa:chris-lea/node.js apt-get update && apt-get dist-upgrade mkdir nodebb git clone git://github.com/designcreateplay/NodeBB.git nodebb cd nodebb npm install node app --setup
    - only modify first line where I enter my server's address http://your.server.ip.address (without the port) and hit 'Enter' for all other options node app
    - Now you can go to http://your.server.ip.address:4567 to see the forum

    I have try this but when i go to npm install
    i get this :
    E: Unable to correct problems, you have held broken packages.

    PD.
    Got fixed with :

    apt-get remove --purge nodejs npm
    curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
    apt-get install nodejs