umami icon indicating copy to clipboard operation
umami copied to clipboard

Error reporting when editing website and view detail website with reverse proxy

Open DroidBV8 opened this issue 1 year ago • 15 comments

Describe the Bug

Hello,

I have installed umami on Ubuntu server last LTS with postgresql and configured a reverse proxy with nginx. All access is good and install is OK without error

--> I have this error when i want to edit a website :

image image

--> and this error when I want to wiew details stats :

image image

I have these error with nginx reverse proxy only. In HTTP Direct access with 3000 port I haven't got the error.

  • ubuntu last LTS
  • Postgresql
  • NodeJS v18.17.1
  • yarn run v1.22.19
  • Next.js 13.5.3

-- My nginx proxy conf :

	location / {
		proxy_pass http://127.0.0.1:3000/;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection Upgrade;

		proxy_set_header X-Real-IP $remote_addr;
    	        proxy_set_header Host $host;
    	        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}

npm install next@latest --force broke umami installation

Database

PostgreSQL

Relevant log output

Something went wrong.
Loading chunk 5767 failed. (error: https://umami.XXX.fr/_next/static/chunks/app/(main)/settings/websites/%5Bid%5D/page-22acaee2a17d71fd.js)
ChunkLoadError: Loading chunk 5767 failed.
(error: https://umami.XXX.fr/_next/static/chunks/app/(main)/settings/websites/%5Bid%5D/page-22acaee2a17d71fd.js)
    at l.f.j (https://umami.XXX.fr/_next/static/chunks/webpack-d29b485d209acb6d.js:1:3768)
    at https://umami.XXX.fr/_next/static/chunks/webpack-d29b485d209acb6d.js:1:1409
    at Array.reduce (<anonymous>)
    at l.e (https://umami.XXX.fr/_next/static/chunks/webpack-d29b485d209acb6d.js:1:1375)
    at self.__next_chunk_load__ (https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:1:5937)
    at https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:9:5751
    at https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:9:5974
    at t (https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:9:6177)


---

Something went wrong.
Loading chunk 5126 failed. (error: https://umami.XXX.fr/_next/static/chunks/app/(main)/websites/%5Bid%5D/page-29478cead3ccd45c.js)
ChunkLoadError: Loading chunk 5126 failed.
(error: https://umami.XXX.fr/_next/static/chunks/app/(main)/websites/%5Bid%5D/page-29478cead3ccd45c.js)
    at l.f.j (https://umami.XXX.fr/_next/static/chunks/webpack-d29b485d209acb6d.js:1:3768)
    at https://umami.XXX.fr/_next/static/chunks/webpack-d29b485d209acb6d.js:1:1409
    at Array.reduce (<anonymous>)
    at l.e (https://umami.XXX.fr/_next/static/chunks/webpack-d29b485d209acb6d.js:1:1375)
    at self.__next_chunk_load__ (https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:1:5937)
    at https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:9:5751
    at https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:9:5974
    at t (https://umami.XXX.fr/_next/static/chunks/7864-ed02d4d09d2fae55.js:9:6177)

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

github source, post gre

DroidBV8 avatar Oct 29 '23 20:10 DroidBV8

I have the exact same problem via NGINX with basic docker-compose.yaml from the Umami repository v 2.8.0

corentin35000 avatar Oct 30 '23 13:10 corentin35000

I feel less alone :)

I wanted to test the tool but I appreciate that having this kind of problem doesn't make me want to go further but I would like to resolve this problem so that I can at least try.

DroidBV8 avatar Oct 30 '23 14:10 DroidBV8

You must use Umami version <= 2.5.0

I haven't talked about it with someone on another issue, you have to downgrade the version to version: 2.5.0, you have to change in docker-compose:

version: '3'
services:
  umami:
    image: ghcr.io/umami-software/umami:postgresql-v2.5.0

corentin35000 avatar Oct 30 '23 14:10 corentin35000

I used this for a long time, when it works it's incredibly simple and very good! :)

corentin35000 avatar Oct 30 '23 14:10 corentin35000

I will try manually since I don't use Docker.

The problem is that I don't really want to test an old version.

If the problem is not resolved, I would turn to another tool I think

DroidBV8 avatar Oct 30 '23 14:10 DroidBV8

Yes I understand there are quite a few features and fixing bugs.. so we don't take advantage of it unfortunately, I also hate doing that but it's in the meantime..

corentin35000 avatar Oct 30 '23 14:10 corentin35000

yep no worries

It is also possible that given the problem, there is a problem in my configuration. I'll take a closer look.

The software seems to be worth it :)

DroidBV8 avatar Oct 30 '23 14:10 DroidBV8

I don't think it's on your side, a lot of issues were open for this problem

corentin35000 avatar Oct 30 '23 15:10 corentin35000

The chunk load failed error is a Next.js problem. There are many different issues reported with different solutions. https://github.com/vercel/next.js/issues/38507 https://github.com/vercel/next.js/issues/56484 https://github.com/vercel/next.js/issues/54008

Keep in mind that we run all of our own versions in production for Umami Cloud, so we would definitely run into any errors. However, we host through Vercel and not behind Nginx or Docker, so it's hard to troubleshoot every possible scenario.

In case this helps, here are the Next versions for each Umami release: 2.5: 13.3.1 2.6: 13.4.19 2.7: 13.5.2 2.8: 13.5.3 master branch: 13.5.6

What you can try is to build your own Docker image from master or simply run the code from master to see if it helps. It has the latest Next.js version.

mikecao avatar Oct 30 '23 17:10 mikecao

What do you need @mikecao to help diagnose this? Docker nginx reverse proxy is a pretty common configuration for a bunch of people I'd imagine. I have the same issue running 2.6+

jpgnz avatar Nov 23 '23 23:11 jpgnz

同样的问题,当我使用ip加端口访问时候没问题。 反向代理,点击查看就会报这样的错误

yukikaze1234 avatar Nov 28 '23 06:11 yukikaze1234

Running umami+postgres on a VPS, server by nginx. Had the same issue.

Fixed by using the latest release tag instead of the master branch.

rm -rf node_modules
rm package-lock.json
git checkout tags/v2.8.0 -b latest-release
yarn build
pm2 start yarn -- start

Georgian avatar Dec 01 '23 10:12 Georgian

FWIW, I fixed my instance of this bug by disabling ublock origin for my Umami web console url.

ajaxbits avatar Dec 12 '23 21:12 ajaxbits

Upgrading to 2.9.0, I don't have this issue anymore.

@mikecao mentioned above that this error looked like a Next problem, and Next has been upgraded to v14.0.4 in this release.

jpgnz avatar Jan 01 '24 23:01 jpgnz

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

github-actions[bot] avatar Mar 02 '24 01:03 github-actions[bot]

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

github-actions[bot] avatar May 04 '24 01:05 github-actions[bot]

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

github-actions[bot] avatar May 11 '24 01:05 github-actions[bot]