Skip to content

Error with service worker when depoloying to firebase #60

@andrantis

Description

@andrantis

I'm seeing a bunch of erros (below) in the browser console after deploying a newly created app to firebase. Looks like the sw is referencing my local files instead of the ones in the server.

I'm on Windows 10 and I had a similar issue with create-react-app that they fixed with this commit: facebook/create-react-app@22ca584

sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/2.chunk.dee19c0c2b89ad8a3492.js?_sw-precache=cecc045fb475b3d5f4f96d2140782cf1. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/assets/favicon.ico?_sw-precache=53ac170e970ad034a55ee15ce198708c. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/assets/icons/android-chrome-192x192.png?_sw-precache=1ea58b225a597f78adfd987ed164e573. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/assets/icons/android-chrome-512x512.png?_sw-precache=b65626103d4cd30abdb0423e6ab15179. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/assets/icons/apple-touch-icon.png?_sw-precache=4e32b9c4edcb5babb823e4824f90bb8d. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/assets/icons/favicon-16x16.png?_sw-precache=2cbedfd68f59e42b0d03ba3946863ee7. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/assets/icons/favicon-32x32.png?_sw-precache=b9108564a20f06675f60b29337c71b3e. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/assets/icons/mstile-150x150.png?_sw-precache=3eb725b0686148a67f2feb546670b313. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/bundle.js?_sw-precache=d5bb8d2c92704cc0f102c0896195782e. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/favicon.ico?_sw-precache=53ac170e970ad034a55ee15ce198708c. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/index.html?_sw-precache=f1b6dd4db31797ed11807b114bcbdae2. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/manifest.json?_sw-precache=409a6ab1239000b8c4b64cf7c808d616. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/polyfills.chunk.906967bd865a58e79868.js?_sw-precache=fc493e4fc1f1a71239b36865099aaf69. URL scheme must be "http" or "https" for CORS request. (anonymous) @ sw.js:1 (anonymous) @ sw.js:1 sw.js:1 Fetch API cannot load file:///D:/projects/pwa/preact/one/build/style.css?_sw-precache=3ce120ab4c8b971cba535fc84d789361. URL scheme must be "http" or "https" for CORS request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions