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

Aperta
#1,443 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
android, kotlin
Ambito
mobile

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
Lingua principale
Kotlin
Stelle
7.8k
Fork
237
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Droid-ify/client

Tutte le issue di Droid-ify/client

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.