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

Storybook keeps reloading when this add-on is enabled #113

Open
szymonnowak-st opened this issue May 22, 2023 · 2 comments
Open

Storybook keeps reloading when this add-on is enabled #113

szymonnowak-st opened this issue May 22, 2023 · 2 comments

Comments

@szymonnowak-st
Copy link

szymonnowak-st commented May 22, 2023

Hi!

I've got an issue that whenever this add-on is enabled and Chrome dev tools is opened, Storybook keeps reloading the page, which makes it impossible to use. When I unregister the worker (via Chrome dev tools: Application -> Storage -> Clear site data), it stops reloading, but then when I manually reload the page it starts reloading the page constantly again. When I close Chrome dev tools it works again.

Has anyone else encountered such behavior before? It happens in incognito mode as well, so it's most likely not caused by some extensions, but rather because of some strange setting that I have enabled. It only happens in Chrome for me, it works correctly in Firefox and Safari. Other people on the team do not have this issue...

I'm using storybook/react 6.5.16, msw 1.2.1, and msw-storybook-addon 1.8.0 and webpack 5.

Unfortunately, I don't have a small example that reproduces this problem, but I recorded a video:

msw-storybook-addon-issue.mp4
@boonya
Copy link

boonya commented Nov 20, 2023

Do you use mock service worker? Because I do. Once removed the issue disappeared.
I am just trying to say that the root cause somewhere under the hood of MSW, maybe.

P.S. Sorry, I see you use it.

FYI, in my case

  • storybook: ^7.5.3
  • msw: ^1.3.2
  • msw-storybook-addon: ^1.10.0

@boonya
Copy link

boonya commented Nov 20, 2023

P.S.
Upgrade to

  • msw-storybook-addon@2.0.0--canary.122.b3ed3b1.0
  • msw@2.0.8

did not help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants