-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Bug]: Filed Service Worker Installation (SDK v160202) #1191
Comments
@aleksi-magner It looks like your site is currently configured to go to Make sure your server is correctly hosting the .js file. |
@jkasten2 Yes, absolutely. If you open files using separate links in a new tab, everything will load. Moreover, if you connect version 15 in the same files, in the same places, it works correctly. Firstly, all errors point to the OneSignal file being used - |
@aleksi-magner not sure which page in your site your are testing your browser with but it seems the difference might be between |
@jkasten2 I test both here and there. Initially it was necessary to replace SW in the /push/ directory. When nothing worked, I tried adding the file to the project root It's as if the script is trying to register index.html, where the OneSignal SDK is initialized, instead of registering SW from the /push/ directory |
It’s as if where there is an error about the mime type |
@aleksi-magner what status do you seen in the network tab? It is showing the service worker registering for me on the network tab: |
@jkasten2 First there was status 200, but content type html Now, after many days of attempts, the worker has finally registered. Did they change anything in the SW registration? This is a test circuit, I’m worried that this is an accident and there will be problems in production |
The file is hosted on your server, my best guess would be either caching on you server or the browser, but it could be something else on your server setup. |
It seems like I’ve already double-checked everything, all the caches, and even tried it in new browsers. Since the SW connection was ultimately successful, then I close the current problem. Thank you for your assistance |
What happened?
I can't get the Service Worker to initialize. I tried placing it both in the project root and in a separate directory. Version 15 works fine. Help me figure out what the problem might be.
At the same time, the OneSignal instance itself is seen as class nn. But it is not possible to register SW.
What browsers are you seeing the problem on?
Firefox, Chrome (Chromium)
What operating system are you running?
Linux, alpine stable version (docker image)
Steps to reproduce?
What did you expect to happen?
Successful SW registration
Relevant log output
The text was updated successfully, but these errors were encountered: