[Crash] Droid-ify tries to open non-existing (stale/removed) APK in cache.

Abierto
#1,443 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
android, kotlin
Área
mobile

Línea de trabajo

The crash is a FileNotFoundException thrown from ReleaseFileValidator.validate when it opens a file under cache/partial. Start by reading that validator and the download code that writes and cancels the partial APK, to see where the file can disappear before it is opened. The issue does not name a fix, so agree on the intended behaviour with maintainers first. Done means a missing cached file is handled without a crash, with a test covering that case.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

crash
Guidelines
  • I have searched the issue tracker for open and closed issues that are related to the crash report I want to file, without success.
  • I'm on the latest release
What happened

Crash suggests Droid-ify does not guard somewhere at com.looker.droidify.service.ReleaseFileValidator.validate I believe (check relevant stsck trace). I don't think this crash is critical, and I have yet to reproduce it again. It still might be good idea to check code there and maybe catch some exceptions before they propagate further, eventually adding some fallback logic.

Even though it might be some (rare?) edge case I'm just writing this issue in order to add it to some kind of agenda to let it be checked out eventually. Maybe I'll even check it out if this stays open long enough.

Steps to reproduce

Crash happens in background, might be unnoticeable (LogFox captures it). It most likely can happen on downloads and possibly on race between opening fetched APK and canceling the operation / clearing cache.

Device

(irrelevant, crash is about IO handling)

Android version

Android 13

Droid-ify version

v0.7.8 (F-Droid)

Logs
Logs
AndroidRuntime: java.io.FileNotFoundException: /data/user/[USER]/com.looker.droidify/cache/partial/f9e9e39fccf340ca9331287940c29945452f07cd971c28be3626f634ba488c3d.apk: open failed: ENOENT (No such file or directory)
AndroidRuntime: 	at libcore.io.IoBridge.open(IoBridge.java:574)
AndroidRuntime: 	at java.io.FileInputStream.<init>(FileInputStream.java:160)
AndroidRuntime: 	at com.looker.droidify.service.ReleaseFileValidator.validate(r8-map-id-ae06e847c618fe2b529b0ff6b4af8904ca732891fa1c5a4bdf155504602ab775:7)
AndroidRuntime: 	at androidx.compose.foundation.MutatorMutex$mutateWith$2.invokeSuspend(r8-map-id-ae06e847c618fe2b529b0ff6b4af8904ca732891fa1c5a4bdf155504602ab775:233)
Lenguaje dominante
Kotlin
Estrellas
7.8k
Forks
237
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Droid-ify/client

Todos los issues de Droid-ify/client

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.