developmentDebug crashes on startup without app_keys.txt (Koin not started)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Build and launch :androidApp:assembleDevelopmentDebug from a checkout without app_keys.txt to reproduce the startup crash. Read AppConfig.default in data/src/commonMain/kotlin/com/blockstream/data/data/AppConfig.kt and initKoinAndroid in androidApp/src/main/java/com/blockstream/green/di/KoinAndroid.kt, focusing on the logger access before Koin initialization. Done means the public no-key development APK reaches the welcome screen without the KoinApplication exception.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Steps to reproduce
Tested at commit 8062ee10a546fe408987366616cd5c4823b7e03c on an Android API 36 x86_64 emulator.
- Use a clean public checkout without
app_keys.txt. The build script substitutes an empty string when this file is absent (androidApp/build.gradle.kts:37); the development flavor enables Lightning (line 73). - Build
:androidApp:assembleDevelopmentDebug, install the APK, and launch it.
Observed: the app crashes before its first screen. I reproduced this on two launches. One captured crash is shown below.
Captured AndroidRuntime excerpt
09-25 20:04:49.553 E/AndroidRuntime( 5645): FATAL EXCEPTION: main
09-25 20:04:49.553 E/AndroidRuntime( 5645): Process: com.greenaddress.greenbits_android_wallet.dev, PID: 5645
09-25 20:04:49.553 E/AndroidRuntime( 5645): Caused by: java.lang.IllegalStateException: KoinApplication has not been started
09-25 20:04:49.553 E/AndroidRuntime( 5645): at com.blockstream.utils.Loggable.getKoin(Loggable.kt:9)
09-25 20:04:49.553 E/AndroidRuntime( 5645): at com.blockstream.utils.Loggable.getLogger(Loggable.kt:11)
09-25 20:04:49.553 E/AndroidRuntime( 5645): at com.blockstream.data.data.AppConfig$Companion.default(AppConfig.kt:31)
09-25 20:04:49.553 E/AndroidRuntime( 5645): at com.blockstream.green.di.KoinAndroidKt.initKoinAndroid(KoinAndroid.kt:34)
09-25 20:04:49.553 E/AndroidRuntime( 5645): at com.blockstream.green.GreenApplication.onCreate(GreenApplication.kt:35)
Why it crashes
When Lightning is enabled but the keys are absent, AppConfig.default calls its Koin-backed logger (data/src/commonMain/kotlin/com/blockstream/data/data/AppConfig.kt:30-32). initKoinAndroid constructs AppConfig first (androidApp/src/main/java/com/blockstream/green/di/KoinAndroid.kt:34-42) and only calls initKoin at line 44. The logger therefore reaches Koin before initialization.
As a diagnostic check, I removed only that early logging branch in a separate checkout and rebuilt. The app then reached the welcome screen and allowed creation of a disposable empty testnet wallet. That local change is not a complete proposed fix; the clean checkout remains unchanged.
Expected: the public no-key development build starts. This condition could be logged after Koin initializes or through a logger safe to use before initialization.
Scope: this is a locally built developmentDebug APK. I did not test an official signed production APK or claim that it crashes in production.
- Ngôn ngữ chính
- Kotlin
- Star
- 271
- Fork
- 108
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
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 Blockstream/green_android
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Blockstream/green_android#313 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Blockstream/green_android#314 ·
-
Support scanning SeedQR recovery phrasesCó thể làm lại được @ardier16 đã nhận 32 ngày trước và không có pull request nào đang mở. Đang mởfeature request
Blockstream/green_android#311 · 2 bình luận · 1 người được giao ·
-
UX: Use "Passphrase BIP39" as a universal untranslated label — don't translate it as "contraseña"Có thể làm lại được @ardier16 đã nhận 32 ngày trước và không có pull request nào đang mở. Đang mởenhancement
Blockstream/green_android#310 · 4 bình luận · 1 người được giao ·
-
2-of-3 multisig with 2FA: Show service xpub (per-account) for faster recoveryCó thể làm lại được @domegabri đã nhận 38 ngày trước và không có pull request nào đang mở. Đang mởenhancement status: planned
Blockstream/green_android#309 · 2 bình luận · 2 người được giao ·
Tất cả issue của Blockstream/green_android
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
AAswordman/Operit#1292 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug webview
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
home-assistant/android#7524 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Issue: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
OpenAPITools/openapi-generator#25021 ·
Maintainer thường phản hồi trong vòng 1 ngày