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

Created on 6 Mar 2019  路  23Comments  路  Source: storybookjs/storybook

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)
bug high priority ui

Most helpful comment

Still an issue in 5.2.3

All 23 comments

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.

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

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

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

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.

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

+1 this issue

+1

Is this still an issue in 5.2?

It still appears in 5.2 for me

Can confirm I'm seeing this in 5.2 also

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

+1 this is still an issue in [email protected]

Still an issue in 5.2.3

+1

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

What makes you think it did @shilman ?

@ndelangen That somebody filed #8819 yesterday saying it did

Was the PR not picked?

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

This PR: https://github.com/storybookjs/storybook/pull/8583 has the patch label, but not picked on it?

I'll fix this on master too

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dependencies[bot] picture dependencies[bot]  路  142Comments

bpeab picture bpeab  路  70Comments

joeruello picture joeruello  路  79Comments

43081j picture 43081j  路  61Comments

EdenTurgeman picture EdenTurgeman  路  81Comments