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
[React-Native][5.1.X] addon-ondevice-notes crash on initial story selection #257
Comments
meets the same error |
It's because your default component on initial has no any notes. To avoid it, suggest to add note on every component. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Even if I add notes to every story I get
Can the workaround label be removed here? |
in ...
const { active, api } = this.props;
if (!active) {
return null;
}
const story = api
.store()
.getStoryAndParameters(this.state.selection.kind, this.state.selection.story);
const text = story.parameters[PARAM_KEY];
... where ...
if (!active) {
return null;
}
if (!this.state) {
return null;
} to make sure it comes with data before rendering the view. |
here my pr storybookjs/storybook#8152 |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
This issue is already fixed in 5.3.0-alpha.37 . Closing it. |
I am taking it back, the issue still persists. Creating a PR. |
Jeepers creepers!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.39 containing PR storybookjs/storybook#8692 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
jus curious how to fix on preview screen on 5.3 "@storybook/react-native": "5.3.25",
"@storybook/addon-notes": "5.3.21",
"@storybook/addon-ondevice-notes": "5.3.23", Simulator.Screen.Recording.-.iPhone.12.-.2021-08-23.at.18.53.18.mp4the rest work well (besides need to switch tab to update) Simulator.Screen.Recording.-.iPhone.12.-.2021-08-23.at.18.54.12.mp4(repro repo) |
@leotm the issue you are commenting on is a very old one, not sure it would be the same issue. I appreciate you providing a repro though that will help with discovering the problem. I'll take a look when I can, however I'll probably open it as a new issue. |
Describe the bug
Using the Notes add-on for the INITIAL Story that is loaded crashes the app and throws a JS error
Any Story selected after the initial one WILL NOT crash
To Reproduce
TypeError: Cannot read property of 'selection' of null
Expected behavior
Should see the text passed in (or auto-generated notes)
Screenshots
(with bug and workaround)
Code snippets
System:
Additional context
No issues pre-migration on
4.1.6
Reproducible on
5.1.9
and5.20-beta-17
The text was updated successfully, but these errors were encountered: