developmentDebug crashes on startup without app_keys.txt (Koin not started)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Kotlin
- Stelle
- 271
- Fork
- 108
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Blockstream/green_android
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Blockstream/green_android#313 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Blockstream/green_android#314 ·
-
Support scanning SeedQR recovery phrasesForse di nuovo libera @ardier16 l’ha presa 33 giorni fa e non c’è nessuna pull request aperta. Apertafeature request
Blockstream/green_android#311 · 2 commenti · 1 assegnatario ·
-
UX: Use "Passphrase BIP39" as a universal untranslated label — don't translate it as "contraseña"Forse di nuovo libera @ardier16 l’ha presa 33 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
Blockstream/green_android#310 · 4 commenti · 1 assegnatario ·
-
2-of-3 multisig with 2FA: Show service xpub (per-account) for faster recoveryForse di nuovo libera @domegabri l’ha presa 38 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement status: planned
Blockstream/green_android#309 · 2 commenti · 2 assegnatari ·
Tutte le issue di Blockstream/green_android
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
recloudstream/cloudstream#3226 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Kotlin/kotlinx.serialization#3277 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno