AnousoneFS
AnousoneFS2mo ago

can't redirect to login page

when call url in browser: http://localhost:8080/ui/console -> redirect to: http://localhost:3000/ui/v2/login/login?authRequest=V2_338270893702643715. then got:
localhost is currently unable to handle this request. HTTP ERROR 500 i run on mac os: 15.3.1 this is the docker compose: this is the log from zitadel login: command: docker logs zitadel-login -f output:
ZITADEL_SERVICE_USER_TOKEN_FILE=/current-dir/login-client.pat is set. Awaiting file and reading token. token file found, reading token ▲ Next.js 15.4.0-canary.86 - Local: http://localhost:3000 - Network: http://0.0.0.0:3000 ✓ Starting... ✓ Ready in 181ms SyntaxError: Unexpected token 'W', "W3sic2Vzc2"... is not valid JSON at JSON.parse (<anonymous>) at q (.next/server/chunks/6939.js:1:134613) at async U (.next/server/app/login/route.js:1:6064) at async k (.next/server/app/login/route.js:13:2830) at async g (.next/server/app/login/route.js:13:3833) at async $ (.next/server/app/login/route.js:13:4955) SyntaxError: Unexpected token 'W', "W3sic2Vzc2"... is not valid JSON at JSON.parse (<anonymous>) at q (.next/server/chunks/6939.js:1:134613) at async U (.next/server/app/login/route.js:1:6064) at async k (.next/server/app/login/route.js:13:2830) at async g (.next/server/app/login/route.js:13:3833) at async $ (.next/server/app/login/route.js:13:4955) Please help. I think I'm missing something small at this point and can't figure it out.
3 Replies
Ask Inkeep
Ask Inkeep2mo ago
Hi @AnousoneFS, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question. Answer I wasn't able to find a direct answer, here are some relevant sources: 1. [Next.js integration with ZITADEL] (1) : Shows how to set up authentication in a Next.js app using ZITADEL, including example repos and step-by-step guides for login flows. This may help verify your integration setup. 2. [[Bug]: Unwanted _rsc requests to /login endpoint leading to spurious 500 Errors] (2) : Describes a related scenario where Next.js makes unexpected requests to the login endpoint, causing 500 errors; suggests handling specific query parameters or adjusting server-side logic. ​ To learn more, see the sources I considered: [1] Next.js [2] [Bug]: Unwanted _rsc requests to /login endpoint leading to spurious 500 Errors ​ Feel free to tag @Ask Inkeep with additional questions. Got it. Tagging @Rajat for additional help.
rexypoo___
rexypoo___2mo ago
This looks like the docker compose example file, but with a few changes 1. You're using a specific image tags, and they're arm64 images 2. The zitadel image is some sort of debug version 3. The master key has been set There are a few possible culprits: 1. some sort of incompatibility between the version of the zitadel image and the zitadel-login image you have pinned 2. The data volume has some sort of error 3. The login-client.pat file does not belong to this instance or is otherwise corrupted Is it possible that the data volume or login-client.pat is from a previous deployment? Is it possible that the database was not completely initialized? On my arm machine the zitadel:v3.4.2 image is not generating a login-client.pat file, however the zitadel:latest tag does. Did you have any trouble generating the login-client.pat file? If so, you might want to start with a fresh configuration and pull a different image
AnousoneFS
AnousoneFSOP2mo ago
I'm still experiencing the issue. I already started with a fresh configuration using these steps: 1. create new directory 2. curl -L https://raw.githubusercontent.com/zitadel/zitadel/main/docs/docs/self-hosting/deploy/docker-compose.yaml -o docker-compose.yaml 3. docker compose pull 4. docker compose up --detach --wait 5. docker compose ps The login-client.pat is generated automatically. the docker image is latest version here's the issue: docker logs zitadel-login -f output: ZITADEL_SERVICE_USER_TOKEN_FILE=/current-dir/login-client.pat is set and file exists, setting ZITADEL_SERVICE_USER_TOKEN to the files content ▲ Next.js 15.4.0-canary.86 - Local: http://localhost:3000 - Network: http://0.0.0.0:3000 ✓ Starting... ✓ Ready in 226ms SyntaxError: Unexpected token 'W', "W3sic2Vzc2"... is not valid JSON at JSON.parse (<anonymous>) at q (.next/server/chunks/7049.js:1:3846) at async U (.next/server/app/login/route.js:1:6265) at async k (.next/server/app/login/route.js:13:2803) at async g (.next/server/app/login/route.js:13:3806) at async $ (.next/server/app/login/route.js:13:4928) SyntaxError: Unexpected token 'W', "W3sic2Vzc2"... is not valid JSON

Did you find this page helpful?