umami icon indicating copy to clipboard operation
umami copied to clipboard

Cannot access websites page in 2.7.0

Open Korhm opened this issue 2 years ago • 20 comments

Describe the Bug

Hello,

I just installed v2.7.0 via Docker. I cannot access the websites page, I got a blank white page.

There is an error in the dev console :

 Error: Failed to lookup route: /settings
    at /_next/static/chunks/main-56afab9f90f97dc9.js:1:26985

I'm using latest verion of Brave browser, but same issue with other browsers like Firefox

Database

PostgreSQL

Relevant log output

Error: Failed to lookup route: /settings
    at /_next/static/chunks/main-56afab9f90f97dc9.js:1:26985

Which browser are you using? (if relevant)

Brave

How are you deploying your application? (if relevant)

Docker

Korhm avatar Sep 25 '23 14:09 Korhm

Is this a fresh install or an upgrade? I couldn't reproduce the error when running the compose file.

franciscao633 avatar Sep 27 '23 05:09 franciscao633

It's a fresh install.

I missundestood the documentation I thing. The page for ennvironment variables (https://umami.is/docs/environment-variables) let met think the default value for CLOUD_MODE is 1, so I set 0 It seems that it also disable some pages, but withtout explicite message.

Where can I find default values for env ?

Korhm avatar Sep 27 '23 14:09 Korhm

For a fresh install you really only need the DATABASE_URL env var. The others are for an as needed basis, so you can just leave them out.

franciscao633 avatar Sep 28 '23 18:09 franciscao633

Hello, also facing this issue on a fresh install, I have the parameter DATABASE_URL properly set in my .env and I can see the website created in my database however I can't access the website page

Capture d’écran 2023-10-11 à 16 40 08 Capture d’écran 2023-10-11 à 16 41 14

I was able to access the page when running yarn dev however it doesn't work when I run the following command pm2 start yarn --name umami -- start && pm2 startup && pm2 save

yun548 avatar Oct 11 '23 14:10 yun548

Hello brother, have you solved your problem

SirYuxuan avatar Oct 14 '23 00:10 SirYuxuan

I'm having the same problem. Here is my docker-compose.yml:

version: "3"
services:
  umami:
    image: ghcr.io/umami-software/umami:postgresql-v2.7.0
    container_name: umami
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgresql://umami:umami@db:5432/umami
      DATABASE_TYPE: postgresql
      APP_SECRET: ...
    depends_on:
      db:
        condition: service_healthy
    restart: always
  db:
    image: postgres:12-alpine
    container_name: umami_db
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami
      POSTGRES_PASSWORD: umami
    volumes:
      - ./umami-db-data:/var/lib/postgresql/data
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 5

I recently migrated from v1 and tested it on my local which works fine. But when I deploy it to my website I get:

Loading failed for the <script> with source “https://umami.orhun.dev/_next/static/chunks/pages/websites/%5Bid%5D-7f6923e98632cfd3.js”.

As a workaround, I downgraded to 2.5.0 and now everything works.

orhun avatar Oct 16 '23 22:10 orhun

I'm having the same problem. Here is my docker-compose.yml:

version: "3"
services:
  umami:
    image: ghcr.io/umami-software/umami:postgresql-v2.7.0
    container_name: umami
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgresql://umami:umami@db:5432/umami
      DATABASE_TYPE: postgresql
      APP_SECRET: ...
    depends_on:
      db:
        condition: service_healthy
    restart: always
  db:
    image: postgres:12-alpine
    container_name: umami_db
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami
      POSTGRES_PASSWORD: umami
    volumes:
      - ./umami-db-data:/var/lib/postgresql/data
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 5

I recently migrated from v1 and tested it on my local which works fine. But when I deploy it to my website I get:

Loading failed for the <script> with source “https://umami.orhun.dev/_next/static/chunks/pages/websites/%5Bid%5D-7f6923e98632cfd3.js”.

As a workaround, I downgraded to 2.5.0 and now everything works.

Thanks for the solution, everything is fine for me after downgrading to 2.5.0

SirYuxuan avatar Oct 17 '23 02:10 SirYuxuan

2.8.0 has the same issue, with a more visible error message:

image

orhun avatar Oct 20 '23 20:10 orhun

@orhun Are you using docker or building from source?

mikecao avatar Oct 20 '23 20:10 mikecao

I'm using the docker-compose.yml file that I shared above.

orhun avatar Oct 20 '23 20:10 orhun

Follow. I'm using the docker-compose method and after an upgrade (via docker-compose up -d) I can't get to any of my sites. It seems the error is the same: the browser is trying to load .js from a URL that contains [id] when I suppose that's an un-expanded token.

Downgraded to v2.5.0 by applying:

diff --git a/docker-compose.yml b/docker-compose.yml
index e7b5f818..fbe784f1 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,7 +2,7 @@
 version: '3'
 services:
   umami:
-    image: ghcr.io/umami-software/umami:postgresql-latest
+    image: ghcr.io/umami-software/umami:postgresql-v2.5.0
     ports:
       - "40003:3000"
     environment:

and then doing docker-compose up -d gets it working again.

artfulrobot avatar Oct 23 '23 10:10 artfulrobot

Thanks for the solution, everything I downloaded the 2.5.0 source code directly and compiled it and it works fine!

SirYuxuan avatar Oct 26 '23 00:10 SirYuxuan

Works by downgrading to version 2.5.0 for Umami I tried all the higher versions it does not actually work

corentin35000 avatar Oct 30 '23 13:10 corentin35000

This seems pretty serious! :worried: Three point releases that don't work, then?

  • 2.5 :smile: we all say works.
  • 2.6: :scream: Didn't work (thanks @orhun) [edited]
  • 2.7: :scream: Didn't work for me
  • 2.8: :scream: Didn't work for me.

artfulrobot avatar Oct 30 '23 17:10 artfulrobot

Yes, tested the other ones and only 2.5 works for me.

orhun avatar Oct 30 '23 17:10 orhun

Yes, as I said previously I tested all versions > 2.5.0 and none of the versions work

corentin35000 avatar Oct 30 '23 17:10 corentin35000

Hello everybody

The issue I had with version 2.7.0 was because I missunderstood the usage of env variable CLOUD_MODE I force it to value 0, but it seems that even with these value, the cloud mode is on, and the some page are not accessible Once I removed this env variable, everything ran fine (and still is) with version 2.7.0 (did not test 2.8.0)

If it can help, here is the docker-compose.yml I'm using:

version: '3.8'

services:
  umami:
    image: ghcr.io/umami-software/umami:postgresql-latest
    environment:
      DISABLE_BOT_CHECK: 1
      ENABLE_TEST_CONSOLE: 0
      DISABLE_TELEMETRY: 1
      DISABLE_UPDATES: 1
      APP_SECRET: ${APP_SECRET}
      DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db_umami:5432/${POSTGRES_DB}
      IGNORE_IP: ${IGNORE_IP}
    restart: unless-stopped
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.umami.entrypoints=https'
      - 'traefik.http.routers.umami.rule=Host(`********`)'
      - 'traefik.http.services.umami.loadbalancer.server.port=3000'
    networks:
      - traefik-net
      - umami-backend

  db_umami:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - ./data:/var/lib/postgresql/data
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 5
    networks:
      - umami-backend

networks:
  traefik-net:
    external: true
  umami-backend:

Korhm avatar Oct 30 '23 17:10 Korhm

We are having issues with Next. Please see https://github.com/umami-software/umami/issues/2371#issuecomment-1785753337 . Also #2361 has other resolutions.

franciscao633 avatar Oct 30 '23 18:10 franciscao633

Looks like the issue is solved for me in 2.9.0

orhun avatar Dec 14 '23 12:12 orhun

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Feb 13 '24 01:02 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Feb 21 '24 01:02 github-actions[bot]