-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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 response error" after upgrade to CRA3 #7537
Comments
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. |
Yea, I did not expect much from this. The current workaround is to disable service worker based on UA. It's far from ideal, but I wasn't able to find a culprit. |
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. |
can you make a small repo contains this issue for example? |
@pierreneter Thanks for the response. I wasn't even able to reproduce it reliably myself. It's one of those random errors, but frequent enough to be considered the issue. Besides, I am not really sure how I would reproduce here something that happens in WebView in Android devices. The current workaround of disabling service worker in WebView seems to be sufficient although not ideal for sure. I was mostly hoping here that someone might have experienced something similar and point me in some direction, but so far it doesn't seem to be the case. |
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. |
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. |
We have the CRA3 app (react-scripts 3.1.1, not ejected) that is just fine across multiple platforms and devices. But one specific case is Android native app which runs the app in Google WebView (wrong business decision, don't ask).
Sadly, the problem is rather random and happens on app reload where service worker responds with code 500 and fails to provide one or more of the chunks. There are no further details for the error. Also, no app updates happen during that time. I can even disconnect from the network and it still happens.
With CRA2 it works just fine. Even if I simply downgrade to latest
react-scripts@2
, make a build, the problem never occurs.Looking through changelog only possible suspect seems upgrade of workbox to V4.
ping @r0ughnex as the author of #6725 and possibly @rovansteen who was trying help me in #6243 and @jeffposnick as a Google guy :)
In case it's relevant, we have pretty much the same
service-worker.js
that is shipped with CRA except some extra hooks to detect updates and such. Then we have this ugly script that's shipped inside the build and injected into a workbox setup with customize-cra. It's used topostMessage
from the app when a user clicks on "update now" button.The text was updated successfully, but these errors were encountered: