Closed foobartel closed 3 years ago
I couldn't reproduce the issue on Windows & Chrome.
I think this issue and https://github.com/getkirby/kirby/issues/3508#issuecomment-878153547 are related/same cause and there's something wrong (bug or setup) with the network communication.
Especially reading
The FetchEvent for "https://foobartel.local:8890/panel/login" resulted in a network error response: an "opaqueredirect" type response was used for a request whose redirect mode is not "manual".
What makes me wonder right now is the mention of serviceworker.js
- where does that file originate in our setup? Or is it from a plugin @foobartel?
The serviceworker.js
is a single file that runs on my site and caches things, e.g to display when offline, etc. Could have something to do with it in that case. Not sure why it would cache the panel, but the panel might need to be excluded I would assume…
Based on the error message, I would think that this service worker.js is doing something that corrupts the Panel's requests
I think I would agree ;) It works fine and as expected with 3.5.6 and 3.5.7, so I assume something changed in 3.6 that triggers this issue.
That's true, it surely origins from the switch to our new Fiber framework handling those requests: https://github.com/getkirby/kirby/blob/develop/panel/src/config/fiber.js
Maybe you could share the serviceworker.js
, so we could look into it together and see if we find what's going wrong.
Sure, happy to try and do that! The service worker can be found here: https://foobartel.com/serviceworker.js As far as I can tell it should not do anything with the panel, but apparently that might not be correct…
Original source mentioned at the top, maybe this last comment on source has something to do with it? https://gist.github.com/adactio/fbaa3a5952774553f5e7#gistcomment-3557236
And how does serviceworker.js
get loaded?
I would think it's somehow loaded in the context of the Panel as well and this line https://gist.github.com/adactio/fbaa3a5952774553f5e7#file-basicserviceworker-js-L48 starts grabbing our fetch
requests.
Looks like it, even though it should not work in the panel context… Currently the SW is loaded with <link rel="serviceworker" href="/serviceworker.js">
in a header.php
snippet.
Any clues from the console/Network developer tab how/where the SW script is loaded inside the Panel?
Apologies for the delayed follow-up on this. I could not find any further info on this and it's a mystery to me how the serviceworker made it into the panel.
The good news is that this error does not persist in the latest release 3.6.0-alpha.2. I think this issue can be closed. Thanks!
Describe the bug
When trying to log in, nothing happens after 'enter' or clicking the login button. When I then reload the page, I am logged in and the panel opens. Network panel says the login fetch failed.
Screenshots
Kirby Version
3.6.0-alpha.1
Console output
Desktop (please complete the following information):