Closed LordMike closed 1 year ago
Hi, thanks for reporting. I had something similar with earlier releases, but I guess I have to investigate further.
Do I understand it correctly that when this happens ZUI interface doesn't work either?
I set out to investigate why my messages weren't getting through, and then found this - I think they're not related, as after a restart messages are passed through just fine.
But yea, the ZUI is completely gone. I get the root HTML document, but all three resources (2x js and 1x css) are 404.
If I search /snap/zwave-js-ui/
for the resources that are missing, I do find them.
# find -iname registersw*
./249/lib/zwave-js-ui/dist/registerSW.js
./243/lib/zwave-js-ui/dist/registerSW.js
# find -iname index-*.js
./249/lib/zwave-js-ui/dist/assets/index-07fef15a.js
./249/lib/zwave-js-ui/dist/assets/index-c4ea8cfe.js
..
./243/lib/zwave-js-ui/dist/assets/index-06cc9b56.js
./243/lib/zwave-js-ui/dist/assets/index-e8d8cf0e.js
..
The files also have content and are world-readable.
I attached with strace, and it doesn't seem like node is making any attempt at reading the js/css files (or maybe it did, and cached the negative response).
Hi. Do you happen to get a screen like this, or is it totally blank?
Totally blank, see network view below.
As I saw my own screenshot, I had the thought that maybe the hostname was an issue.
Well.. that's stupid.. I'll make an issue with zwave-js-ui.
Ok. :) Can you link to the issue here, so I can keep track.
Also have you checked if the version in the candidate
channel has the same issues? I know we fixed some errors in a release after the swap to Vitejs
Omg. It's way worse. I was about to report it and needed reproduction steps, and I discovered that my browser has been navigating to http://zwave.home/control-panel
. If I open the root page, I get redirected to http://zwave.home/#/control-panel
If I open the first link, it consistently fails and the latter consistently works.
Zwave-js-ui must have change the url somewhat recently, but not realized they've sent a 301 (permanent redirect) that my clients have remembered -- OR my browsers just have history for the ..e.home/control-panel
link and I didn't realize.
Yes, it's correct that ZUI now uses a hash based history. @robertsLando can probably explain this in more detail.
I don't know if it's possible to redirect /control-panel
to #/control-panel
, as many have struggled with the same because of the already stored history in their browsers, including me.
Clearing the history and updating bookmarks should remove the old entries, but that's not so obvious.
Thats not at all obvious. No.
I would highly recommend a redirect (and it is possible), but I’m not going to champion it :).
Thanks for your help btw.
Mike.
Sent from Outlook for iOShttps://aka.ms/o0ukef
From: Joachim Marthinsen Giæver @.>
Sent: Thursday, September 28, 2023 5:34:14 PM
To: giaever-online-iot/zwave-js-ui @.>
Cc: Michael Bisbjerg @.>; State change @.>
Subject: Re: [giaever-online-iot/zwave-js-ui] Snap v8.24.2: Error: Not Found
in app.js on page view, blank site (Issue #4)
Yes, it's correct that ZUI now uses a hash based history. @robertsLandohttps://github.com/robertsLando can probably explain this in more detail.
I don't know if it's possible to redirect /control-panel to #/control-panel, as many have struggled with the same because of the already stored history in their browsers, including me.
Clearing the history and updating bookmarks should remove the old entries, but that's not so obvious.
— Reply to this email directly, view it on GitHubhttps://github.com/giaever-online-iot/zwave-js-ui/issues/4#issuecomment-1739549659, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH2YJ57U5CC74FSWBQWQBLX4WKHNANCNFSM6AAAAAA5IKYB2U. You are receiving this because you modified the open/close state.Message ID: @.***>
I tried to do an automatic redirect from backend but unfortunately it's not that easy as I expected as this could have some unexpected behaviors with resources, I need to do some more tests BTW there is already an open issue related to this
Thanks! :)
Mike.
Sent from Outlook for iOShttps://aka.ms/o0ukef
From: Daniel Lando @.>
Sent: Friday, September 29, 2023 11:15:20 AM
To: giaever-online-iot/zwave-js-ui @.>
Cc: Michael Bisbjerg @.>; State change @.>
Subject: Re: [giaever-online-iot/zwave-js-ui] Snap v8.24.2: Error: Not Found
in app.js on page view, blank site (Issue #4)
FYI: zwave-js/zwave-js-ui#3308https://github.com/zwave-js/zwave-js-ui/pull/3308
— Reply to this email directly, view it on GitHubhttps://github.com/giaever-online-iot/zwave-js-ui/issues/4#issuecomment-1740569561, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH2YJ2UKEJWCWVK2BET3NTX42GSRANCNFSM6AAAAAA5IKYB2U. You are receiving this because you modified the open/close state.Message ID: @.***>
Hey.
I've had some dropouts with zwave-js where I can't turn lights on/off through HA, and now it happened again so I went to investigate. (Previously I just restarted zwavejs).
The website is blank - resources like js/css is 404'd. The console logs the following. I am unsure why resources would become lost. At least now, after a restart, they're still 404.
I've switched to
candidate
(v8.25.0
) - no change I've switched toedge
(v8.26.0
) - no change