desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: Virtual File Syncing on MacOS causes applications to complain file has been modified

Open rexbron opened this issue 11 months ago • 11 comments

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

Bug description

When using 1st party MacOS applications like Pages and Number, after a save or an autosave, the application will complain that the file has been modified by another application and prompt the user to save another copy or overwrite.

This is likely related to Issue #6212 #6190 but the fix is not sufficient for MacOS.

Steps to reproduce

  1. Add a Virtual File folder on MacOS
  2. Create a document in Pages or other 1st Party MacOS App
  3. Save the document
  4. After Nextcloud syncs the document, Pages will complain the file has been modified since last save.

Expected behavior

Nextcloud Syncing should not cause apps to think the file has been modified.

Which files are affected by this bug

LASS S2 Suspense File.md

Operating system

macOS

Which version of the operating system you are running.

15.2

Package

Official macOS 12+ universal pkg

Nextcloud Server version

30.0.5

Nextcloud Desktop Client version

3.15.3

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

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

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

Nextcloud Server logs

{"reqId":"aWZie8xW186MIGQTxILJ","level":3,"time":"2025-02-08T14:16:33+00:00","remoteAddr":"","user":"--","app":"richdocuments","method":"","url":"--","message":"Failed to fetch discovery: cURL error 7: Failed to connect to cloud.hunter.camera port 443 after 1 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://cloud.hunter.camera/hosting/discovery","userAgent":"--","version":"30.0.5.1","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 7: Failed to connect to cloud.hunter.camera port 443 after 1 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://cloud.hunter.camera/hosting/discovery","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},"*** sensitive parameters replaced ***",{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},"*** sensitive parameters replaced ***",{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":142,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Http/Client/DnsPinMiddleware.php","line":109,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":66,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":333,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":169,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":189,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Http/Client/Client.php","line":205,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",{"verify":"/var/www/html/resources/config/ca-bundle.crt","timeout":5,"nextcloud":{"allow_local_address":true},"headers":{"User-Agent":"Nextcloud Server Crawler","Accept-Encoding":"gzip"},"synchronous":true}]},{"file":"/var/www/html/custom_apps/richdocuments/lib/Service/DiscoveryService.php","line":59,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/richdocuments/lib/Service/CachedRequestService.php","line":74,"function":"sendRequest","class":"OCA\\Richdocuments\\Service\\DiscoveryService","type":"->","args":[{"__class__":"OC\\Http\\Client\\Client"}]},{"file":"/var/www/html/custom_apps/richdocuments/lib/Backgroundjobs/ObtainCapabilities.php","line":41,"function":"fetch","class":"OCA\\Richdocuments\\Service\\CachedRequestService","type":"->","args":[]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities","type":"->","args":[null]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":88,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":75,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]},{"file":"/var/www/html/cron.php","line":162,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]}],"File":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"Failed to fetch discovery: cURL error 7: Failed to connect to cloud.hunter.camera port 443 after 1 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://cloud.hunter.camera/hosting/discovery","exception":[],"CustomMessage":"Failed to fetch discovery: cURL error 7: Failed to connect to cloud.hunter.camera port 443 after 1 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://cloud.hunter.camera/hosting/discovery"},"id":"67a77059412ca"}

Additional info

NextCloud VFS sync issue.zip

rexbron avatar Feb 08 '25 14:02 rexbron

in my case when a file get virtually synced the creation date changes to the time and date of the file sync completation, maybe can be related?

...on the web gui the dates are correct, the issue is only on macos finder.

Try to copy an "old" file in the sync folder and check if the creation date is actualized. Take a look to the web gui too.

in this screenshoot you can see the behaviour: Image

Image

kintaro1981 avatar Feb 11 '25 01:02 kintaro1981

restarting the client reset the creation date to the right one:

Image

kintaro1981 avatar Feb 11 '25 06:02 kintaro1981

Updated to client 3.16.0 and server 30.0.0.6, still get the same behaviour.

rexbron avatar Mar 13 '25 15:03 rexbron

Still an issue with client 3.16.3

rexbron avatar Apr 23 '25 14:04 rexbron

Nothing to add sorry except that I am experiencing the same issue with client version 3.16.6, using virtual files on Sequoia 15.6. The issue is particularly prevalent when editing scripts using neovim: every time I save a script I get the following error "WARNING: The file has been changed since reading it!!!".

jackbeagley avatar Aug 10 '25 23:08 jackbeagley

Still an issue with 4.0.0

rexbron avatar Oct 24 '25 15:10 rexbron

@rexbron could you generate a debug archive from your 4.0.0 client and upload it? https://cloud.nextcloud.com/s/9PDYQLPBpTFNGQ6

nilsding avatar Oct 24 '25 18:10 nilsding

@nilsding Debug archive uploaded

rexbron avatar Oct 24 '25 20:10 rexbron

Anything I can do to help debug?

This is very annoying and happens every time I use any of the Mac iWork suite.

rexbron avatar Nov 05 '25 12:11 rexbron

Still an issue with 4.0.1

rexbron avatar Nov 19 '25 14:11 rexbron

Still an issue with 4.0.2

rexbron avatar Nov 27 '25 12:11 rexbron