ARK-Builders / ARK-Builders/Navigator

Roots on SD cards can't be opened

Open
#280 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Device: Huawei MatePad, Android 10
Any root on SD card fails to be opened:
```
07-22 10:50:36.740 16387 17755 D previews: previews provided in 145275ms
07-22 10:50:36.783 16387 17755 D resources-index: 3179 resources returned
07-22 10:50:36.814 16387 17755 D tags-storage: file /storage/9C33-6BBD/Android/media/com.github.catfriend1.syncthingandroid/Camera/.ark/tags exists, last modified at 2022-07-21T19:28:50Z
07-22 10:50:36.833 16387 17755 D tags-storage: 501 entries has been read
07-22 10:50:36.835 16387 17755 D tags-storage: forgetting 0 resources
07-22 10:50:36.940 16387 16399 E : [ZeroHung]zrhung_get_config: Get config failed for wp[0x0008]
--------- beginning of crash
07-22 10:50:36.972 16387 16387 E AndroidRuntime: FATAL EXCEPTION: main
07-22 10:50:36.972 16387 16387 E AndroidRuntime: Process: space.taran.arknavigator, PID: 16387
07-22 10:50:36.972 16387 16387 E AndroidRuntime: java.nio.file.AccessDeniedException: /storage/9C33-6BBD/Android/media/com.github.catfriend1.syncthingandroid/Camera/.ark/tags
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at java.nio.file.Files.newOutputStream(Files.java:216)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at java.nio.file.Files.write(Files.java:3351)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$writeStorage$2.invokeSuspend(PlainTagsStorage.kt:227)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$writeStorage$2.invoke(Unknown Source:8)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$writeStorage$2.invoke(Unknown Source:4)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage.writeStorage(PlainTagsStorage.kt:216)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage.access$writeStorage(PlainTagsStorage.kt:26)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$persist$2.invokeSuspend(PlainTagsStorage.kt:183)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$persist$2.invoke(Unknown Source:8)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$persist$2.invoke(Unknown Source:4)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage.persist(PlainTagsStorage.kt:131)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage.access$persist(PlainTagsStorage.kt:26)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$cleanup$2.invokeSuspend(PlainTagsStorage.kt:121)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$cleanup$2.invoke(Unknown Source:8)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage$cleanup$2.invoke(Unknown Source:4)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.PlainTagsStorage.cleanup(PlainTagsStorage.kt:116)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at space.taran.arknavigator.mvp.model.repo.tags.TagsStorageRepo$provide$2.invokeSuspend(TagsStorageRepo.kt:37)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
07-22 10:50:36.972 16387 16387 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
```

Contributor guide

Open the contributing guide

Research direction

Start with PlainTagsStorage.kt around persist, cleanup, and writeStorage at lines 116, 131, 183, 216, and 227, where the stack trace shows the SD-card tags file write failing. Reproduce by opening a root on an SD card in the Android app and verify that the root opens without the AccessDeniedException crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.