🐛 Bug Report: App crash on no-internet
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 領域
- mobile, networking
調査の方向性
OkHttp のスタックトレースで示される Android SDK のリクエストパスから開始し、ネットワークを無効にして再現します。UnknownHostException が非同期呼び出しからどこに出るかに焦点を当ててください。失敗したリクエストが SDK の通常のエラーパスを通じて通知され、アプリを終了させることなく、インターネット接続なしのケースが検証できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
👟 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)
- 主要言語
- Kotlin
- スター
- 156
- フォーク
- 29
- 平均マージ
- 8時間 49分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
appwrite/sdk-for-android のほかの issue
-
Realtime messages can come out of order (and in fact are processed in parallel)再び着手できるかも @ChiragAgg5k が 267 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
appwrite/sdk-for-android#103 · 担当者 1 名 ·
-
Realtime does not get notified or retry socket failures correctly再び着手できるかも @ChiragAgg5k が 267 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
appwrite/sdk-for-android#101 · 担当者 1 名 ·
-
Support mTLS再び着手できるかも @ChiragAgg5k が 267 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
appwrite/sdk-for-android#100 · コメント 1 件 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
appwrite/sdk-for-android#99 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
appwrite/sdk-for-android#96 ·
appwrite/sdk-for-android の issue をすべて見る
似ている issue
-
Unified account interface not translated into Simplified Chinese対応中かも @xuenhua が 2 日前に担当しました。 オープンunconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
thunderbird/thunderbird-android#11936 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
Update toast stylingオープンdesign good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
scribe-org/Scribe-Android#778 ·
メンテナーはふだん 1 日以内に返信
-
Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ankidroid/Anki-Android#23392 ·
メンテナーはふだん 1 日以内に返信
-
AI Generated CI/CD ⚒️ Flaky-tests 🐦 go 🏃
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
valkey-io/valkey-glide#7772 ·
メンテナーはふだん 1 日以内に返信
-
Error Handling Swift
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Automattic/wordpress-rs#1759 ·
メンテナーはふだん 1 日以内に返信