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
{{ message }}
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
If the client is built to be served from the storage provider, the file pwabuilder-sw.js is still being served from the original app domain. e.g., despite everything else coming from resources.ethereralengine.com, that file is still looked for at app.etherealengine.com. The file can still be obtained from there, but via a 304, which some browsers do not accept, since they strictly expect a script file, while the 304 comes back as text/html, and is rejected.
The route can be specified in index.html:
if ("serviceWorker" in navigator) {
if (navigator.serviceWorker.controller) {
console.log("[PWA Builder] active service worker found, no need to register");
} else {
// Register the service worker
navigator.serviceWorker
.register("pwabuilder-sw.js", {
scope: "./"
})
.then(function (reg) {
console.log("[PWA Builder] Service worker has been registered for scope: " + reg.scope);
});
}
}
If the client is built to be served from the storage provider, the file pwabuilder-sw.js is still being served from the original app domain. e.g., despite everything else coming from resources.ethereralengine.com, that file is still looked for at app.etherealengine.com. The file can still be obtained from there, but via a 304, which some browsers do not accept, since they strictly expect a script file, while the 304 comes back as text/html, and is rejected.
The route can be specified in index.html:
https://stackoverflow.com/questions/56885426/using-pwa-builder-from-microsoft-uncaught-in-promise-typeerror-request-faile
The text was updated successfully, but these errors were encountered: