-
Notifications
You must be signed in to change notification settings - Fork 304
Description
Describe the bug
On crashlytics we have logs of users having crashes because they cannot connet to the API this is the stack trace
Fatal Exception: com.stripe.android.core.exception.APIConnectionException: IOException during API request to Stripe (https://api.stripe.com/v1/payment_intents/[pi_X]?client_secret=[client_secret]: Unable to resolve host "api.stripe.com": No address associated with hostname. Please check your internet connection and try again. If this problem persists, you should check Stripe's service status at https://status.stripe.com/, or let us know at support@stripe.com. at com.stripe.android.core.exception.APIConnectionException$Companion.create(APIConnectionException.kt:27) at com.stripe.android.core.networking.DefaultStripeNetworkClient.parseResponse(DefaultStripeNetworkClient.kt:87) at com.stripe.android.core.networking.DefaultStripeNetworkClient.makeRequest(DefaultStripeNetworkClient.kt:65) at com.stripe.android.core.networking.DefaultStripeNetworkClient.executeRequest$lambda$0(DefaultStripeNetworkClient.kt:24) at com.stripe.android.core.networking.DefaultStripeNetworkClient.$r8$lambda$b-WZ-dcbvPC_-S4iskaZteg1AF4() at com.stripe.android.core.networking.DefaultStripeNetworkClient$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass) at com.stripe.android.core.networking.DefaultStripeNetworkClient$executeInternal$2.invokeSuspend(DefaultStripeNetworkClient.kt:43) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
To Reproduce
I don't have a way to reproduce it as this is coming from our users observability
Expected behavior
The app does not crash
Smartphone (please complete the following information):
- Device: Samsung Galaxy S24 Ultram Galaxy A53 , Z Fold 6, Redmi Note 13 5G , Poco F8 Ultra, Xiaomi 15T
- OS: Android 16,15,14,12,11,10
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Caused by java.net.UnknownHostException: Unable to resolve host "api.stripe.com": No address associated with hostname at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:124) at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103) at java.net.InetAddress.getAllByName(InetAddress.java:1152) at com.android.okhttp.Dns$1.lookup(Dns.java:41) at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178) at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144) at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30) at com.stripe.android.core.networking.StripeConnection$AbstractConnection.getResponseCode(StripeConnection.kt:31) at com.stripe.android.core.networking.StripeConnection$AbstractConnection.getResponse(StripeConnection.kt:39) at com.stripe.android.core.networking.DefaultStripeNetworkClient.parseResponse(DefaultStripeNetworkClient.kt:80) at com.stripe.android.core.networking.DefaultStripeNetworkClient.makeRequest(DefaultStripeNetworkClient.kt:65) at com.stripe.android.core.networking.DefaultStripeNetworkClient.executeRequest$lambda$0(DefaultStripeNetworkClient.kt:24) at com.stripe.android.core.networking.DefaultStripeNetworkClient.$r8$lambda$b-WZ-dcbvPC_-S4iskaZteg1AF4() at com.stripe.android.core.networking.DefaultStripeNetworkClient$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass) at com.stripe.android.core.networking.DefaultStripeNetworkClient$executeInternal$2.invokeSuspend(DefaultStripeNetworkClient.kt:43) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)