storybook-addon-specifications icon indicating copy to clipboard operation
storybook-addon-specifications copied to clipboard

Cannot read property '_reactInternalFiber' of null

Open Alevale opened this issue 4 years ago • 7 comments

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?

Alevale avatar Sep 17 '19 09:09 Alevale

same issue, following.

zachmanring-natgeo avatar Oct 28 '19 18:10 zachmanring-natgeo

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",

theluk avatar Jan 24 '20 14:01 theluk

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

Alevale avatar Jan 24 '20 14:01 Alevale

Any update on this? Is still happening

carmenchapa avatar Feb 10 '20 14:02 carmenchapa

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. https://github.com/airbnb/enzyme/issues/2246

wlemahieu avatar Feb 19 '20 17:02 wlemahieu

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

mica16 avatar May 05 '20 17:05 mica16

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...

Alevale avatar May 05 '20 18:05 Alevale