-
Notifications
You must be signed in to change notification settings - Fork 991
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
Connection refused when call ngsw-worker.js file and Service worker is not registering #1655
Comments
What are you doing with the service workers? |
Thanks @jcesarmobile for your reply |
So, can you provide a sample app? |
I create a sample app in this repository |
Is there any news about the matter? I am having the same issue |
So, the problem is the web worker requests don't go through the regular shouldInterceptRequest. You can use this workaround You don't need a plugin, you can use a similar code in the
But notice that it requires SDK 24 and Capacitor supports SDK 21, so it won't work on 21-23 |
This workaround doesnt work anymore with the latest webview update (v90). If the app had a worker registered, doesnt load at all, and if not, cant register the worker. For me it seems like ServiceWorkerClient gets overridden even if I am overriding it. Do you have any other workaround suggestions? |
If google broke something you’ll have to report it to google, they probably didn’t do it on purpose https://bugs.chromium.org/p/chromium/issues/list?q=component:Mobile%3EWebView |
I am making a report. Do you think is it possible to make a workaround until they fix it? The app is broken in production. Reinstalling it removes the service worker but then the modules are loaded slower from the app than from the cache. |
Did you end up making a report @kenezetele? The v91 WebView update seems to have fixed the issue |
Yes, I have made a report with a sample app to reproduce the issue. They have fixed it from there. |
When the site is served from the service worker capacitor is not injected: Issue raised here. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
I can't register service worker in capacitor webview
I used angular and capacitor 1.0.0-beta.24
I think that URL schema need to be https which service worker required, How to make this https ? or what is the suitable solution to register SW
My package.json is :
and the problem is : (This is from Android Emulator)
The text was updated successfully, but these errors were encountered: