You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the drive resource: Could not parse JSON from fetching http://localhost:9883. Is it an Atomic Data resource? Error message: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
Pressing retry or cmd+shift+r fixes the issue
This issue appeared after I basically fixed the PWA. So I guess most of the PWA is now working as intended, yay!
But it seems to return a HTML page for a JSON-AD request. I think theres some content-type stuff that needs to be applied in the cache - not sure. @Polleps do you have ideas?
In generated sw.js, we see precacheAndRoute[{ url: "index.html", revision: "8a969531351da465020b0e1390a4cca4" ...], which is probably what we want - not not for JSON-AD requests.
On a related note, I notice that the service worker caches - every single HTML request. It only needs to cache ONE html response (the root), all others should not be cached.
What makes this bug really annoying, is that it disappears when I open the dev tools. Does chrome ignore service workers when tools are open?
Precache manifest
This is probably where it's at. In vite.config.js, we specify a workbox object.
EDIT: I think I 'fixed' it by ignoring index.html. Probably disables the most important advantage (caching the HTML page), but solves the issue for now.
The text was updated successfully, but these errors were encountered:
Could not parse JSON from fetching http://localhost:9883. Is it an Atomic Data resource? Error message: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
retry
orcmd+shift+r
fixes the issueThis issue appeared after I basically fixed the PWA. So I guess most of the PWA is now working as intended, yay!
But it seems to return a HTML page for a JSON-AD request. I think theres some content-type stuff that needs to be applied in the cache - not sure. @Polleps do you have ideas?
In generated
sw.js
, we seeprecacheAndRoute[{ url: "index.html", revision: "8a969531351da465020b0e1390a4cca4" ...]
, which is probably what we want - not not for JSON-AD requests.On a related note, I notice that the service worker caches - every single HTML request. It only needs to cache ONE html response (the root), all others should not be cached.
What makes this bug really annoying, is that it disappears when I open the dev tools. Does chrome ignore service workers when tools are open?
Precache manifest
This is probably where it's at. In
vite.config.js
, we specify aworkbox
object.EDIT: I think I 'fixed' it by ignoring
index.html
. Probably disables the most important advantage (caching the HTML page), but solves the issue for now.The text was updated successfully, but these errors were encountered: