Skip to content

Cannot Complete First-Time Setup (Registration/Login) Due to Auth/Email Dependency Failures #7

Description

@kalpitrathod01

The application fails to complete the initial user registration or login process, resulting in a persistent 401 Unauthorized error and a subsequent frontend crash. This appears to be due to a mandatory dependency check (either Google OAuth or Email verification) that fails when starting from a fresh environment, preventing a valid session token from ever being generated.

Environment
Application: GrowChief (Latest main branch)

Deployment: Docker Compose (Default setup) on Ubuntu VPS

Public URL: http://growchief.*******************.com:5002 (Using HTTP via subdomain)

Steps to Reproduce
Start a fresh installation using docker compose up -d --build.

Configure .env with a domain (e.g., http://growchief.*******************.com:5002) and placeholder Google OAuth credentials.

Access the URL and attempt to register or log in.

Observed Errors
The application gets stuck in an unauthorized loop, preventing any usage.

A. Browser Console Errors (Persistent)

Failed to load resource: the server responded with a status of 401 (Unauthorized)
GET http://...:5002/api/users/self 401 (Unauthorized)

Uncaught TypeError: Cannot read properties of undefined (reading 'subscription')
B. Docker Logs Errors (Backend Check)

The backend fails its required initialization checks:

growchief | 1|backend | Email sender information not found in environment variables

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions