This repository was archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 767
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
MockedProvider - Cannot read property 'registeredQueries' of undefined #2738
Copy link
Copy link
Closed
Labels
Description
Intended outcome:
MockedProvider works in storybook(?) without error.
Actual outcome:
Cannot read property 'registeredQueries' of undefined
TypeError: Cannot read property 'registeredQueries' of undefined
at MockedProvider.push../node_modules/react-apollo/test-utils.js.MockedProvider.componentWillUnmount (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:672705:35)
at callComponentWillUnmountWithTimer (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:692391:12)
at HTMLUnknownElement.callCallback (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:676475:14)
at Object.invokeGuardedCallbackDev (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:676525:16)
at invokeGuardedCallback (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:676582:31)
at safelyCallComponentWillUnmount (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:692398:5)
at commitUnmount (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:692772:11)
at commitNestedUnmounts (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:692803:5)
at unmountHostComponents (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:693064:7)
at commitDeletion (http://localhost:6016/vendors~main.92813365353641d68d2e.bundle.js:693116:5)
How to reproduce the issue:
On initial click on a story, everything is good. Switch to a different story- good. Switch back to the first story- boom.
This appears to be a race condition that is adjacent to what we saw in #2164 and @danilobuerger fixed in #2165. I have spotted a potential root cause - working on it and PR now.
Version
Reactions are currently unavailable