hassio-addons icon indicating copy to clipboard operation
hassio-addons copied to clipboard

🐛 [Spotweb] CSS (and maybe more) breaks via Nabu Casa

Open fbloemhof opened this issue 2 years ago • 14 comments

Which addon?

  • Addon name : Spotweb
  • Addon version : 1.5.1-18

Describe the bug When I'm connected to HA using my Nabu Casa URL the first page of Spotweb loads fine but selecting a filter breaks the layout, the CSS is not found (404).

Seeing some errors in DevTools, it looks like the URI gets a double entry (twice api/hassio_ingress/[redacted]).

GET https://[redacted].ui.nabu.casa/api/hassio_ingress/[redacted]/api/hassio_ingress/[redacted]/?page=statics&type=css&mod=1658843593 net::ERR_ABORTED 404 (Not Found) [redacted].ui.nabu.casa/:268

GET https://[redacted].ui.nabu.casa/api/hassio_ingress/[redacted]/api/hassio_ingress/[redacted]/?page=statics&type=js&lang=nl_NL&mod=1658843593 net::ERR_ABORTED 404 (Not Found) ?page=index&search[tree]=cat0_z2_c11&search[value][]=NULL:271

Uncaught ReferenceError: initSpotwebJs is not defined at ?page=index&search[tree]=cat0_z2_c11&search[value][]=NULL:271:13

To Reproduce

Full addon log 2022/07/29 16:11:48 [error] 268#268: *1109 "/app/api/hassio_ingress/[redacted]/index.php" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /api/hassio_ingress/[redacted]/?page=statics&type=css&mod=1658843593 HTTP/1.1", host: "[redacted].ui.nabu.casa", referrer: "https://[redacted].ui.nabu.casa/api/hassio_ingress/[redacted]/?page=index&search[tree]=cat0_z2_c11&search[value][]=NULL" 2022/07/29 16:11:48 [error] 268#268: *1111 "/app/api/hassio_ingress/[redacted]/index.php" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /api/hassio_ingress/[redacted]/?page=statics&type=js&lang=nl_NL&mod=1658843593 HTTP/1.1", host: "[redacted].ui.nabu.casa", referrer: "https://[redacted].ui.nabu.casa/api/hassio_ingress/[redacted]/?page=index&search[tree]=cat0_z2_c11&search[value][]=NULL"

Full addon config

System

  • Supervisor version: 2022.07.0
  • Host system version: Home Assistant 2022.7.7

fbloemhof avatar Jul 29 '22 14:07 fbloemhof

Hi, is this new from the latest version of the addon? Or had always existed?

alexbelgium avatar Jul 29 '22 20:07 alexbelgium

I'm a new user so for me it was always existing, but I only used this version.

fbloemhof avatar Jul 30 '22 06:07 fbloemhof

Mmh I can't replicate... I'll do some more tests.

alexbelgium avatar Jul 30 '22 07:07 alexbelgium

Is it still occurring ? I could not replicate

The actual issue is : /app/api it seems that a base_url is there which should exist

alexbelgium avatar Aug 04 '22 12:08 alexbelgium

Can't notice any difference. Completely reinstalling the addon also made no difference.

Still seeing the /app/api references in the logging.

fbloemhof avatar Aug 04 '22 16:08 fbloemhof

Hi, I've pushed a new version to see if it helps

alexbelgium avatar Aug 08 '22 05:08 alexbelgium

That seems to break ngnix:

[11:37:25] INFO: Starting NGinx... nginx: [emerg] invalid variable name in /etc/nginx/servers/ingress.conf:52 s6-svscanctl: fatal: unable to control /var/run/s6/services: No such file or directory

fbloemhof avatar Aug 08 '22 09:08 fbloemhof

Thanks, I'll revert

alexbelgium avatar Aug 08 '22 10:08 alexbelgium

I've tried another thing and checked that the addon starts. However as I can't replicate I can't check if it works

alexbelgium avatar Aug 08 '22 10:08 alexbelgium

Issue still exists...

Are you using Nabu Casa to test the issue?

fbloemhof avatar Aug 08 '22 15:08 fbloemhof

I don't have nabu casa and being a paid service I don't expect to use it, but I have my own free domain name which in theory should mimick it

alexbelgium avatar Aug 08 '22 19:08 alexbelgium

I think there is a slight difference, because Nabu Casa uses some sort reverse proxy to connect (don't know the exact details).

I bought you some coffee's so you can test with it. 😄

fbloemhof avatar Aug 08 '22 19:08 fbloemhof

Thanks very much. I'm on holidays without my pc but I'll check this ASAP when I come back in 2 weeks. Btw, any chances related to ingress requires a browser cache flush to be taken into account after updating

alexbelgium avatar Aug 09 '22 04:08 alexbelgium

Take your time, enjoy your holidays and the coffee!

fbloemhof avatar Aug 09 '22 08:08 fbloemhof

Hi, thanks for your contribution! I've taken a nabu casa subscription and understand now the source of issue : a nabu casa address doesn't have a visible port and this seems to cause issues. I've pushed a new version that seems to work on my temporary address. Please make sure to clear your browser cache (or use incognito mode) to check if it makes a difference! Thanks!

alexbelgium avatar Aug 22 '22 15:08 alexbelgium

This looks promising! Will do some further testing later.

fbloemhof avatar Aug 22 '22 17:08 fbloemhof

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.

github-actions[bot] avatar Aug 28 '22 12:08 github-actions[bot]