-
Notifications
You must be signed in to change notification settings - Fork 27
Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'ServiceWorkerGlobalScope': 'only-if-cached' can be set only with 'same-origin' mode SOLVED #20
Comments
@MMB1983, Could you please post your |
But this issue can be closed now as the error disappeared. This might be something related with AMP pages as I do have them as well so now I will try to combine AMP and PWA. |
I keep having the same error so I added this My polished serviceworkers.js looks like this:
|
Not sure why the service worker was complaining about |
hi everyone i have this error: The FetchEvent for "https://www.stop-it.be/" resulted in a network error response: the promise was rejected. this is my code:
|
What browser are you using? Looks like there's an open bug in Chrome, where the service worker fetches can fail if developer tools are open: https://bugs.chromium.org/p/chromium/issues/detail?id=823392 |
i use the latest version of chrome. i get that error when i use lighthouse for cleaning my code, making everything nice and clean |
This error appears on my Computer 'Chrome Web Console' but the "add to home button" works perfectly over a phone with Chrome |
Did for me as well the job! Thanks a lot! |
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') return And all errors are gone :-) meanbee/magento-meanbee-pwa#20 (comment)
I am running Magento CE 1.9.3.7 and I have this error in Chrome v.64
Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'ServiceWorkerGlobalScope': 'only-if-cached' can be set only with 'same-origin' mode in serviceworker.js:67
Any idea how to solve this ?
What I also did:
I fixed problem mentioned in issue #18
I also removed comments from serviceworker.js line 7-14 due to error :
Uncaught SyntaxError: Unexpected token *
The text was updated successfully, but these errors were encountered: