Skip to content
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

Cannot read property '_reactInternalFiber' of null #119

Open
Alevale opened this issue Sep 17, 2019 · 7 comments
Open

Cannot read property '_reactInternalFiber' of null #119

Alevale opened this issue Sep 17, 2019 · 7 comments

Comments

@Alevale
Copy link

Alevale commented Sep 17, 2019

I updated storybook to the latest version 5.1.11 from 3.3.0-alpha.4, also I updated all of the dependencies.

Now I have a really strange issue...
When I am using mount to test the component. It happens the following.

  • The component doesn't show up in the preview
  • The error doesn't show up in the spec viewer.
  • I get the following message in the console Cannot read property '_reactInternalFiber' of null

If I use shallow everything works fine.

Also, if I change something in a file, and storybook reloads, the preview is working again, and the only issue is that some of the tests aren't passing, and saying Method “props” is meant to be run on 1 node. 0 found instead.

Anybody updated to latests in storybook and all went smooth with this plugin?

@zachmanring-natgeo
Copy link

same issue, following.

@theluk
Copy link

theluk commented Jan 24, 2020

can confirm, that the error "Cannot read property '_reactInternalFiber' of null" is occuring

"react": "16.8.6",
"react-dom": "16.8.6",
"@storybook/react": "^5.3.8",
"storybook-addon-specifications": "^2.1.3",

@Alevale
Copy link
Author

Alevale commented Jan 24, 2020

At the end what I did was to disable this plugin, and just write them using Jest.

@carmenchapa
Copy link

Any update on this? Is still happening

@wlemahieu
Copy link

wlemahieu commented Feb 19, 2020

I'm new to Storybook but have set-up Enzyme testing environments successfully a few times. I'm also running into this strange issue. My setup:

enzyme 3.11.0
enzyme-adapter-react-16 1.15.2
react 16.12.0 (and tried 16.9.0)
react-dom 16.12.0 (and tried 16.9.0)
@storybook/addon-storyshots 5.3.13
@storybook/react 5.3.13
storybook-addon-specifications 2.1.5

Hooking up Storybook to @testing-library/react works, but Enzyme is returning Cannot read property '_reactInternalFiber' of null when attempting to enzyme mount() a component.

This thread seems related, but I tend to think the issue is on the storybook side of things.
enzymejs/enzyme#2246

@mica16
Copy link

mica16 commented May 5, 2020

Some news elsewhere on this issue?
I'm still experiencing it right now.

@Alevale
Copy link
Author

Alevale commented May 5, 2020

What I did to circumvent the issue was to run a fake mount at the beginning of the build and then later run the rest as usual, not a good fix but it’s something...
Eventually I’ll remove it from my project ad it’s not what i want...

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

No branches or pull requests

6 participants