🐛 Bug Report: App crash on no-internet
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- mobile, networking
Hướng nghiên cứu
Bắt đầu từ đường dẫn request của Android SDK được thể hiện trong stack trace của OkHttp và tái hiện với mạng bị tắt, tập trung vào nơi UnknownHostException thoát khỏi lệnh gọi bất đồng bộ. Được xem là hoàn tất khi một request thất bại được chuyển qua đường dẫn lỗi thông thường của SDK mà không làm ứng dụng kết thúc, và trường hợp không có Internet đã được xác minh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
👟 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)
- Ngôn ngữ chính
- Kotlin
- Star
- 156
- Fork
- 29
- Merge trung bình
- 8 giờ 49 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appwrite/sdk-for-android
-
Realtime messages can come out of order (and in fact are processed in parallel)Có thể làm lại được @ChiragAgg5k đã nhận 267 ngày trước và không có pull request nào đang mở. Đang mở
appwrite/sdk-for-android#103 · 1 người được giao ·
-
Realtime does not get notified or retry socket failures correctlyCó thể làm lại được @ChiragAgg5k đã nhận 267 ngày trước và không có pull request nào đang mở. Đang mở
appwrite/sdk-for-android#101 · 1 người được giao ·
-
Support mTLSCó thể làm lại được @ChiragAgg5k đã nhận 267 ngày trước và không có pull request nào đang mở. Đang mở
appwrite/sdk-for-android#100 · 1 bình luận · 1 người được giao ·
-
Compose MultiplatformĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
appwrite/sdk-for-android#99 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
appwrite/sdk-for-android#96 ·
Tất cả issue của appwrite/sdk-for-android
Issue tương tự
-
Unified account interface not translated into Simplified ChineseCó thể đã có người làm @xuenhua đã nhận 2 ngày trước. Đang mởunconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
thunderbird/thunderbird-android#11936 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Update toast stylingĐang mởdesign good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
scribe-org/Scribe-Android#778 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ankidroid/Anki-Android#23392 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AI Generated CI/CD ⚒️ Flaky-tests 🐦 go 🏃
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
valkey-io/valkey-glide#7772 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Error Handling Swift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Automattic/wordpress-rs#1759 ·
Maintainer thường phản hồi trong vòng 1 ngày