Skip to content

Backend issue when DISABLE_REGISTRATION is set to true #1020

@modelorona

Description

@modelorona

📜 Description

Hey team, I did a deployment of this within a GKE cluster and all went well - my only issue is that when I set the DISABLE_REGISTRATION env to true, I am unable to log in with an account I've already created. I just get a backend issue and when I look at the backend, I get this error:

│ 3|frontend | SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON                                                                                            │
│ 3|frontend |     at JSON.parse (<anonymous>)                                                                                                                                 │
│ 3|frontend |     at parseJSONFromBytes (node:internal/deps/undici/undici:5682:19)                                                                                            │
│ 3|frontend |     at successSteps (node:internal/deps/undici/undici:5663:27)                                                                                                  │
│ 3|frontend |     at fullyReadBody (node:internal/deps/undici/undici:4561:9)                                                                                                  │
│ 3|frontend |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)                                                                               │
│ 3|frontend |     at async consumeBody (node:internal/deps/undici/undici:5672:7)                                                                                              │
│ 3|frontend |     at async f (/app/apps/frontend/.next/server/app/(app)/auth/page.js:1:3340) {                                                                                │
│ 3|frontend |   digest: '1115316754'                                                                                                                                          │
│ 3|frontend | } 

If I enable registration, that goes away and I can log in fine.

I am using the latest container image provided by gitroom. Used pretty much the same docker compose example as per the website except I'm using postgres:17-alpine and redis:alpine.

Happy to submit a PR if the fix is straightforward enough!

👟 Reproduction steps

  1. Disable registration env set to true.
  2. Deploy on GKE (although I imagine using a local docker compose might yield the same result)
  3. Go to the configured domain for the application
  4. Be presented with error message that the backend has an issue

👍 Expected behavior

It should ideally just present a login-only screen and not allow registration.

👎 Actual Behavior with Screenshots

frontend:
Image

backend logs:
Image

💻 Operating system

Linux

🤖 Node Version

Whatever the latest container image is using

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions