Skip to content

MSW fails to start on Safari #1011

Answered by ggascoigne
ggascoigne asked this question in Q&A
Discussion options

You must be logged in to vote

I think that I've got it.

If you've followed one of the create-react-app templates that uses service-workers (e.g.
https://github.com/facebook/create-react-app/blob/3.x/packages/cra-template-typescript/template/src/index.tsx#L17
), then the call to serviceWorker.unregister() breaks msw registration on Safari. Remove this line and everything is back to working.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kettanaito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant