Login error #136

Closed
opened 2025-07-08 08:41:10 -04:00 by AtHeartEngineer · 0 comments

Originally created by @rolfbe on 2/26/2025

Hello, i'm trying to set up Endurain, but i'm getting the following error when i'm trying to login:

It was not possible to connect to the server. Please try again later - TypeError: NetworkError when attempting to fetch resource.

In my logs there is no error:

2025-02-26T10:57:14.698560000Z Checking ownership of necessary directories...
2025-02-26T10:57:14.701513000Z Directory is owned by root UID/GID (0). Adjusting will fail, change ownership manually to non-root, example 1000:1000.
2025-02-26T10:57:14.701586000Z Substituting MY_APP_ENDURAIN_HOST with http://localhost:8080
2025-02-26T10:57:14.714725000Z Substituting MY_APP_STRAVA_CLIENT_ID with 150156
2025-02-26T10:57:14.731391000Z Starting FastAPI with BEHIND_PROXY=false
2025-02-26T10:57:17.787510000Z INFO: Started server process [1]
2025-02-26T10:57:17.787809000Z INFO: Waiting for application startup.
2025-02-26T10:57:17.884108000Z INFO: Application startup complete.
2025-02-26T10:57:17.884352000Z INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
2025-02-26T10:57:19.750574000Z Backend startup event - v0.9.1
2025-02-26T10:57:19.751002000Z Checking for migrations not executed
2025-02-26T10:57:19.751052000Z Migration check completed
2025-02-26T10:57:19.751089000Z Retrieving last day activities from Garmin Connect and Strava on startup
2025-02-26T10:57:19.751124000Z Retrieving last day body composition from Garmin Connect on startup
2025-02-26T10:57:19.751167000Z INFO: 127.0.0.1:40264 - "GET /api/v1/about HTTP/1.1" 200 OK
2025-02-26T10:57:34.455967000Z INFO: 192.168.1.76:58411 - "GET / HTTP/1.1" 200 OK
2025-02-26T10:57:34.564052000Z INFO: 192.168.1.76:58411 - "GET /assets/index-BBQgRDmS.js HTTP/1.1" 200 OK
2025-02-26T10:57:34.568544000Z INFO: 192.168.1.76:58413 - "GET /registerSW.js HTTP/1.1" 200 OK
2025-02-26T10:57:34.568744000Z INFO: 192.168.1.76:58412 - "GET /assets/index-CgOphQCY.css HTTP/1.1" 200 OK
2025-02-26T10:57:34.879391000Z INFO: 192.168.1.76:58411 - "GET /assets/LoginView-Byg6xQHT.js HTTP/1.1" 200 OK
2025-02-26T10:57:34.879632000Z INFO: 192.168.1.76:58412 - "GET /assets/profileService-DvZvIEES.js HTTP/1.1" 200 OK
2025-02-26T10:57:42.286092000Z INFO: 192.168.1.76:58417 - "GET / HTTP/1.1" 200 OK
2025-02-26T10:57:42.326441000Z INFO: 192.168.1.76:58417 - "GET /assets/index-BBQgRDmS.js HTTP/1.1" 200 OK
2025-02-26T10:57:42.336333000Z INFO: 192.168.1.76:58418 - "GET /assets/index-CgOphQCY.css HTTP/1.1" 200 OK
2025-02-26T10:57:42.341200000Z INFO: 192.168.1.76:58419 - "GET /registerSW.js HTTP/1.1" 200 OK
2025-02-26T10:57:42.637036000Z INFO: 192.168.1.76:58417 - "GET /assets/LoginView-Byg6xQHT.js HTTP/1.1" 200 OK
2025-02-26T10:57:42.637196000Z INFO: 192.168.1.76:58418 - "GET /assets/profileService-DvZvIEES.js HTTP/1.1" 200 OK
2025-02-26T10:57:49.801373000Z INFO: 127.0.0.1:46716 - "GET /api/v1/about HTTP/1.1" 200 OK
2025-02-26T10:58:19.862942000Z INFO: 127.0.0.1:52720 - "GET /api/v1/about HTTP/1.1" 200 OK
2025-02-26T10:58:49.914962000Z INFO: 127.0.0.1:60058 - "GET /api/v1/about HTTP/1.1" 200 OK


This is my Docker Compose File:


