storybookjs/storybook

[Bug]: Composition - initial loading state looks like the error state

Open

#21,509 opened on Mar 9, 2023

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (89,909 stars) (10,058 forks)batch import
bugcompositionhelp wantedsev:S3

Description

Describe the bug

When compositing a ref it looks like it's initially erroring, then loads anyway.

When there's an actual error (reported the CORS error in #21501 and #21500 ) it can get stuck in the loading state, and not show the error state.

When trying to compose https://59c59bd0183bd100364e1d57-jjsanukdmo.chromatic.com/ (private Chromatic from Chromatic) I get the following error on the browser:

Access to fetch at 'https://59c59bd0183bd100364e1d57-jjsanukdmo.chromatic.com/index.json' from origin 'http://localhost:6006/' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.

Additionally, the sidebar and tooltip stay in an infinite loading state

To Reproduce

  • add a ref
  • load the storybook
  • look at the sidebar as storybook loads

System

No response

Additional context

No response

Contributor guide