zigbee2mqtt-frontend icon indicating copy to clipboard operation
zigbee2mqtt-frontend copied to clipboard

Can't serve Z2M on a custom domain

Open denysdovhan opened this issue 3 years ago • 6 comments

What happened?

I'm trying to expose Z2M on a custom domain, let's say mydomain.com.

I've set up a Nginx Proxy Manager configuration forwarding from zigbee.domain.com to local 192.168.0.x:8080. When I try to open 192.168.0.x:8080 it works fine and frontend loads.

However, when I'm trying to open zigbee.domain.com I get an empty page and an error message in a console:

Uncaught SyntaxError: Invalid or unexpected token (at index.5094f535.js:1:5493)

I have tried configuring an auth-token and url, like this, but it doesn't help:

frontend:
  auth_token: super-secred
  url: https://zigbee.domain.com

The issue is present in Chrome, Safari, and Firefox.

Dump of state: state.json.zip

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

Relevant stacktrace

Uncaught SyntaxError: Invalid or unexpected token (at index.5094f535.js:1:5493)

Did you download state.json.zip?

I will attach state.json.zip

denysdovhan avatar Jun 30 '22 15:06 denysdovhan

I rolled back from 1.25.2 to 1.25.1 and it works fine.

denysdovhan avatar Jun 30 '22 15:06 denysdovhan

hi, have you tried following this manual?

https://www.zigbee2mqtt.io/guide/configuration/frontend.html#nginx-proxy-configuration

nurikk avatar Jul 10 '22 05:07 nurikk

I did. But this docs doesn't seem relevant, since the issue is present in Firefox as well as in Webkit browsers.

denysdovhan avatar Jul 10 '22 10:07 denysdovhan

I'm also experiencing this issue on a custom domain. The frontend shows no devices or anything

lexiismadd avatar Jul 29 '22 06:07 lexiismadd

I did. But this docs doesn't seem relevant, since the issue is present in Firefox as well as in Webkit browsers.

do you have basic http authentication enabled?

nurikk avatar Jul 29 '22 06:07 nurikk

I don't

lexiismadd avatar Jul 29 '22 07:07 lexiismadd

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 30 '22 19:09 stale[bot]

The issue was resolved for me.

denysdovhan avatar Oct 03 '22 08:10 denysdovhan