@pitaj JS is enabled in the browser.
But only preload the jQuery library using JS Custom Help.
Now it's ok 🙂
Cannot Login to nodebb: "Welcome back guest"
-
I'm running nodebb on Centos8 on a linode.
- NodeBB 1.16.2
- Node v10.21.0
- Redis server v=5.0.3
Recently I upgraded nodebb (I believe to 1.16.1), and lost the ability to log into the forum with Firefox (difficult for the admin). I go to the login form, enter the credentials, click submit, and the forum reloads with
/?loggedin=true
, and I get a notification:Obviously I was not logged in as myself. I cleared all cookies, tried multiple times, and could not login. I also had reports of the same behavior from other Firefox users. At some point I saw a message in the log when running
./nodebb dev
about a session not matching but I can't reproduce it now.I could still use Chrome for some reason, so I've been using that to try and debug. Then today I saw that 1.16.2 had been released so I upgraded, hoping that something might be fixed. After upgrading to 1.16.2, I am now unable to login with Chrome - nor Safari - either.
So I'm locked out of the forum, and I cannot figure out what's going on. The only error I've seen in the browser console is a few of these:
GET wss://<site>/socket.io/?EIO=4&transport=websocket&sid=R4V1asZABCvMb9lAAAC
with a 400 response.I'm stumped and frustrated. Any debugging/fixing tips?
--Steve
-
@sivy have you tried a private window? Have you tried a stop, build, start?
-
@pitaj Hi, yes, I've tried a private window - no difference. I also did multiple stop/rebuild/start cycles as well.
-
@sivy have you tried disabling plugins?
-
@pitaj Right now I can't, as I cannot login to the forum in any browser I have.
is there a CLI-way to do it?
-
@sivy
./nodebb reset -p
-
@pitaj Thanks, I ran
reset -p
and thenbuild
. No change... -
@pitaj I ran
./nodebb reset -a
and./nodebb build
, and still no change. I did copy the redis db and /public folder before upgrading earlier, so perhaps I'm in for a re-install. Wish I knew what was going on. -
Hello @sivy,
I had the same problem.
Using :
- Cloudflare with https rule for forcing https,
- Nginx mainline version has proxy_pass
Solved by changing on Nginx configuration proxy_pass :
proxy_set_header X-Forwarded-Proto $scheme;
To
proxy_set_header X-Forwarded-Proto https;
Don't understand why it suddently worked with this
-
@arnaudw said in Cannot Login to nodebb: "Welcome back guest":
proxy_set_header X-Forwarded-Proto https;
Oh wow I did recently update my nginx config to SSL, I didn't even think to research this. Will try it out!
-
@arnaudw IT WORKED
Thank you so much. Still figuring things out with nginx, and I don't know that I ever would have figured this out.
-
mod feel free to close
-
@sivy :)))
If someone have an idea about this, i would love to understand...
I was in https since beggining -
@arnaudw I suspect that there was an issue with the proxy messing with how nodebb was interpreting session ids, but I wouldn't know how to be more specific.
-
@sivy Indeed but what ?
-
@arnaudw said in Cannot Login to nodebb: "Welcome back guest":
proxy_set_header X-Forwarded-Proto https;
Thx a lot @arnaudw. Your workaround really helped me out!
-
arnaudw's solution worked for me, though for apache the command is
RequestHeader set X-Forwarded-Proto "https"
Thanks so much for the fix - I also don't understand this, but believe it has to do with a recent update to nodebb since my login was working in v1.16.0 and I updated to v1.16.2
-
@arnaudw said in Cannot Login to nodebb: "Welcome back guest":
Solved by changing on Nginx configuration proxy_pass :
proxy_set_header X-Forwarded-Proto $scheme;To
proxy_set_header X-Forwarded-Proto https;Today I changed the nginx config. Now I use a stream with map and a generic server in nginx.conf (see TLS Termination). This implied removing ssl and http2 from the server's listen directive in sites-enabled/my-site.
So, from:
listen 127.0.0.1:445 deferred ssl http2;
To
listen 127.0.0.1:445 deferred;
That's about my guess why https is required for proxy_set_header X-Forwarded-Proto now.
Thank you for your solution. Saved my day.
-
@arnaudw
I installed a new forum on a heroku server and when I connect via myapp.herokuapp.com it works great
But when I connect through my domain it is written to me "welcome back guest" but really stayed disconnected
(I only use a subdomain, at the domain root I use for another site, I use cloudflare I set ssl and force ssl)
I would be happy to help, thanks -
Varun Ganesh D