desktop icon indicating copy to clipboard operation
desktop copied to clipboard

File provider extension does not propagate remote folder deletion

Open Floweb05 opened this issue 9 months ago β€’ 12 comments

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Nextcloud MacOS client (VFS) don't delete folders after Server-side deletion.

Desktop log files:

Debug-LogNextcloudAPP.zip

Steps to reproduce

  • On web Interface I have "Folder 1 > Subfolder > image.jpg".
  • I travel that directory, locally, on Mac (virtual files).
  • I delete "Folder 1" from the web interface.
  • "Folder 1" is still shown locally on my Mac, with subfolder and (most of the time) it's content.
Image

Expected behavior

A directory deleted on web-interface, should be deleted from local Sync.

Which files are affected by this bug

Seems any directory is concerned

Operating system

macOS

Which version of the operating system you are running.

23.6 + 15.7.4

Package

Official macOS Virtual files 12+ universal pkg

Nextcloud Server version

32.0.5

Nextcloud Desktop Client version

4.0.6 - 33.0.0-RC2

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • [x] Default internal user-backend
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Nextcloud Server logs

No events recorded during the test.

Additional info

  • Nextcloud Desktop APP show the "folder deleted" event, in the notification window (see screenshot)
  • It's not linked to shared folder, or chars on Folder's names, or long directory paths.
  • Occur 100% of the time. Only directories previously locally traveled.
  • Disabling/Enabling Virtual Files is the only way to get the correct list folders/files displayed.
  • If I delete a folder with multiple subfolders, some subfolders do get deleted, but some keep listed
  • This bug don't occur with 3.16.6 VFS
  • Server: Docker community official (not AIO) / Push notifications OK / Behind a Nginx proxy manager

I can provide more details if requested. Can also provide a VNC access to a testing MAC, the same I Use.

Floweb05 avatar Mar 02 '26 23:03 Floweb05

I assume that there must be something wrong in the synchronization logic then. With 33.0.0, the file provider extension should definitely at least know about the remote changes. I definitely need logs for this one to know what the file provider extension is doing. Maybe it also just fails to report it correctly to macOS while having it updated correctly in its own metadata.

I need to clarify how to safely collect logs from the community without leaking personal information to the public or malicious code injection.

i2h3 avatar Mar 03 '26 12:03 i2h3

@i2h3

the file provider extension should definitely at least know about the remote changes

I can see it partially remove folder content. It's like something prevent it to continue at some point. (If I delete a folder with multiple subfolders, some subfolders do get deleted, but some keep listed)

I definitely need logs for this one

I posted logs zip (Bug description section), including Client debuglog + MacOS console events recorded during the test. Tell me if you need something else.

I need to clarify how to safely collect logs from the community without leaking personal information to the public or malicious code injection.

I redacted it, I hope i didnt missed something 😢

Thanks

Floweb05 avatar Mar 03 '26 13:03 Floweb05

@Floweb05 Ah, oops, I missed that debug archive. πŸ€ͺ Thanks! I will check it.

i2h3 avatar Mar 04 '26 09:03 i2h3

I had a look into it and figured that the logs are insufficient to understand what is happening. I need to add further logging statements to our code. This is tricky, though, because those are often called code points and logging there might blow up the log sizes significantly.

i2h3 avatar Mar 04 '26 10:03 i2h3

I also need to try to reproduce this manually first. But we need to be pedantic about the steps of reproduction. πŸ€” On the side, would you be willing to try this with a custom debug build I could provide, @Floweb05 ?

i2h3 avatar Mar 04 '26 10:03 i2h3

would you be willing to try this with a custom debug build I could provide, @Floweb05 ?

Of course πŸ‘Send me that debug build I'll test it quickly ( [email protected])

I found this in the log archive:

{"category":"Enumerator","date":"2026.03.02 23:45:19.187","details":{"account":"flo.mac https://cloud.redacted.com","url":"https://cloud.redacted.com/remote.php/dav/files/Flo.mac"},"level":"info","message":"Set up enumerator."}

