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

[Bug]: Warning: Unknown: key is not a prop #23903

Closed
n19htz opened this issue Aug 21, 2023 · 7 comments · Fixed by #23935
Closed

[Bug]: Warning: Unknown: key is not a prop #23903

n19htz opened this issue Aug 21, 2023 · 7 comments · Fixed by #23935

Comments

@n19htz
Copy link

n19htz commented Aug 21, 2023

Describe the bug

Error happens on the tab of "Tests" added by @storybook/addon-jest

Screenshot 2023-08-21 at 13 40 01
Screen.Recording.2023-08-21.at.13.15.04.mov

Related: #23782

To Reproduce

  1. Create a new Storybook project
  2. Install and setup @storybook/addon-jest
  3. Create story with tests following @storybook/addon-jest readme
  4. Run storybook and click on tab "Tests "

System

Environment Info:

  System:
    OS: macOS 13.5.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.5.1 - ~/Library/Caches/fnm_multishells/32486_1692610196765/bin/node
    npm: 9.8.0 - ~/Library/Caches/fnm_multishells/32486_1692610196765/bin/npm
  Browsers:
    Chrome: 115.0.5790.170
    Safari: 16.6
  npmPackages:
    @storybook/addon-backgrounds: 7.3.2 => 7.3.2 
    @storybook/addon-controls: 7.3.2 => 7.3.2 
    @storybook/addon-jest: 7.3.2 => 7.3.2 
    @storybook/addon-toolbars: 7.3.2 => 7.3.2 
    @storybook/addon-viewport: 7.3.2 => 7.3.2 
    @storybook/angular: 7.3.2 => 7.3.2 
    @storybook/core-common: 7.3.2 => 7.3.2 
    @storybook/core-server: 7.3.2 => 7.3.2 
    @storybook/jest: 0.2.1 => 0.2.1 
    @storybook/test-runner: 0.13.0 => 0.13.0 
    @storybook/testing-library: 0.2.0 => 0.2.0

Additional context

No response

@Romainpetit
Copy link

Related: #23782

Replacing storybook-addon-designs for @storybook/addon-designs solved the issue for me.

@n19htz
Copy link
Author

n19htz commented Aug 21, 2023

Related: #23782

Replacing storybook-addon-designs for @storybook/addon-designs solved the issue for me.

In my case it has nothing to do with "addon-designs", since I don't use it

@Hamza-Rafique
Copy link

facing the same warnings.

@n19htz n19htz changed the title [Bug]: render: key is not a prop [Bug]: Warning: Unknown: key is not a prop Aug 22, 2023
@vanessayuenn vanessayuenn moved this to Empathy Backlog in Core Team Projects Aug 23, 2023
kasperpeulen added a commit that referenced this issue Aug 24, 2023
kasperpeulen added a commit that referenced this issue Aug 24, 2023
@github-project-automation github-project-automation bot moved this from Empathy Backlog to Done in Core Team Projects Aug 24, 2023
@unional
Copy link
Contributor

unional commented Oct 18, 2023

Hi, still seeing this on 7.4.5:

chunk-QMHPSTMR.js:3 Warning: render: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)
    in render
    in div (created by Styled(div))
    in Styled(div)
    in div (created by Styled(div))
    in Styled(div)
    in Unknown
    in Unknown
    in Unknown
    in Unknown (created by ManagerConsumer)
    in ManagerConsumer (created by Panel2)
    in Panel2 (created by Layout)
    in div (created by Styled(div))
    in Styled(div) (created by Panel)
    in Panel (created by Layout)
    in div (created by ToggleVisibility)
    in ToggleVisibility (created by QueryLocation)
    in QueryLocation (created by QueryMatch)
    in QueryMatch (created by Route)
    in Route (created by Layout)
    in div (created by ToggleVisibility)
    in ToggleVisibility (created by QueryLocation)
    in QueryLocation (created by QueryMatch)
    in QueryMatch (created by Route)
    in Route (created by Layout)
    in div (created by Styled(div))
    in Styled(div) (created by Main)
    in div (created by Styled(div))
    in Styled(div) (created by Main)
    in Main (created by Layout)
    in Layout (created by WithTheme(Layout))
    in WithTheme(Layout)
    in Unknown (created by App)
    in div (created by Styled(div))
    in Styled(div) (created by App)
    in App
    in ThemeProvider
    in Unknown (created by ManagerConsumer)
    in ManagerConsumer (created by Manager)
    in EffectOnMount (created by Manager)
    in Manager (created by QueryLocation)
    in QueryLocation (created by Main2)
    in Main2 (created by Root4)
    in Router (created by LocationProvider)
    in LocationProvider (created by Root4)
    in HelmetProvider (created by Root4)
    in Root4

@ndelangen
Copy link
Member

@unional can you share more information?

Could you upgrade to the latest version of storybook and try again?

Can you tell us which addon this warning is originating from?

@unional
Copy link
Contributor

unional commented Oct 19, 2023

Thanks.

I looked into that and notice it is coming from storybook-addon-designs@^7.0.0-beta.2.

I think the addon is not being maintained?

I'm using it for storybook -> figma integration.

@ndelangen
Copy link
Member

That should have been fixed in this PR:
storybookjs/addon-designs#207

https://github.com/storybookjs/addon-designs

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

Successfully merging a pull request may close this issue.

6 participants