-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Google Analytics/OkHttp conflict on Android #319
Comments
Please post a sample and a stackdump. |
Will do asap |
I've tried the workarounds from #184, and it still segfaults. |
Could you please paste your code for Retrofit's |
I'm not using Retrofit, just OkHttp and Google Analytics. |
Ok, could you then post the |
Currently it's: OkHttpClient httpClient = new OkHttpClient();
SSLContext sslContext;
try {
sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, null, null);
} catch (GeneralSecurityException e) {
throw new AssertionError(); // The system has no TLS. Just give up.
}
httpClient.setSslSocketFactory(sslContext.getSocketFactory());
URL.setURLStreamHandlerFactory(httpClient);
return httpClient; I've tried without adding the SSL Context to OkHttp, but Google Analytics still segfaults. |
@Richie97 that's strange. You're sure that's the only place OkHttp is being used? |
Do you use Picasso, maybe? |
@swankjesse Ah, I had a library I made that also relied on OkHttp. Also adding the workarounds to that fixed the issue. |
2 months late, but yeah. |
Hey, I've just noticed a weird issue. I'm not sure it's related to Okhttp, Retrofit or Google Analytics but I'll post it here.
In my Android app I have a very simple screen performing autocomplete with google places API. This is done using Retrofit and Okhttp. Everything was working fine until I integrated Google Analytics v3. When the autocomplete requests were running (ie when the thread
Spdy Reader maps.googleapis.com
was spawn) an ANR was occurring once Google Analytics was sending its data. I fixed it by removing Okhttp and using the default client from retrofit.I know its a pretty weird and random issue but I thought you might be interested by that result. I will post a sample to reproduce the issue.
The stacktrace is not very verbose, it just says the crash happened on Google Analytics' side (GAThread).
The text was updated successfully, but these errors were encountered: