selfhosting icon indicating copy to clipboard operation
selfhosting copied to clipboard

Error message when trying to log in to vanilla docker compose install

Open alvitali opened this issue 2 years ago • 7 comments

Using the default docker compose file to set up Swetrix, after modifying the environment variables according to the docs, and spinning up the container, I get the following error message when trying to log in through the web mask:

TypeError: undefined is not an object (evaluating 't.response.data')

alvitali avatar Jul 08 '24 21:07 alvitali

Hi, thank you for reporting this. I will take a look at that problem

Blaumaus avatar Jul 08 '24 21:07 Blaumaus

I didn't quickly find the option / environment variable for enabling debug logs, tell me if I can provide anything. Logs only showed to have successfully fetched/served the login page from what I remember

alvitali avatar Jul 09 '24 00:07 alvitali

same error when i tried

0x3e4 avatar Jul 29 '24 05:07 0x3e4

@alvitali @0x3e4 we've released v3.2.0, could you please try to use this version instead? I've just tested it on a clean installation on Hetzner and it seems to work well.

In docker-compose.yml, have you updated the API_URL variable from default (localhost) to your server's IP address / domain? If you did and it still does not work, can you try to run these commands:

docker compose exec swetrix-api node migrations/clickhouse/initialise_database.js
docker compose exec swetrix-api node migrations/clickhouse/initialise_selfhosted.js

docker compose restart

Blaumaus avatar Aug 11 '24 15:08 Blaumaus

I am also facing same error but when i looked in browser console log it was giving me cors error even if i put that origin in env

  • API_ORIGINS=['https://xyz.com']

rahulk41 avatar Aug 24 '24 12:08 rahulk41

API_URL needs a slash at the end, https://example.com/ not https://example.com

KaelWD avatar Nov 09 '24 04:11 KaelWD

Cant reproduce this problem, but I think it's indeed because a slash at the end of the API_URL was missing. I'll address this issue at the next release so it would not matter if the slash is present or not

Blaumaus avatar Nov 09 '24 19:11 Blaumaus