Replies: 5 comments 1 reply
-
Found a related issue: #15659 Changing globals reloads the documentation pageThis is related to Changing globals fails in some cases
storybook/code/lib/channels/src/postmessage/index.ts Lines 218 to 219 in 38dfc50 I'm not familiar with the code, so not sure why we need different logic on docs page and preview page. rawEvent.origin is always defined, but in that function the code looks for the source, which is not available sometimes. The strange part is that in some cases it works. A couple of components always work, others mostly fail, some fails in a way that changing the global doesn't even happen - which is the most frustrating part of this. (again, some of this is guessing)
So if I change that like to event.source = rawEvent.origin; this issue goes away. Most probably there's a reason this needs to happen, but want to say that the issue is in |
Beta Was this translation helpful? Give feedback.
-
Hello. I've ran into something similar. The same issue happens to me in docs pages with "larger" stories. It indeed seems to be some race condition since the issue happens more frequently when stories grow bigger. It also happens more frequently in development than in production builds. I've made a reproduction repo and hosted it with Chromatic here. I have use Material-UI but I don't think that is the actual cause. It seems to happen without MUI as well as long the render phase of the story is long/heavy. |
Beta Was this translation helpful? Give feedback.
-
Thanks @nukemonk, awesome example. Referenced this in the related issue. |
Beta Was this translation helpful? Give feedback.
-
Any news on this? Experiencing it on |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue on 8.6.0 |
Beta Was this translation helpful? Give feedback.
-
Summary
Maybe these are two separate issues
ThemeProvider
?)Anyone ran into something similar?
Additional information
Here's a video of it:
https://github.com/storybookjs/storybook/assets/10765158/2d28e389-36e5-48a9-ac95-a69cc37da7b4
And here's the error message:

The error message in text:
manager - received storyRenderPhaseChanged but was unable to determine the source of the event
manager - received globalsUpdated but was unable to determine the source of the event
And here's the relevant part of the
preview.tsx
:Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions