Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get statistics after updating to v2.6.0 #2238

Closed
riq0h opened this issue Aug 30, 2023 · 12 comments
Closed

Can't get statistics after updating to v2.6.0 #2238

riq0h opened this issue Aug 30, 2023 · 12 comments
Labels
bug Something isn't working fixed in dev Fixed in the dev branch

Comments

@riq0h
Copy link

riq0h commented Aug 30, 2023

Describe the Bug

I have been using Umami in a Docker environment since 2.5.0. Everything was working comfortably until now, but after updating to 2.6.0, I can no longer get any statistics. From the logs, it looks like there is a fault in db, but the process itself is working fine.
The update was performed with docker-compose pull, followed by a restart with docker-compose down and docker-compose up -d.
It is possible that I may have made a careless error, but I would like to ask for a solution just in case.

Database

PostgreSQL

Relevant log output

umami-db-1     |
umami-db-1     |
umami-db-1     | PostgreSQL Database directory appears to contain a database; Skipping initialization
umami-db-1     |
umami-db-1     |
umami-db-1     | 2023-08-30 01:17:14.756 UTC [1] LOG:  starting PostgreSQL 15.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
umami-db-1     | 2023-08-30 01:17:14.756 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
umami-db-1     | 2023-08-30 01:17:14.756 UTC [1] LOG:  listening on IPv6 address "::", port 5432
umami-db-1     | 2023-08-30 01:17:14.758 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
umami-db-1     | 2023-08-30 01:17:14.762 UTC [23] LOG:  database system was shut down at 2023-08-30 01:16:58 UTC
umami-db-1     | 2023-08-30 01:17:14.769 UTC [1] LOG:  database system is ready to accept connections
umami-db-1     | 2023-08-30 01:17:22.336 UTC [35] ERROR:  relation "account" does not exist at character 15
umami-db-1     | 2023-08-30 01:17:22.336 UTC [35] STATEMENT:  select * from account limit 1
umami-db-1     | 2023-08-30 01:17:23.582 UTC [37] LOG:  could not receive data from client: Connection reset by peer
umami-umami-1  | yarn run v1.22.19
umami-umami-1  | $ npm-run-all check-db update-tracker start-server
umami-umami-1  | $ node scripts/check-db.js
umami-umami-1  | ✓ DATABASE_URL is defined.
umami-umami-1  | ✓ Database connection successful.
umami-umami-1  | ✓ Database version check successful.
umami-umami-1  | Prisma schema loaded from prisma/schema.prisma
umami-umami-1  | Datasource "db": PostgreSQL database "umami", schema "public" at "db:5432"
umami-umami-1  |
umami-umami-1  |
umami-umami-1  | 3 migrations found in prisma/migrations
umami-umami-1  |
umami-umami-1  |
umami-umami-1  |
umami-umami-1  |
umami-umami-1  | No pending migrations to apply.
umami-umami-1  |
umami-umami-1  |
umami-umami-1  | ✓ Database is up to date.
umami-umami-1  | $ node scripts/update-tracker.js
umami-umami-1  | $ node server.js
umami-umami-1  | - ready started server on 192.168.32.3:3000, url: http://192.168.32.3:3000
umami-umami-1  | TypeError: Cannot destructure property 'url' of 'payload' as it is undefined.
umami-umami-1  |     at __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/send.js:502:13)
umami-umami-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
umami-db-1     | 2023-08-30 01:22:14.860 UTC [21] LOG:  checkpoint starting: time
umami-db-1     | 2023-08-30 01:22:14.873 UTC [21] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.004 s, sync=0.002 s, total=0.014 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Docker

@franciscao633
Copy link
Collaborator

TypeError: Cannot destructure property 'url' of 'payload' as it is undefined.

Wondering what this is. Looking into it. Is the container stopping at all, or does the app still run, but no stats?

@riq0h
Copy link
Author

riq0h commented Aug 30, 2023

I reverted the version used back to v2.5.0 as a test and got the statistics successfully. but, there is no particular change in the content of the logs.

@jibsaramnim
Copy link

I too ran into this (temporarily and successfully reverted to v2.5.0) and am also using the PostgreSQL variant, in case there might be something specific to that going on.

@Peek-A-Booo
Copy link

Rolling back to v2.5.0 still does not display page views correctly

@vitobotta
Copy link
Contributor

I also noticed that no visits were recorded after upgrading :(

I reverted to 2.5.0 and it's now working. In my case it gave a 404 for the endpoint path.

@saschwarz
Copy link

@vitobotta with 2.6 the endpoint script was renamed from umami.js to script.js. If you don't want to update your websites to use the new script name you can set an environment variable in the docker-compose.prod.yml file to have the old script name served:

TRACKER_SCRIPT_NAME=umami.js

@franciscao633
Copy link
Collaborator

We have a fix for this, and will do another release soon (v2.6.1).

@franciscao633 franciscao633 added bug Something isn't working fixed in dev Fixed in the dev branch labels Aug 30, 2023
@jibsaramnim
Copy link

Is the aforementioned TRACKER_SCRIPT_NAME breaking change still part of v2.6.1, too? I didn't see any mention of it in the release notes of either release, so I'm not quite sure if this change still needs to be made to ensure all sites keep working as they did.

Thanks so much!

@riq0h
Copy link
Author

riq0h commented Aug 31, 2023

Updated to v2.6.1.
I think the problem is probably solved.
Thanks a lot!

@vitobotta
Copy link
Contributor

I upgraded again but what's not working for me is not the script, which I already had renamed to script.js. It's the custom endpoint name set with the env variable COLLECT_API_ENDPOINT. If I unset that then it works. But I want to customise the name in case Umami is added to adblocker lists.

@franciscao633
Copy link
Collaborator

This applies to both env vars #2252 (comment)

@jibsaramnim @vitobotta

@mikecao
Copy link
Collaborator

mikecao commented Aug 31, 2023

Fixed in v2.6.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in dev Fixed in the dev branch
Projects
None yet
Development

No branches or pull requests

7 participants