-
Notifications
You must be signed in to change notification settings - Fork 730
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
Crash in GraphQLQueryWatcher.cancel()
and GraphQLQueryWatcher.refetch()
#3476
Comments
Updated - also hitting on |
GraphQLQueryWatcher.refetch()
GraphQLQueryWatcher.cancel()
and GraphQLQueryWatcher.refetch()
I was going to ask if you're able to reproduce this in a standalone project that we can debug because we have tests that use both those methods without error.
But..based on your other comment I wonder if this crash is because of how you're manipulating the cache by deleting the object but not updating the lists that reference that object. So the subsequent fetch is looking for a cache object that isn't there. Why it's crashing on cancel though I'm not sure. 🤔 |
ahh, that's a good thought but it was crashing before I added that. |
also seeing the issue on v1.15.3. in case it's relevant I am on Xcode 15.4, macOS 14.5, building against Swift 5, targetting macOS 13.1 |
What happens if you call
We run our unit tests on both Xcode 15.4 and Xcode 16.1 so the tests I referenced earlier are being run on the same platform as you. Shouldn't really matter though. |
I tracked the problem down, it was due to us linking against Apollo libs twice (once in our networking framework and once in the app). Please feel free to close this issue. |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better. |
Summary
When I attempt to call
refetch()
orcancel()
on a GraphQLQueryWatcher i get anEXC_BAD_ACCESS
.refetch()
it's inGraphQLQueryWatcher.fetch()
on the first line ($fetching.mutate {
).cancel()
it's on the first line of thecancel()
funcfetching.cancellable?.cancel()
Version
1.15.1
Steps to reproduce the behavior
refetch()
is being called from the main thread of my app. I have verified that I'm also creating theGraphQLQueryWatcher
on the main thread. I've also tried usingrefetch()
in a detached Task (Task.detached
), which doesn't help either.Logs
Anything else?
No response
The text was updated successfully, but these errors were encountered: