First time login failed without error returned

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [X] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Hi Sebastian, this is my first time trying to use squidex. Could you suggest where I can investigate to solve the problem?
I was shown the page below with or without SQUIDEX_ADMINEMAIL defined.
And my login was unsuccessful with the pre-defined SQUIDEX_ADMINEMAIL.


image

Here is what I have done:

  • Build Squidex using nginx on a linux server in my internal network
  • Use self-signed cert but not the default one signed by letsencrypt ( using private domain name )
  • Modify NGINX default.conf proxy_pass to docker’s ip directly
  • Access squidex through the internal domain
  • Login failed ( the status of login request is 200 )

Expected behavior

  • Being shown the create admin user page when admin email is not defined
  • Login with the admin email defined

Minimal reproduction of the problem

  • Build with docker-compose-nginx.yml
  • Define a domain and self sign a cert
  • Modify default.conf in NGINX’s container

upstream mydomain.com {
## Can be connected with “test2_internal” network
# test2_squidex_squidex_1
server 172.18.0.3:5000;
}
server {
server_name mydomain.com;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
include /etc/nginx/vhost.d/default;
location / {
proxy_pass http://172.18.0.3:5000;
}
}
server {
server_name mydomain.com;
listen 443 ssl http2 ;
access_log /var/log/nginx/access.log vhost;
ssl_certificate /etc/nginx/certs/default.crt;
ssl_certificate_key /etc/nginx/certs/default.key;
location / {
proxy_pass http://172.18.0.3:5000;
}
}

Environment

App Name: squidex/squidex:6

  • [X] Self hosted with docker

Version: 6.7.0

Browser:

  • [X] Chrome (desktop)
  • [X] Firefox

Others:

Squidex’s logs
{
“logLevel”: “Information”,
“message”: “HTTP request executed.”,
“elapsedRequestMs”: 49,
“filters”: {
“costs”: 0
},
“timestamp”: “2022-05-01T10:18:46Z”,
“app”: {
“name”: “Squidex”,
“version”: “6.7.0.0”,
“sessionId”: “d0a0b129-01fe-4d2f-979f-b8debcf99e23”
},
“web”: {
“requestId”: “00-1ef9764dd83aba345dcf2f2214fe4e73-d31b63caf91b57fe-01”,
“requestPath”: “/identity-server/.well-known/openid-configuration”,
“requestMethod”: “GET”
}
}

{
“logLevel”: “Information”,
“message”: “HTTP request executed.”,
“elapsedRequestMs”: 153,
“filters”: {
“costs”: 0
},
“timestamp”: “2022-05-01T10:18:46Z”,
“app”: {
“name”: “Squidex”,
“version”: “6.7.0.0”,
“sessionId”: “d0a0b129-01fe-4d2f-979f-b8debcf99e23”
},
“web”: {
“requestId”: “00-844a8dd70d937ad06ba513368acb11d0-b129811297ee256c-01”,
“requestPath”: “/identity-server/connect/authorize”,
“requestMethod”: “GET”
}
}

{
“logLevel”: “Information”,
“message”: “HTTP request executed.”,
“elapsedRequestMs”: 248,
“filters”: {
“costs”: 0
},
“timestamp”: “2022-05-01T10:18:46Z”,
“app”: {
“name”: “Squidex”,
“version”: “6.7.0.0”,
“sessionId”: “d0a0b129-01fe-4d2f-979f-b8debcf99e23”
},
“web”: {
“requestId”: “00-6ddcb297b80715411605aa30cbe457f2-4f4e2a581736e821-01”,
“requestPath”: “/identity-server/account/login”,
“requestMethod”: “GET”
}
}

{
“logLevel”: “Information”,
“message”: “HTTP request executed.”,
“elapsedRequestMs”: 83,
“filters”: {
“costs”: 0
},
“timestamp”: “2022-05-01T10:18:53Z”,
“app”: {
“name”: “Squidex”,
“version”: “6.7.0.0”,
“sessionId”: “d0a0b129-01fe-4d2f-979f-b8debcf99e23”
},
“web”: {
“requestId”: “00-2470cf6a20f2c6e2ee56c9add86676c9-1a2e0e6dc598322a-01”,
“requestPath”: “/identity-server/account/login”,
“requestMethod”: “POST”
}
}