services:
endurain:
container_name: endurain
image: ghcr.io/joaovitoriasilva/endurain:latest
environment:
- TZ=Europe/Amsterdam
- DB_TYPE=postgres # mariadb or postgres
- DB_HOST=postgres # mariadb or postgres
- DB_PORT=5432 # 3306 or 5432
- DB_PASSWORD=secret
- SECRET_KEY=secret
- STRAVA_CLIENT_ID=123456
- STRAVA_CLIENT_SECRET=secret
- STRAVA_AUTH_CODE=secret
- GEOCODES_MAPS_API=secret
- ENDURAIN_HOST=http://localhost:8080 # host or local ip (example: http://192.168.1.10:8080 or https://endurain.com), default is http://localhost:8080
- BEHIND_PROXY=false # default value is false. Change to true if behind reverse proxy
volumes:
# - /DATA/AppData/endurain/backend/app:/app # Configure volume if you want to edit the code locally by cloning the repo
- /DATA/AppData/endurain/backend/user_images:/app/backend/user_images # necessary for user image persistence on container image updates
- /DATA/AppData/endurain/backend/files/bulk_import:/app/backend/files/bulk_import # necessary to enable bulk import of activities. Place here your activities files
- /DATA/AppData/endurain/backend/files/processed:/app/backend/files/processed # necessary for processed original files persistence on container image updates
- /DATA/AppData/endurain/backend/logs:/app/backend/logs # log files for the backend
ports:
- "8080:8080" # Endurain port, change per your needs
depends_on:
postgres: # mariadb or postgres
condition: service_healthy # remove this line when using mariadb
restart: unless-stopped

postgres logic

postgres:
image: postgres:latest
container_name: postgres
environment:
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=endurain
- POSTGRES_USER=endurain
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U endurain"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- /DATA/AppData/endurain/postgres:/var/lib/postgresql/data
restart: unless-stopped

networks:
default:
external: true
name: endurain_network


This is what i see in my console in the Browser:


Image


In the console i see it is trying to connect to localhost:8080, but my browser can't resolve localhost:8080. Is that the problem? other wise i dont know where to start looking.. Hopefully someone can point me in the right direction.

