mthuret / storybook-addon-specifications

:book: Write tests next to your stories and display their results inside storybook interface
458 stars 54 forks source link

Cannot read property '_reactInternalFiber' of null #119

Open Alevale opened 5 years ago

Alevale commented 5 years ago

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.

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 commented 4 years ago

same issue, following.

theluk commented 4 years ago

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 commented 4 years ago

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

carmenchapa commented 4 years ago

Any update on this? Is still happening

wlemahieu commented 4 years ago

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

mica16 commented 4 years ago

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

Alevale commented 4 years ago

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