NGINX Logs:
nginx.1 | mydomain.com 192.168.32.63 - - [01/May/2022:09:03:01 +0000] “POST /identity-server/account/login?returnurl=%2Fidentity-server%2Fconnect%2Fauthorize%3Fclient_id%3Dsquidex-frontend%26redirect_uri%3Dhttps%253A%252F%252Fmydomain.com%252Fclient-callback-popup.html%26response_type%3Dcode%26scope%3Dsquidex-api%2520o
penid%2520profile%2520email%2520permissions%26state%3Df2f14191c27c45e38cfaeac5e85c39dc%26code_challenge%3DPTlNRrXtBawi85O6R5J51_6L4ushg2ExIdOjvqLcGOU%26code_challenge_method%3DS256%26display%3Dpopup%26response_mode%3Dquery HTTP/2.0” 200 4832 “https://mydomain.com/identity-server/account/login?ReturnUrl=%2Fidentity-server%2Fconnect%2F
authorize%3Fclient_id%3Dsquidex-frontend%26redirect_uri%3Dhttps%253A%252F%252Fmydomain.com%252Fclient-callback-popup.html%26response_type%3Dcode%26scope%3Dsquidex-api%2520openid%2520profile%2520email%2520permissions%26state%3Df2f14191c27c45e38cfaeac5e85c39dc%26code_challenge%3DPTlNRrXtBawi85O6R5J51_6L4ushg2ExIdOjvqLcGOU%26code_challe
nge_method%3DS256%26display%3Dpopup%26response_mode%3Dquery” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36”

nginx.1 | mydomain.com 192.168.32.63 - - [01/May/2022:09:03:09 +0000] “POST /identity-server/account/login?returnurl=%2Fidentity-server%2Fconnect%2Fauthorize%3Fclient_id%3Dsquidex-frontend%26redirect_uri%3Dhttps%253A%252F%252Fmydomain.com%252Fclient-callback-popup.html%26response_type%3Dcode%26scope%3Dsquidex-api%2520o
penid%2520profile%2520email%2520permissions%26state%3Df2f14191c27c45e38cfaeac5e85c39dc%26code_challenge%3DPTlNRrXtBawi85O6R5J51_6L4ushg2ExIdOjvqLcGOU%26code_challenge_method%3DS256%26display%3Dpopup%26response_mode%3Dquery HTTP/2.0” 200 4832 “https://mydomain.com/identity-server/account/login?returnurl=%2Fidentity-server%2Fconnect%2F
authorize%3Fclient_id%3Dsquidex-frontend%26redirect_uri%3Dhttps%253A%252F%252Fmydomain.com%252Fclient-callback-popup.html%26response_type%3Dcode%26scope%3Dsquidex-api%2520openid%2520profile%2520email%2520permissions%26state%3Df2f14191c27c45e38cfaeac5e85c39dc%26code_challenge%3DPTlNRrXtBawi85O6R5J51_6L4ushg2ExIdOjvqLcGOU%26code_challe
nge_method%3DS256%26display%3Dpopup%26response_mode%3Dquery” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36”

Can you check the logs? 99% something is there. Please just restart your container, login again and send me the full logs as a file.

Thanks for the suggestion!
I have restarted the squidex container, re-edit the NGINX default.conf and login again.
Same thing happens.
I couldn’t find any exception nor error in the logs.

I have uploaded the logs to google drive:
Before restart
After restart

Have you checked the browser logs?

I find out the reason behind the problem by looking into mongodb.
The only user account stored in the db is not the one I defined in .env file but something I have defined in previous build.
I guess the data of previous build was not cleared.

Anyway, thank you so much :slightly_smiling_face:

1 Like

:smiley: :smiley: Shit happens

If there would be no user you would have seen the setup screen.

1 Like