Skip to content
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

Page becomes unreachable after a period of time #10024

Closed
luisalguien opened this issue Nov 5, 2020 · 4 comments
Closed

Page becomes unreachable after a period of time #10024

luisalguien opened this issue Nov 5, 2020 · 4 comments

Comments

@luisalguien
Copy link

I've been working on an app which uses the default service-worker but after sometime if the page is left open it will stop working showing a "Page unreachable" error until you do a hard refresh, close the tab and open a new one or until you clear the service worker cache. I've got Okta authentication implemented on my app, and when this happens I get the following error:

"Access to fetch at 'MyOktaAuthURL' (redirected from 'MySiteURL/index.html?WB_REVISION=xxxx') from origin 'MysiteUrl' has been blocked by CORS policy"

And the following error comes from the service-worker script: "Uncaught (in promise) TypeError: Failed to fetch"
Had anyone had a problem like this before?

Thanks!

@a-tonchev
Copy link

I don't know if it is related, but the CRA 4 does not provide any more service worker, you need to add it manually or use the CRA template. You can do this like here:

#10032

@luisalguien
Copy link
Author

@a-tonchev I'm not sure which CRA version was used to create this project, but the service worker do generates and I can see it on my app, and on the console I can see errors coming from it.

@stale
Copy link

stale bot commented Dec 19, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Dec 19, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants