-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
App crashes after updating from Relay 7 to Relay 11 with undefined operation #104
Comments
Hi @high-performance-hery, |
Hi @morrys, that makes sense, think we might've missed that. Thank you! |
@morrys We've implemented the store migration as follow but the crash still occurs.
|
Do you have the same error or a different one? Does the application use server side rendering? The default merge function is this here: The merge function has two parameters, restoredStare & initialState In case initialState is populated, the merge function should return the merge between restoredState & initialState If both are empty, you have nothing to migrate and you can return {} |
Hi @morrys ..sorry for the delay here. I’ve only just got round to being able to recreate the bug. Does this make sense in our context?
Our merge function is this one. I tried merging initialState and restoredState as follows, but I have the same issue:
|
Can you change this piece of code in node_modules like this below and send me this information in a readable way? console.log("this._roots.values()", this._roots.values());
for (const rootValue of this._roots.values()) {
console.log("rootValue", rootValue);
const {operation} = rootValue;
const selector = operation.root;
RelayReferenceMarker.mark( Thank you |
can you send me the piece of code where you create the environment, store and record source? |
Actually one question while I grab that information - I have tried to follow the setup here. Should we add We currently have it in |
After upgrading from Relay 7 to Relay 11, we've been having a crash in our app that's quite hard to reproduce.
It seems to happen when we open from the background using a useQuery hook with fetch policy 'store-then-network', so it must be booting from the offline store. Previously we were using a QueryRenderer.
We upgraded from those versions:
to the following versions
Remote Sentry stack trace
Local stack trace
The text was updated successfully, but these errors were encountered: