headplane
headplane copied to clipboard
Bundled build requests both the /admin/ and / routes for assets.
Description
I noticed the the app fails to load a tailwind CSS stylesheet:
GET https://<my-domain>/assets/tailwind-XGsKPiOx.css net::ERR_ABORTED 404
I noticed that https://<my-domain>/admin/assets/tailwind-XGsKPiOx.css properly resolves so I think the error is just that the path prefix is ignored when trying to load the tailwind stylesheet. I checked the vite config, it seems alright to me so the error should be somewhere else.
Headplane Version
v0.5.10
Headscale Version
v0.25.1
Uncaught Error: Minified React error #418; visit https://react.dev/errors/418?args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at bt (entry.client-CnoFeh7g.js:24:30893) at ds (entry.client-CnoFeh7g.js:24:75500) at Ks (entry.client-CnoFeh7g.js:24:115566) at Sd (entry.client-CnoFeh7g.js:24:115539) at md (entry.client-CnoFeh7g.js:24:115400) at Zs (entry.client-CnoFeh7g.js:24:111243) at Fs (entry.client-CnoFeh7g.js:24:121116) at MessagePort.Z (entry.client-CnoFeh7g.js:9:1621) tailwind-XGsKPiOx.css:1
Failed to load resource: the server responded with a status of 404 ()
/favicon.ico:1
Failed to load resource: the server responded with a status of 404 ()
tailwind-XGsKPiOx.css:1
Failed to load resource: the server responded with a status of 404 ()
This will be fixed in 0.6.0.
Can you test with the ghcr.io/tale/headplane:next Docker image please? Keep in mind it requires Headscale 0.26 or higher to work.
Can you test with the
ghcr.io/tale/headplane:nextDocker image please? Keep in mind it requires Headscale 0.26 or higher to work.
2025-05-16T18:30:37.908Z [config] ERROR: Error reading Headscale configuration file at /etc/headscale/config.yaml
2025-05-16T18:30:37.908Z [config] ERROR: Error: EISDIR: illegal operation on a directory, read
at async readFileHandle (node:internal/fs/promises:549:24)
at async loadConfigFile (file:///app/build/server/assets/index-BHw27Zg2.js:235492:18)
at async loadHeadscaleConfig (file:///app/build/server/assets/index-BHw27Zg2.js:235417:20)
at async file:///app/build/server/assets/index-BHw27Zg2.js:236236:7 {
errno: -21,
code: 'EISDIR',
syscall: 'read'
}
Looks like you didn't pass in the configuration correctly. It's up to you to make sure your setup is correct before I can debug issues.
no problem but still saw the same error as before
Looks like you didn't pass in the configuration correctly. It's up to you to make sure your setup is correct before I can debug issues.
entry.client-iERGfG6i.js:24 Uncaught Error: Minified React error #418; visit https://react.dev/errors/418?args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at bt (entry.client-iERGfG6i.js:24:30893) at ds (entry.client-iERGfG6i.js:24:75500) at Ks (entry.client-iERGfG6i.js:24:115566) at Sd (entry.client-iERGfG6i.js:24:115539) at md (entry.client-iERGfG6i.js:24:115400) at Zs (entry.client-iERGfG6i.js:24:111243) at Fs (entry.client-iERGfG6i.js:24:121116) at MessagePort.Z (entry.client-iERGfG6i.js:9:1621) entry.client-iERGfG6i.js:24 GET https://my-domain/assets/tailwind-BDnc2vn7.css net::ERR_ABORTED 404 (Not Found)
Are there issues with your reverse proxy? I cannot reproduce this.
Are there issues with your reverse proxy? I cannot reproduce this.
no issues did evertyhing as in docs it works but i got this error in console.
Can you share your reverse proxy configuration and build settings? Are you using a custom prefix?
version: '3.9'
services:
headplane:
image: ghcr.io/tale/headplane:next
container_name: headplane
restart: unless-stopped
environment:
- TZ=local
volumes:
- /home/user/docker/headplane/config.yaml:/etc/headplane/config.yaml
- /home/user/docker/headscale/config/config.yaml:/etc/headscale/config.yaml
- /home/user/docker/headplane/headplane-data:/var/lib/headplane
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy
labels:
traefik.enable: true
traefik.docker.network: proxy
traefik.http.routers.headplane.rule: Host(mydomain) && PathPrefix(/admin)
traefik.http.services.headplane.loadbalancer.server.port: 3000
traefik.http.services.headplane.loadbalancer.server.scheme: http
traefik.http.routers.headplane.entrypoints: https
traefik.http.routers.headplane.tls.certresolver: cloudflare
headscale:
image: headscale/headscale:0.26.0
container_name: headscale
restart: unless-stopped
command: serve
environment:
- TZ=local
volumes:
- /home/user/docker/headscale/config:/etc/headscale/
- /home/user/docker/headscale/keys:/var/lib/headscale/
networks:
- proxy
labels:
com.headplane.selector: headscale
traefik.enable: true
traefik.docker.network: proxy
traefik.http.services.headscale.loadbalancer.server.port: 8080
traefik.http.services.headscale.loadbalancer.server.scheme: http
traefik.http.routers.headscale.rule: Host(maydomain)
traefik.http.routers.headscale.entrypoints: https
traefik.http.routers.headscale.tls.certresolver: cloudflare
traefik.http.routers.headscale.service: headscale
traefik.http.routers.headscale-secure.middlewares: cors@file
traefik.http.routers.rewrite.rule: Host(mydomain) && Path(/)
traefik.http.routers.rewrite.service: headscale
traefik.http.routers.rewrite-secure.middlewares: rewrite@file
networks: proxy: external: true ``
-
http:routers: headscale: rule: 'Host(
mydomain)' service: 'headscale' middlewares: - 'cors'rewrite: rule: 'Host(
mydomain) && Path(/)' service: 'headscale' middlewares: - 'rewrite'headplane: rule: 'Host(
mydomain) && PathPrefix(/admin)' service: 'headplane'services: headscale: loadBalancer: servers: - url: 'http://headscale:8080'
headplane: loadBalancer: servers: - url: 'http://headplane:3000'
middlewares: rewrite: addPrefix: prefix: '/admin' cors: headers: accessControlAllowHeaders: '*' accessControlAllowMethods: - 'GET' - 'POST' - 'PUT' accessControlAllowOriginList: - 'https://mydomain' accessControlMaxAge: 100 addVaryHeader: true
Ok thank you, I'm able to reproduce, give me some time.
I'm going to defer this issue mostly because it doesn't break the stylesheet from loading and it seems like a weird issue with the framework build that'll require quite some time to dig through.
This was unintentionally fixed (not that it really was a problem to begin with), and will land with 0.6.1 which is coming soon.