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

Uncaught TypeError: Object(...) is not a function looped error @ faker.js matchMock #155

Open
hardfi opened this issue Jan 2, 2023 · 2 comments
Labels
bug Something isn't working needs investigation

Comments

@hardfi
Copy link

hardfi commented Jan 2, 2023

Mocking requests works fine, but there's an infinite loop causing excessive resources usage, which prevents us from releasing code to server.

Screenshot 2023-01-02 at 14 40 31

Storybook configuration:

    "@dreamworld/addon-redux": "^1.1.0",
    "@storybook/addon-actions": "^6.5.15",
    "@storybook/addon-essentials": "^6.5.15",
    "@storybook/addon-links": "^6.5.15",
    "@storybook/preset-scss": "^1.0.3",
    "@storybook/react": "^6.5.15",
    "@storybook/storybook-deployer": "^2.8.16",
    "storybook-addon-mock": "3.2.0"

Downgrading to versions 3.1.0 and 3.0.0 did not help - with these versions story preview does not show at all (error).
Before adding storybook-addon-mock everything worked as expected.

The callback function in matchMock method in esm/utils/faker.js receives '/runtime-error' as a parameter (url) but there is no request like this made anywhere by the app so I assume this is some Storybook internals.

The bug is quite serious because even navigating away from the story using the storybook-addon-mock does not stop the overflow.

I'd be very happy to see a solution/work-around for this issue as it prevents us from using our most crucial stories.

Thanks!

@hanna-seraya
Copy link

happens for me as well with the latest version 4.0.0 and SB v.7

@nutboltu nutboltu added bug Something isn't working needs investigation labels Jul 5, 2023
@nutboltu
Copy link
Collaborator

nutboltu commented Jul 5, 2023

@hanna-seraya @hardfi do you have any sandbox to reproduce this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigation
Projects
None yet
Development

No branches or pull requests

3 participants