-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught (in promise) TypeError: Request scheme 'chrome-extension' is unsupported #1
Comments
I am also getting same error . |
This looks like a relevant post for this bug: https://stackoverflow.com/questions/49157622/service-worker-typeerror-when-opening-chrome-extension |
@masumonline , @InSantoshMahto, @iamshaunjp Anyone who fixed this error? |
hey, I have solved this issue in this way.
whole code for fetch event:
my service worker script: ### https://teckat.com/sw.js |
Thanks for this!! |
#1 (comment) |
Wouldn't that also detect any |
I tried adding: caches.match(evt.request).then(cacheRes => {
return cacheRes || fetch(evt.request).then(fetchRes => {
return caches.open(dynamicCacheName).then(cache => {
+ if (new RegExp('^(?:[a-z]+:)?//', 'i').test(new URL(evt.request.url).protocol) ) return;
cache.put(evt.request.url, fetchRes.clone()); According to these links: https://stackoverflow.com/a/19709846/4907950 madskristensen/WebEssentials.AspNetCore.ServiceWorker#66 But still no use. Are we sure that |
So what I did was to check if the url if it doesn't starts with http or https |
According to the comments in the solution, the code is checking if the url of the request being made contains 'http'. |
|
No, it wont. As long as the http is at index 0, that statement returns true. |
When i try to refresh the page. i get this error.
The text was updated successfully, but these errors were encountered: