-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Service Worker and React state on mobile Chrome #2413
Comments
This doesn’t sound related to service workers. |
|
I’d be surprised if this has anything to do with being offline. Have you checked if it’s just a Chrome mobile bug? |
Thank you very much for help, I should've done this first. It was 'Error during service worker registration: DOMException: Only secure origins are allowed'. |
Hmm, I want to understand what it means. cc @jeffposnick |
"During development you'll be able to use service worker through localhost, but to deploy it on a site you'll need to have HTTPS setup on your server." For my mobile it wasn't localhost, for my desktop it was. |
While it's true that you can't register a service worker when you're on a You'll see an error message logged to the console letting you know what's going on, but the lack of a service worker does not prevent the rest of your runtime code from executing. |
Ah okay. I thought it was a real runtime error 😛 @ToherIman Did you figure out what was causing the issue? Again, doesn’t seem like service workers would be related to range inputs. |
I'm getting a Service Worker error on MacOS Chrome v58.0.3029.110 (64-bit) at runtime. My app is pretty basic at this stage. It's being deployed to an intranet host. Here's the package.json:
Seeing this in the console: Error during service worker registration: DOMException: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV). Seems to be failing in the following block of code:
Runs fine on the dev server during development. Only fails when deployed to the intranet production host. |
That's expected; there's more detail on that page you linked to, and in the c-r-a documentation, including a description how If you'd like to use service workers on any non- Your web app will continue working without service worker support in the meantime, and you can remove the line of code that attempts service worker registration if you know that you're deploying to an HTTP-only environment. |
Thanks. I've disabled the service workers code. I also had an issue where the homepage was located in a location other than the root. While I'd specified the "homepage" attribute in my package.json, I also needed to update my routes in the source code to reflect the appropriate path to the app when deployed to the sub-folder. |
Hi.
Thanks for adding Service Worker to template.
I have app that renders(re-renders) svg based on user input, it is stored in React state. It all works in Chrome desktop (offline), but I can't change input values after going offline on mobile (Chrome 58). Am I using Service Worker incorrectly? Should I store state somewhere else?
Thanks.
The text was updated successfully, but these errors were encountered: