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

TypeError: resetErrorBoundary is not a function in nested List #9806

Closed
tomek3e opened this issue Apr 30, 2024 · 1 comment · Fixed by #9824
Closed

TypeError: resetErrorBoundary is not a function in nested List #9806

tomek3e opened this issue Apr 30, 2024 · 1 comment · Fixed by #9824
Assignees
Labels

Comments

@tomek3e
Copy link

tomek3e commented Apr 30, 2024

What you were expecting:

What happened instead:
Upon API error for a List resource nested as a FormTab in another resource Edit, navigating to another FormTab causes crash with an error:

resetErrorBoundary is not a function

Other information:

  • looking at source code of ListView.tsx the resetErrorBoundary prop given to Error component is null, Error component uses useResetErrorBoundaryOnLocationChange which in turn calls resetErrorBoundary unconditionally, even if it is null.

Environment

  • React-admin version: 4.16.12
  • React version: 18.2.0
  • Browser: Chrome
  • Stack trace (in case of a JS error):
    TypeError: resetErrorBoundary is not a function at http://localhost:3000/node_modules/.vite/deps/react-admin.js?v=b8dc2963:7222:7 at commitHookEffectListMount (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:16904:34) at commitPassiveMountOnFiber (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:18152:19) at commitPassiveMountEffects_complete (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:18125:17) at commitPassiveMountEffects_begin (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:18115:15) at commitPassiveMountEffects (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:18105:11) at flushPassiveEffectsImpl (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:19486:11) at flushPassiveEffects (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:19443:22) at commitRootImpl (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:19412:13) at commitRoot (http://localhost:3000/node_modules/.vite/deps/chunk-QJV3R4PZ.js?v=4e27f65c:19273:13)
@djhi
Copy link
Collaborator

djhi commented May 2, 2024

Thanks for reporting this. Please provide a sample application showing the issue by forking the following Stackblitz (https://stackblitz.com/github/marmelab/react-admin/tree/master/examples/simple).

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

Successfully merging a pull request may close this issue.

3 participants