Skip to content

updating a note that was deleted remotely cause an error #108

@wiiznokes

Description

@wiiznokes

Expected Result

The note is deleted, or updated.

On gitjournal, the note is deleted. I think the commit is done on another branch, and then, the branch is merged.

Steps to Reproduce

create a note, delete remotely, update in the app

Actual behavior

An error is shown on a toast

App version

Logs

type=1400 audit(0.0:886): avc:  denied  { link } for  name="shallow.lock" dev="dm-55" ino=574547 scontext=u:r:untrusted_app:s0:c217,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c217,c256,c512,c768 tclass=file permissive=0 app=io.github.wiiznokes.gitnote.debug
2025-09-13 15:26:35.721  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  java.nio.file.NoSuchFileException: /data/user/0/io.github.wiiznokes.gitnote.debug/files/repo/ggg.md
2025-09-13 15:26:35.723  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:250)
2025-09-13 15:26:35.724  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
2025-09-13 15:26:35.724  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at java.nio.file.Files.delete(Files.java:1126)
2025-09-13 15:26:35.724  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at io.github.wiiznokes.gitnote.data.platform.NodeFs$File.delete_d1pmJ48$lambda$0(FileSystem.kt:90)
2025-09-13 15:26:35.724  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at io.github.wiiznokes.gitnote.data.platform.NodeFs$File.$r8$lambda$3gKCG7ZEDUSAqV7kFTz7C6hR4hM(Unknown Source:0)
2025-09-13 15:26:35.725  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at io.github.wiiznokes.gitnote.data.platform.NodeFs$File$$ExternalSyntheticLambda2.invoke(D8$$SyntheticClass:0)
2025-09-13 15:26:35.725  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at io.github.wiiznokes.gitnote.utils.UtilsKt.toResult(utils.kt:35)
2025-09-13 15:26:35.725  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at io.github.wiiznokes.gitnote.data.platform.NodeFs$File.delete-d1pmJ48(FileSystem.kt:90)
2025-09-13 15:26:35.726  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at io.github.wiiznokes.gitnote.manager.StorageManager$updateNote$2$1.invokeSuspend(StorageManager.kt:121)
2025-09-13 15:26:35.726  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2025-09-13 15:26:35.726  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
2025-09-13 15:26:35.726  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
2025-09-13 15:26:35.727  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
2025-09-13 15:26:35.727  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
2025-09-13 15:26:35.727  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
2025-09-13 15:26:35.727  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
2025-09-13 15:26:35.728  9366-9569  System.err              io.github.wiiznokes.gitnote.debug    W  	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
2025-09-13 15:26:35.728  9366-9569  StorageManager          io.github.wiiznokes.gitnote.debug    E  Can't delete file /data/user/0/io.github.wiiznokes.gitnote.debug/files/repo/ggg.md: /data/user/0/io.github.wiiznokes.gitnote.debug/files/repo/ggg.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions