deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.75k stars 105 forks source link

Renaming creates non-existing duplicate #107

Closed Donkey-Doug closed 2 years ago

Donkey-Doug commented 3 years ago

Earlier I renamed a few photos using Aves. I noticed these thumbnails were shown twice. One had the old name and one the new. However, the old file would not show an image when opening, but instead shows a black screen with a "this file does not exist" message.

deckerst commented 3 years ago

Does it happen all the time? some of the time? Do these ghost files automatically get cleaned up after a while? after a fresh restart of the app?

Donkey-Doug commented 3 years ago

It happens sometimes. A restart of the app does not clean them (I think). Not sure if it goes away automatically.

deckerst commented 3 years ago

Thanks for the details. I can't reproduce this issue on my device, though. Could you please attach here the app logs? You can export them from About > Bug Report.

Donkey-Doug commented 3 years ago

I can replicate it by clicking "rescan" after renaming a file. Not sure if the bug also can happen without a manual rescan.

Example:

https://user-images.githubusercontent.com/50382414/137518388-e15722e7-1d0b-4a17-8637-bfeb86516d64.mp4

It is not fixed on restarting the app and does not get foxed automatically.

Donkey-Doug commented 3 years ago

Update: Also happens sometimes without manual rescan.

deckerst commented 3 years ago

Could you please attach app logs?

Donkey-Doug commented 3 years ago

Aves version: 1.5.3 (Build 57) Flutter version: 2.5.1 (Channel stable) Android version: 10 (SDK 29) Device: Xiaomi Mi 9T Pro Google Play services: not available

aves-logs-20211016_024723.txt

deckerst commented 3 years ago

It seems to happen only when renaming media 1) owned by other packages and 2) on Android 10. Possibly only happening in the Download folder (I couldn't confirm that on the emulator). Anyway, now that I can reproduce it, I'll try and fix it.

Donkey-Doug commented 3 years ago

Not just download folder.

Donkey-Doug commented 3 years ago

update: not just renaming but also moving.

Donkey-Doug commented 2 years ago

@deckerst I do not think this is fixed:

aves-logs-20211213_040955.txt

and another one aves-logs-20211219_031623.txt

Aves version: 1.5.7-izzy (Build 1061) Flutter version: 2.5.3 (Channel stable) Android version: 10 (SDK 29) Android build: lineage_raphael-userdebug 10 QQ3A.200705.002 eng.abhish.20200710.065119 test-keys Device: Xiaomi Mi 9T Pro Google Play services: not available

Donkey-Doug commented 2 years ago

@deckerst , this issue is back again.

Aves version: 1.5.10-izzy (Build 2064) Flutter version: 2.8.1 (Channel stable) Android version: 10 (SDK 29) Android build: lineage_raphael-userdebug 10 QQ3A.200705.002 eng.abhish.20200710.065119 test-keys Device: Xiaomi Mi 9T Pro Google Play services: not available

aves-logs-20220117_152710.txt

deckerst commented 2 years ago

Thanks for the report. I'll take a look.

This issue has a lot of history, so I'd like to recap what you experience:

edit: i just saw you use Lineage and not Xiaomi's ROM, but my question about custom permission monitoring remains.

deckerst commented 2 years ago

I'm not familiar with LineageOS, but apparently another user has similar symptoms with LineageOS 17 / Android 10. By the way, is your LineageOS build official or not?

Donkey-Doug commented 2 years ago

My lineageos is unofficial, but that should not be a problem. The dev of my device is too lazy to compile and upload to lineage.

I think it only happens on renaming.

Maybe it only happens in the download directory. Not sure.

It seems to happen randomly.

deckerst commented 2 years ago

In Aves v1.6.2, I revisited storage access for Android 10 and older.

The initial reason was a regression introduced in Aves v1.6.1, preventing write access specifically on Android 10. But I also found out a way to reproduce (and fix) on the Android Nougat emulator an issue that looked a bit like the one you described here.

My point is... maybe the bug you described is now fixed. I can't reproduce it on the Android 10 emulator, so I can't be sure, but I'm hopeful!

Donkey-Doug commented 2 years ago

The bug is still present.

aves-logs-20220418_190258.txt

Aves version: 1.6.3-izzy (Build 2069) Flutter version: 2.10.3 (Channel stable) Android version: 10 (SDK 29) Android build: lineage_raphael-userdebug 10 QQ3A.200705.002 eng.abhish.20200710.065119 test-keys Device: Xiaomi Mi 9T Pro Google Play services: not available System locales: en_US Aves locale: system -> en

kha84 commented 2 years ago

I also have this bug. I copied the same photo from one folder (WhatsApp images) to another (Camera) couple of times. The second time I tried to copy Aves asked me if I want to replace - I said yes. But as a result now Aves shows me 2 thumbnails for the very same photo in "Camera" folder. Both photos details are identical (including path). Rescanning or app restarting doesn't get rid of that duplicate. File manager shows me there's just a single file.

Aves version: 1.6.13-play (Build 79)
Flutter version: 3.3.0-0.5.pre (Channel beta)
Android version: 12 (SDK 31)
Android build: SP1A.210812.016.G970FXXSEGVA9
Device: samsung SM-G970F
Mobile services: ready
System locales: en_GB, ru_RU
Aves locale: system -> en
Installer: com.android.vending
deckerst commented 2 years ago

@kha84 your issue is different from this one. I created #335 to track it.