{"category":"toFileProviderItems","date":"2026.03.02 23:45:19.430","details":{"item":"00716310ochb1adgwe9h","name":"Flo.mac"},"level":"error","message":"Could not get valid parentItemIdentifier for item by ocId."}

{"category":"FilesDatabaseManager","date":"2026.03.02 23:45:19.430","details":{"item":"00716310ochb1adgwe9h"},"level":"error","message":"Could not get item parent directory item metadata for metadata."}

{"category":"Enumerator","date":"2026.03.02 23:45:19.432","details":{},"level":"info","message":"Recovering from invalid parent identifier at https://cloud.redacted.com/remote.php/dav/files"}

Is it normal that last line use a URL without my username in it, like in first line ?


I also need to try to reproduce this manually first

I'll try to de-reproduce on my side

Floweb05 avatar Mar 04 '26 13:03 Floweb05

I failed to reproduce this problem with the current state of master. πŸ€” I did setup a new account (admin from localhost:80 which is a Nextcloud Docker container) and file provider domain, including "Folder 1 β†’ Subfolder β†’ image.jpg" and deleted "Folder 1". Also, this worked as expected for me with a server set up with push notifications.

@Floweb05:

  1. You have waited at least 30 seconds for the change to arrive in Finder, did you? Server polling by the client is the fallback when push notifications cannot be configured.
  2. You have notify_push configured on your server, do you? I am just double checking, as far as I can tell from the logs, you have and the client successfully connects.

I will prepare a few logging code changes and a developer build which should provide a bit more insights.

i2h3 avatar Mar 09 '26 14:03 i2h3

@i2h3 Hi ! I can't find the link to the "developer build" + deposit link, you sent me last week 🧐 Please, could you post the link again? rented a mac for 24h, ready for testing!

Tested RC3, and still experience the issue. (logs available).

  1. You have waited at least 30 seconds for the change to arrive in Finder

Yes. I instantly see "deletion" notification in Events popup AND see folder content being removed, but partially.

2. You have notify_push configured on your server, do you?

I Do !

Floweb05 avatar Mar 16 '26 11:03 Floweb05

@Floweb05 Did you check your mailbox? I sent you a message to the address you mentioned above last week. Anyway, the build is here. The log archive drop link is here.

i2h3 avatar Mar 16 '26 13:03 i2h3

@Floweb05 Did you check your mailbox? I sent you a message to the address you mentioned above last week. Anyway, the build is here. The log archive drop link is here.

πŸ™ƒπŸ™ƒ By email... My bad... Got it, tested, Logs uploaded !

  1. Installed app
  2. Connected account
  3. From webpage I deleted a Folder in my root directory
  4. The folder don't get sync-deleted locally, but the file inside is deleted

I also locally added a file to that directory after that, to trigger some sync error message. (Nextcloud icon turned to "sync error" when I did that)

Another test :

  • Created a directory with 16 files in it.
  • Deleted 11 files one by one (web) : instant deletion locally : all good
  • Try to delete the directory (web) : directory remain locally (plus all the remaining files in it) : Fail

(The mac was freshly installed with no previous nc installs)

Thank you 🀞 Hope it helps !

Floweb05 avatar Mar 16 '26 16:03 Floweb05

This issue seems to be fixed with 33.0.2 on MacOS 15.6. ❀️ I'll do some more tests on Macos 15.2 + 26.

I still had a one time issue with a folder still listed locally after removal from web :

  • I Duplicated a folder locally
  • Deleted that folder from Web
  • Folder still listed locally but showing a cloud error "The file doesn't exist". I think it's normal at this point. BUT : Could not manually delete it from computer, having a "error 43". Couldn't reproduce after enabling "Move removed files to trash" πŸ˜ŠπŸ‘

Floweb05 avatar Apr 17 '26 12:04 Floweb05

I tried to reproduce that problem but it worked as expected: after the deletion in the web user interface and some waiting time (due to polling) the folder disappeared locally as well.

Correct me if I am wrong, but it looks like the issue of @Floweb05 has been resolved (I used a master build now).

i2h3 avatar May 13 '26 12:05 i2h3