*Originally created by @rolfbe on 2/26/2025* Hello, i'm trying to set up Endurain, but i'm getting the following error when i'm trying to login: It was not possible to connect to the server. Please try again later - TypeError: NetworkError when attempting to fetch resource. In my logs there is no error: --------------- 2025-02-26T10:57:14.698560000Z Checking ownership of necessary directories... 2025-02-26T10:57:14.701513000Z Directory is owned by root UID/GID (0). Adjusting will fail, change ownership manually to non-root, example 1000:1000. 2025-02-26T10:57:14.701586000Z Substituting MY_APP_ENDURAIN_HOST with http://localhost:8080 2025-02-26T10:57:14.714725000Z Substituting MY_APP_STRAVA_CLIENT_ID with 150156 2025-02-26T10:57:14.731391000Z Starting FastAPI with BEHIND_PROXY=false 2025-02-26T10:57:17.787510000Z INFO: Started server process [1] 2025-02-26T10:57:17.787809000Z INFO: Waiting for application startup. 2025-02-26T10:57:17.884108000Z INFO: Application startup complete. 2025-02-26T10:57:17.884352000Z INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) 2025-02-26T10:57:19.750574000Z Backend startup event - v0.9.1 2025-02-26T10:57:19.751002000Z Checking for migrations not executed 2025-02-26T10:57:19.751052000Z Migration check completed 2025-02-26T10:57:19.751089000Z Retrieving last day activities from Garmin Connect and Strava on startup 2025-02-26T10:57:19.751124000Z Retrieving last day body composition from Garmin Connect on startup 2025-02-26T10:57:19.751167000Z INFO: 127.0.0.1:40264 - "GET /api/v1/about HTTP/1.1" 200 OK 2025-02-26T10:57:34.455967000Z INFO: 192.168.1.76:58411 - "GET / HTTP/1.1" 200 OK 2025-02-26T10:57:34.564052000Z INFO: 192.168.1.76:58411 - "GET /assets/index-BBQgRDmS.js HTTP/1.1" 200 OK 2025-02-26T10:57:34.568544000Z INFO: 192.168.1.76:58413 - "GET /registerSW.js HTTP/1.1" 200 OK 2025-02-26T10:57:34.568744000Z INFO: 192.168.1.76:58412 - "GET /assets/index-CgOphQCY.css HTTP/1.1" 200 OK 2025-02-26T10:57:34.879391000Z INFO: 192.168.1.76:58411 - "GET /assets/LoginView-Byg6xQHT.js HTTP/1.1" 200 OK 2025-02-26T10:57:34.879632000Z INFO: 192.168.1.76:58412 - "GET /assets/profileService-DvZvIEES.js HTTP/1.1" 200 OK 2025-02-26T10:57:42.286092000Z INFO: 192.168.1.76:58417 - "GET / HTTP/1.1" 200 OK 2025-02-26T10:57:42.326441000Z INFO: 192.168.1.76:58417 - "GET /assets/index-BBQgRDmS.js HTTP/1.1" 200 OK 2025-02-26T10:57:42.336333000Z INFO: 192.168.1.76:58418 - "GET /assets/index-CgOphQCY.css HTTP/1.1" 200 OK 2025-02-26T10:57:42.341200000Z INFO: 192.168.1.76:58419 - "GET /registerSW.js HTTP/1.1" 200 OK 2025-02-26T10:57:42.637036000Z INFO: 192.168.1.76:58417 - "GET /assets/LoginView-Byg6xQHT.js HTTP/1.1" 200 OK 2025-02-26T10:57:42.637196000Z INFO: 192.168.1.76:58418 - "GET /assets/profileService-DvZvIEES.js HTTP/1.1" 200 OK 2025-02-26T10:57:49.801373000Z INFO: 127.0.0.1:46716 - "GET /api/v1/about HTTP/1.1" 200 OK 2025-02-26T10:58:19.862942000Z INFO: 127.0.0.1:52720 - "GET /api/v1/about HTTP/1.1" 200 OK 2025-02-26T10:58:49.914962000Z INFO: 127.0.0.1:60058 - "GET /api/v1/about HTTP/1.1" 200 OK ------------- This is my Docker Compose File: --------------- services: endurain: container_name: endurain image: ghcr.io/joaovitoriasilva/endurain:latest environment: - TZ=Europe/Amsterdam - DB_TYPE=postgres # mariadb or postgres - DB_HOST=postgres # mariadb or postgres - DB_PORT=5432 # 3306 or 5432 - DB_PASSWORD=secret - SECRET_KEY=secret - STRAVA_CLIENT_ID=123456 - STRAVA_CLIENT_SECRET=secret - STRAVA_AUTH_CODE=secret - GEOCODES_MAPS_API=secret - ENDURAIN_HOST=http://localhost:8080 # host or local ip (example: http://192.168.1.10:8080 or https://endurain.com), default is http://localhost:8080 - BEHIND_PROXY=false # default value is false. Change to true if behind reverse proxy volumes: # - /DATA/AppData/endurain/backend/app:/app # Configure volume if you want to edit the code locally by cloning the repo - /DATA/AppData/endurain/backend/user_images:/app/backend/user_images # necessary for user image persistence on container image updates - /DATA/AppData/endurain/backend/files/bulk_import:/app/backend/files/bulk_import # necessary to enable bulk import of activities. Place here your activities files - /DATA/AppData/endurain/backend/files/processed:/app/backend/files/processed # necessary for processed original files persistence on container image updates - /DATA/AppData/endurain/backend/logs:/app/backend/logs # log files for the backend ports: - "8080:8080" # Endurain port, change per your needs depends_on: postgres: # mariadb or postgres condition: service_healthy # remove this line when using mariadb restart: unless-stopped # postgres logic postgres: image: postgres:latest container_name: postgres environment: - POSTGRES_PASSWORD=secret - POSTGRES_DB=endurain - POSTGRES_USER=endurain - PGDATA=/var/lib/postgresql/data/pgdata ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U endurain"] interval: 5s timeout: 5s retries: 5 volumes: - /DATA/AppData/endurain/postgres:/var/lib/postgresql/data restart: unless-stopped networks: default: external: true name: endurain_network -------- This is what i see in my console in the Browser: ------------ ![Image](https://github.com/user-attachments/assets/23d57363-26e6-4442-b642-0ee362169158) ----------- In the console i see it is trying to connect to localhost:8080, but my browser can't resolve localhost:8080. Is that the problem? other wise i dont know where to start looking.. Hopefully someone can point me in the right direction.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/endurain#136