developmentDebug crashes on startup without app_keys.txt (Koin not started)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Kotlin
- Estrellas
- 271
- Forks
- 108
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Blockstream/green_android
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Blockstream/green_android#313 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Blockstream/green_android#314 ·
-
Support scanning SeedQR recovery phrasesQuizá libre de nuevo @ardier16 la tomó hace 31 días y no hay ningún pull request abierto. Abiertofeature request
Blockstream/green_android#311 · 2 comentarios · 1 asignado ·
-
UX: Use "Passphrase BIP39" as a universal untranslated label — don't translate it as "contraseña"Quizá libre de nuevo @ardier16 la tomó hace 31 días y no hay ningún pull request abierto. Abiertoenhancement
Blockstream/green_android#310 · 4 comentarios · 1 asignado ·
-
2-of-3 multisig with 2FA: Show service xpub (per-account) for faster recoveryQuizá libre de nuevo @domegabri la tomó hace 37 días y no hay ningún pull request abierto. Abiertoenhancement status: planned
Blockstream/green_android#309 · 2 comentarios · 2 asignados ·
Todos los issues de Blockstream/green_android
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
T31n/YagniLauncher#1051 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Accepted Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ankidroid/Anki-Android#22114 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
solana-foundation/pay-kit#341 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100