Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Circular json can possibly hang. #26

Open
rhalff opened this issue Nov 2, 2016 · 3 comments
Open

Circular json can possibly hang. #26

rhalff opened this issue Nov 2, 2016 · 3 comments

Comments

@rhalff
Copy link

rhalff commented Nov 2, 2016

It can be replicated by replacing circular with something like window within:

https://github.com/kadirahq/storybook-addon-actions/blob/master/.storybook/stories.js#L20

The click on the circular button will cause the action to never be logged.

I've tried replacing json-stringify-safe with circular-json which seems to behave better.
But even then after the 4th click circular-json will throw a circular reference error.

I now know how to circumvent this by just not logging something with circular references, however when this bug is encountered it's not immediately clear the hang originates from within storybook which makes one try to debug the application code itself first.

I think replacing json-stringify-safe with circular-json would already be an improvement.

@thani-sh thani-sh self-assigned this Nov 2, 2016
@leMaik
Copy link

leMaik commented Nov 2, 2016

Also facing this problem... Wasted hours just to find out that storybook caused this. 😢

@arunoda arunoda added the bug label Nov 5, 2016
@jonnyelliot
Copy link

Also hit this issue.

@ndelangen
Copy link
Contributor

A PR fixing this would be super welcome! Would you care to give it a go @rhalff ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

6 participants