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

Plugin not working after upgrade to v1.1.2 #34

Closed
Vishnupriyaakinapelli opened this issue Nov 9, 2021 · 3 comments
Closed

Plugin not working after upgrade to v1.1.2 #34

Vishnupriyaakinapelli opened this issue Nov 9, 2021 · 3 comments

Comments

@Vishnupriyaakinapelli
Copy link

We have been using react-theming/storybook-addon for quite some time and it was working fine. After recent upgrade to v1.1.2, the plugin is not working and we are seeing theming tab with 'Waiting for data' message. Also, below console error is seen when we click on the theming tab.

vendorsmain.801c64baa44ce1fed39c.manager.bundle.js:16 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setQueryParams')
at setCurrent (vendors
main.801c64baa44ce1fed39c.manager.bundle.js:16)
at vendorsmain.801c64baa44ce1fed39c.manager.bundle.js:16
at vendors
main.801c64baa44ce1fed39c.manager.bundle.js:16
at fk (vendorsmain.801c64baa44ce1fed39c.manager.bundle.js:16)
at exports.unstable_runWithPriority (vendors
main.801c64baa44ce1fed39c.manager.bundle.js:16)
at gg (vendorsmain.801c64baa44ce1fed39c.manager.bundle.js:16)
at Oj (vendors
main.801c64baa44ce1fed39c.manager.bundle.js:16)
at Lj (vendorsmain.801c64baa44ce1fed39c.manager.bundle.js:16)
at vendors
main.801c64baa44ce1fed39c.manager.bundle.js:16
at exports.unstable_runWithPriority (vendors~main.801c64baa44ce1fed39c.manager.bundle.js:16)

This error seems to be related to the changes made in commit 8f9a3ca.

Could you please suggest if we have to make any changes in the addon usage after the recent upgrade?

@usulpro
Copy link
Member

usulpro commented Nov 9, 2021

@Vishnupriyaakinapelli we bumped dependencies recently
sorry for the inconvenience but looks like it is worth locking the previous version until we fix it

@k-harker
Copy link

I was trying to add this plugin to my existing storybook setup when I ran into this issue as well. Reverting to 1.1.1 has resolved it for me.

In my research I found that the api param was not being passed to setCurrent correctly. It is being set on window.api in the changes linked above so adding a line to the top of setCurrent in actions.js would patch it, but this doesn't seem like the appropriate fix.

if (!api) api = window.api

Once I put this in place the addon started showing the themes. I've reverted to the previous version for now and I'm looking forward to using this addon. Thanks for your work!

@usulpro
Copy link
Member

usulpro commented Nov 14, 2021

@k-harker Thanks, that helps!

Closing as it's solved now - see v1.1.3

@usulpro usulpro closed this as completed Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants