Skip to content

fix: storybook infinite loading#9752

Open
nwidynski wants to merge 1 commit intoadobe:mainfrom
nwidynski:fix-http-proxy-middleware
Open

fix: storybook infinite loading#9752
nwidynski wants to merge 1 commit intoadobe:mainfrom
nwidynski:fix-http-proxy-middleware

Conversation

@nwidynski
Copy link
Contributor

@nwidynski nwidynski commented Mar 6, 2026

Fixes storybook loading times, and especially it getting stuck loading. It was driving me insane 😅

This switches to native http API and also forces an IPv4 host bind. I haven't bothered investigating for the root cause in http-proxy-middleware, but I tried upgrading to v3 to no avail.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@snowystinger
Copy link
Member

Looks like yarn install should be run to update the lock file

Can you describe how to reproduce the infinite loading? I'm not really sure what you're referring to. Also, how this fixes it? I know you said you didn't look into the root cause, so I'm curious how you decided to try this.

@nwidynski
Copy link
Contributor Author

@snowystinger I quite frankly dont know how to reproduce if you havent encountered it 😅

Sometime recently, my local storybook started exhibiting increadibly slow full page reload times. Like taking 20+ seconds to do a page refresh, at times completely bricking up the tab in the process. Either the entire page was getting stuck loading, or at least the iframe was. A clean build or install did not change a thing also.

I narrowed it down to the parcel server dropping middleware requests but leaving the connection left open, causing storybook to hang indefinitely waiting for its response. This gets progressively bad over time it looked like, so somewhere there is probably a memory leak - again, havent bothered. Using native http does not exhibit the issue for the most part.

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

Successfully merging this pull request may close these issues.

2 participants