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

fix: ApolloServerInterceptor httpCall is now cloned to prevent "Illeg… #386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

reguez
Copy link

@reguez reguez commented Mar 23, 2022

fix: ApolloServerInterceptor HTTP call is now cloned to prevent "IllegalStateException: Already executed"

Issue #, if available:
IllegalStateException is raised when a Call is used multiple times

Description of changes:
use call.clone().enqueue(..) for Asynchronous and call.clone().execute() for Synchronous respectively to ensure that you have a fresh, unexecuted Call for each request.

Screen Shot 2022-03-23 at 1 41 43 PM

@gpanshu
Copy link
Contributor

gpanshu commented Apr 7, 2022

@reguez can you please identify how you trigger the issue so that we can test your solution out?
Specifically what you are trying to do, how do you call the api (in what context) and please add some sample code if you can.

@reguez
Copy link
Author

reguez commented Apr 12, 2022

@gpanshu
Sadly I wasn't able to reproduce the issue myself but one of the users did. I was able to extract the log from crashlytics
Fatal Exception: java.lang.IllegalStateException: Already Executed at okhttp3.internal.connection.RealCall.enqueue(RealCall.kt:161) at com.apollographql.apollo.internal.interceptor.ApolloServerInterceptor$1.run(ApolloServerInterceptor.java:91) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:920)

 Other than that I couldn't pinpoint the source origin from my code base

@oussama-reguez
Copy link

@gpanshu when can we expect an update? Multiple clients are experiencing this issue.

@poojamat
Copy link

poojamat commented Aug 1, 2022

@oussama-reguez could you please provide steps for reproduction?

@oussama-reguez
Copy link

@poojamat as explained here I couldn't reproduce the issue but from crashlytics, I see multiple crash logs

@gpanshu gpanshu requested a review from a team March 10, 2023 16:57
@gpanshu gpanshu added the pending-triage Issue is pending triage label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Issue is pending triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants