-
Notifications
You must be signed in to change notification settings - Fork 663
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
iOS DefaultHttpEngine StreamingDataDelegate has a thread safety issue #6346
Comments
Hi 👋 Thanks for sending this. Any chance you can try with version |
I'm also unable to reproduce this problem with the machines I have; I'll let you know if there's any change after upgrading Apollo 4.0.0 to 4.1.0. |
Took a look at the code and I believe the issue is still there. Made a fix there: #6348 |
This is the fix I wanted to apply. Thanks! By the way, can I close this as completed? Would this fix be released in the near future by any chance? If not, I'm going to do some workarounds for this issue in our app. |
Sure thing!
We're planning a 4.1.1 release soon-ish. Hopefully next week! |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better. |
Thanks! Have a nice weekend :) |
Hey @martinbonnin 👋 do you have an update on the 4.1.1. release please? |
@jvanderwee We're working on it! In the meantime, you can always use the previews: repositories {
maven {
url = uri("https://storage.googleapis.com/apollo-previews/m2/")
}
}
dependencies {
implementation("com.apollographql.apollo:apollo-runtime:4.1.1-2025.01.21")
} They have 1 year retention. |
Version
4.0.0-rc.1
Summary
With
HttpInterceptor
, when invoking Apollo from multiple threads (e.g. usingMultithreadedDispatchers
),HashMap.put
throwsArrayIndexOutOfBoundsException
orIllegalStateException
, which is called byStreamingDataDelegate.registerHandlerForTask
. In our app on iOS 18, about 10% of the users experience this problem.Steps to reproduce the behavior
Logs
ArrayIndexOutOfBoundsException
stacktraceIllegalStateException
stacktraceThe text was updated successfully, but these errors were encountered: