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

[Development mode] History navigation causes Relay to access a disposed preloadQuery #68

Open
Kingdutch opened this issue Jul 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Kingdutch
Copy link
Collaborator

Steps to reproduce

  1. On master branch open the app in development mode
  2. Go to /
  3. Click "Todos", you're now on /todos
  4. Hit the browser back button

Could not reproduce in production mode by running yarn build && yarn preview.

Error

Warning: usePreloadedQuery(): Expected preloadedQuery to not be disposed yet. This is because disposing the query marks it for future garbage collection, and as such query results may no longer be present in the Relay store. In the future, this will become a hard error. 
Layout@http://localhost:9999/src/components/Layout.mjs:101:18
RelayRouter$RouteComponent@http://localhost:9999/router/RelayRouter.mjs:178:3
RelayRouter$RouteRenderer@http://localhost:9999/router/RelayRouter.mjs:182:23
ErrorBoundary@http://localhost:9999/node_modules/.vite/deps/@rescript_react_src_RescriptReactErrorBoundary_mjs.js?v=0d390227:12:16
App
ErrorBoundary@http://localhost:9999/node_modules/.vite/deps/@rescript_react_src_RescriptReactErrorBoundary_mjs.js?v=0d390227:12:16
Suspense
RescriptRelay$Context$Provider@http://localhost:9999/node_modules/.vite/deps/rescript-relay_src_RescriptRelay_mjs.js?v=0d390227:353:21
Main@http://localhost:9999/src/Main.mjs:11:21
@Kingdutch Kingdutch added the bug Something isn't working label Jul 7, 2022
@zth
Copy link
Owner

zth commented Jul 7, 2022

Interesting! Will have a look.

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

No branches or pull requests

2 participants