Between 5.1.0-rc.4 and 5.1.3, Storybook RN server is no longer refreshing stories displayed on iOS simulator.
Steps to reproduce:
1) Install @storybook/react-native-server": "5.1.3"
1) Launch storybook RN server, navigate to localhost:7007
and click on any story
2) iOS simulator shows Please open navigator and select a story to preview instead of displaying the selected story
3) Open chrome console tab, the following error is shown:
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
at sanitize (vendors~main.7825a50d99e16ac64ad5.bundle.js:21468)
at Object.selectStory (vendors~main.7825a50d99e16ac64ad5.bundle.js:11623)
at vendors~main.7825a50d99e16ac64ad5.bundle.js:9830
at vendors~main.7825a50d99e16ac64ad5.bundle.js:14220
at Array.forEach (<anonymous>)
at Channel.handleEvent (vendors~main.7825a50d99e16ac64ad5.bundle.js:14219)
at WebsocketTransport.handler (vendors~main.7825a50d99e16ac64ad5.bundle.js:14110)
at WebSocket.socket.onmessage (vendors~main.7825a50d99e16ac64ad5.bundle.js:13986)
selected story loads correctly without the above error in @storybook/react-native-server": "5.1.0-rc.4"
, but fails with error in 5.1.0-rc.5
or 5.1.3
I did a small investigation and found that if I upgraded all to 5.1.3
,
then manually restore back both @storybook/ui/dist/components/preview
and @storybook/ui/dist/containers/preview
from 5.1.0-rc.4
, then the story is once again selectable via RN server. And no lowerCase of undefined error either
I have a same problem in @storybook/react-native-server": "5.1.3"
5.1.8 is also.
Have the same issue in @storybook/react-native-server": "5.1.7"
A workaround is to refresh chrome tab every time you choose new component
We are exactly suffering the same issue, and for us is even worse, because we are using WebSockets to select the story in our Automation test to check the content is the proper one.
Thanks
@edward-s Does this screencast reflect the issue you're describing?
https://drive.google.com/open?id=1KrkFttWi__MM8C2ms3hXIr1C3YYR1VdJ
@edward-s Does this screencast reflect the issue you're describing?
https://drive.google.com/open?id=1KrkFttWi__MM8C2ms3hXIr1C3YYR1VdJ
Exactly same.
@edward-s Does this screencast reflect the issue you're describing?
https://drive.google.com/open?id=1KrkFttWi__MM8C2ms3hXIr1C3YYR1VdJ
Also reflects what I am experiencing at 5.1.9
. Also getting the toLowerCase
error in the console.
edit: Refreshing in the browser after selecting a story functions successfully as a workaround here too.
@shilman I put together a fresh expo/storybook repo to illustrate.
Repo
Screenshots & package info of step-by-step reproduction:
Screencast illustrating issue
https://drive.google.com/open?id=1KrkFttWi__MM8C2ms3hXIr1C3YYR1VdJ
Hey, I think this issue is related to #4716. It already has a fix and should be released soon.
Hey,
the fix is released in v5.2.0-alpha.35
Confirmed it's working.
For anyone wanting to save a few minutes on upgrading before testing, here's a sample repo upgraded to 35a:
It works well with
"@storybook/react-native": "5.2.0-alpha.36",
"@storybook/react-native-server": "5.2.0-alpha.36",
It works well with
"@storybook/react-native": "5.2.0-alpha.36", "@storybook/react-native-server": "5.2.0-alpha.36",
I have updated to this version and now the stories are not loading.
Did you try to start storybook with --reset-cache
?
And refresh your simulator or device that is started with storybook?
It works well with
"@storybook/react-native": "5.2.0-alpha.36", "@storybook/react-native-server": "5.2.0-alpha.36",
I have updated to this version and now the stories are not loading.
Most helpful comment
Have the same issue in @storybook/react-native-server": "5.1.7"
A workaround is to refresh chrome tab every time you choose new component