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

[5.0.0] Prop type error in the console when resizing browser window to less than 600px #5910

Closed
web-padawan opened this issue Mar 6, 2019 · 23 comments
Assignees
Labels
Milestone

Comments

@web-padawan
Copy link
Contributor

web-padawan commented Mar 6, 2019

Describe the bug
The following error appears in the console:

Warning: Failed prop type: Invalid prop `active` of type `boolean` supplied to `<<anonymous>>`, expected `number`.
    in Unknown (created by MobileLayout)
    in MobileLayout (created by ResizeDetector)
    in ResizeDetector
    in Unknown
    in Unknown (created by Manager)
    in ThemeProvider (created by Manager)
    in Manager (created by Context.Consumer)
    in Location (created by QueryLocation)
    in QueryLocation (created by Root)
    in LocationProvider (created by Root)
    in HelmetProvider (created by Root)
    in Root

To Reproduce
Steps to reproduce the behavior:

  1. Resize the window to be less than 600px
  2. See the console
  3. When refreshing page in a small window, error appears again

Expected behavior
No error in the console

Screenshots
resize-error

System:

  • OS: MacOS
  • Device: Macbook Pro 2017
  • Browser: Chrome, Firefox, Safari are affected
  • Version: 5.0.0 (edit: happens also with 5.0.0-rc.7)
@shilman
Copy link
Member

shilman commented Apr 26, 2019

Huzzah!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.35 containing PR #6241 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

@chriscarpenter12
Copy link

chriscarpenter12 commented Jun 18, 2019

I'm still seeing this same error with v5.1.8

Warning: Failed prop type: The prop `active` is marked as required in `<<anonymous>>`, but its value is `undefined`.
    in Unknown (created by MobileLayout)
    in MobileLayout (created by ResizeDetector)
    in ChildWrapper (created by ResizeDetector)
    in ResizeDetector
    in div (created by Context.Consumer)
    in Styled(div)
    in Unknown
    in Unknown (created by Manager)
    in ThemeProvider (created by Manager)
    in Manager (created by Context.Consumer)
    in Location (created by QueryLocation)
    in QueryLocation (created by Root)
    in LocationProvider (created by Root)
    in HelmetProvider (created by Root)
    in Root

@shilman shilman reopened this Jun 18, 2019
@stale stale bot added the inactive label Jul 9, 2019
@web-padawan
Copy link
Contributor Author

Can this bot be instructed to not treat the issue labelled as "bug" as inactive? 🤔

@stale stale bot removed the inactive label Jul 9, 2019
@shilman
Copy link
Member

shilman commented Jul 10, 2019

@web-padawan yes if you add the label "in progress". but AFAIK is not in progress.

@EdwardStepanian
Copy link

EdwardStepanian commented Jul 15, 2019

Hi all. I and my company front staff also faced this issue. It's not appropriate for our stakeholders to have this warning. We work hard on code quality and pay attention to any warning in console, which is important for us and our clients. If you are not going to resolve the following issue, please let us know so we can look for another platform. But we would like to see the issue resolved in yours.

@denisbabineau
Copy link

+1 if it would be more critical to me I'd investigate further but it's mostly a small nuisance at this point

@shilman shilman added the todo label Jul 24, 2019
@thejohnnybot
Copy link

+1 this issue

@selbyk
Copy link

selbyk commented Aug 14, 2019

+1

@shilman
Copy link
Member

shilman commented Aug 16, 2019

Is this still an issue in 5.2?

@immortal-tofu
Copy link

It still appears in 5.2 for me

@leepowelldev
Copy link

Can confirm I'm seeing this in 5.2 also

@hon9g
Copy link

hon9g commented Oct 1, 2019

this bug is still in

"@storybook/addon-actions": "^5.2.1",
"@storybook/addon-links": "^5.2.1",
"@storybook/addons": "^5.2.1",
"@storybook/react": "^5.2.1"

image

@stanf0rd
Copy link

stanf0rd commented Oct 1, 2019

+1 on storybook@5.2.1

@seanforyou23
Copy link

+1 this is still an issue in storybook@5.2.1

@jeremytenjo
Copy link

Still an issue in 5.2.3

@KamaKAzii
Copy link

+1

@amalv
Copy link

amalv commented Nov 11, 2019

@EdwardStepanian You could use the Storybook Viewport Addon, this way you can still see mobile view and the console won't show the error message.

@shilman
Copy link
Member

shilman commented Nov 14, 2019

@ndelangen Did this regress? #8819

@ndelangen
Copy link
Member

What makes you think it did @shilman ?

@shilman
Copy link
Member

shilman commented Nov 14, 2019

@ndelangen That somebody filed #8819 yesterday saying it did

@ndelangen
Copy link
Member

Was the PR not picked?

The new bug report has:
"@storybook/react": "5.2.6"

This PR: #8583 has the patch label, but not picked on it?

@storybookjs storybookjs deleted a comment from stale bot Nov 15, 2019
@storybookjs storybookjs deleted a comment from stale bot Nov 15, 2019
@storybookjs storybookjs deleted a comment from stale bot Nov 15, 2019
@ndelangen
Copy link
Member

I'll fix this on master too

@ndelangen ndelangen modified the milestones: 5.0.x, 5.2.x Nov 25, 2019
ndelangen added a commit that referenced this issue Nov 25, 2019
@shilman
Copy link
Member

shilman commented Nov 30, 2019

Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.7 containing PR #8941 that references this issue. Upgrade today to try it out!

Closing this issue. Please re-open if you think there's still more to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests