Skip to content

馃悰 Bug Report: App crash on no-internet#72

Description

@buddy-dev-1337

馃憻 Reproduction steps

I'm not able to consistently reproduce this but whenever there is network issues and the SDK tries to make a request it crashes the whole app itself rather than catching the exception

         Fatal Exception: java.net.UnknownHostException: Unable to resolve host "cloud.appwrite.io": No address associated with hostname
               at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:156)
               at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
               at java.net.InetAddress.getAllByName(InetAddress.java:1152)
               at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:1)
               at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:413)
               at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:413)
               at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:413)
               at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:413)
               at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:413)
               at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:60)
               at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.java:60)
               at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:60)
               at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:1)
               at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:156)
               at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:1)
               at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:235)
               at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:1)
               at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:149)
               at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:1)
               at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:100)
               at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:48)
               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
               at java.lang.Thread.run(Thread.java:1012)

### 馃憤 Expected behavior

Should not crash the app but rather catch the exception

### 馃憥 Actual Behavior

Crashes the app

### 馃幉 Appwrite version

io.appwrite:sdk-for-android:6.0.0

### 馃捇 Operating system

Android 

### 馃П Your Environment

_No response_

### 馃憖 Have you spent some time to check if this issue has been raised before?

- [x] I checked and didn't find similar issue

### 馃彚 Have you read the Code of Conduct?

- [x] I have read the [Code of Conduct](https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions