client icon indicating copy to clipboard operation
client copied to clipboard

File not updated locally

Open mcarbonne opened this issue 4 months ago • 8 comments

Pre-submission Checks

  • [x] I checked for similar issues, but could not find any. I also checked the closed issues. I could not contribute additional information to any existing issue.
  • [x] I will take the time to fill in all the required fields. I know that the bug report may be dismissed otherwise due to lack of information.

Describe the bug

I have two computers (linux) with the owncloud client installed and I noticed that one file was not the same on both computers.

I discovered this bug thanks to a script I wrote to compare the content of sync folders between my computers. Basically, it list all files and folders + store them in a JSON file (with file checksum, size...).

I had a look at the .sync_journal.db on both computers:

  • contentChecksum matchs the local version of the file (but not the same on both computers).
  • I noticed that modtime (integer) is exactly the same (suspicious) => with stat command, the time is slightly different, but within the same second
  • filesize is not the same (expected)
  • phash is the same (but I don't know what it means)

Expected behavior

The desktop client on the computer with the out-dated file shall update the file. I also tried to "Force Sync Now" without any success.

Steps to reproduce the issue

I haven't found yet how to reproduce the code but having the same modtime might trigger the issue.

Screenshots

No response

Logs

No response

Client version number

ownCloud version 5.3.2.15463

Desktop environment (Linux only)

Ubuntu 24.04

Client package version and origin (Linux only)

Ubuntu 24.04 PPA from https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/download/

Installation path (Windows only)

No response

Server information

OCIS 7.2.0

Additional context

No response

mcarbonne avatar Aug 18 '25 17:08 mcarbonne

Which of them matches the server version?

Please enable http logging on the client where the file does not match the server. Hit the [sync now] button.

Please share observations and the http log. The log will hold private data. You might not want to share it or need to remove private data....

DeepDiver1975 avatar Aug 20 '25 06:08 DeepDiver1975

Which of them matches the server version?

Please enable http logging on the client where the file does not match the server. Hit the [sync now] button.

Please share observations and the http log. The log will hold private data. You might not want to share it or need to remove private data....

Correct file: size=358 bytes, sha1=13331f6184147215751907ac4c462304536d4135 (the one on the server, and on computer A) Wrong file: size=250 bytes, sha1=4467dade7e00145d8340e9e2660c1a7357fd278e (the one on computer B)

On the computer with the wrong file (computer B), here are the 2 matching lines when I press "Force Sync Now":

25-08-20 08:10:05:310 [ info sync.discovery ]:	Processing ".../.../.../path.to.file" | valid: true/true/db | mtime: 1755359136/1755359136/0 | size: 250/250/0 | etag: "736da70ece213b939c9955e04dd60aa4"//"" | checksum: "SHA1:4467dade7e00145d8340e9e2660c1a7357fd278e"//"" | perm: "WDNVR"//"" | fileid: "5a04d0cf-6057-4d86-b252-6148278487fe$b5339f43-4069-4425-9344-8717b32a1701!5bc826bf-be75-4dfd-a1a2-a9a8840d943c"//"" | inode: 30417613/30417613/ | type: CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile
25-08-20 08:10:05:310 [ info sync.discovery ]:	Discovered ".../.../.../path.to.file" CSyncEnums::CSYNC_INSTRUCTION_NONE OCC::SyncFileItem::None CSyncEnums::ItemTypeFile

mcarbonne avatar Aug 20 '25 06:08 mcarbonne

Can you look for a propfind request/response before these lines?

DeepDiver1975 avatar Aug 20 '25 07:08 DeepDiver1975

In chronological order:

Request 1

ID: REQUEST_ID_1 (b77d857a-2954-4e24-bb1c-1ad557fe5a47) URL: https://ocis.domain-name.com/dav/spaces/SPACE_ID/ Header: {Depth: 1, Prefer: return=minimal}

Request

25-08-20 18:37:16:788 [ info sync.networkjob ]:	Created OCC::PropfindJob(OCC::Account("[email protected]"), "https://ocis.domain-name.com/dav/spaces/SPACE_ID/", "PROPFIND", Original-Request-ID: "REQUEST_ID_1", X-Request-ID: "REQUEST_ID_1") for OCC::DiscoverySingleDirectoryJob(0x2abc70a0)
25-08-20 18:37:16:809 [ info sync.httplogger ]:	"REQUEST_ID_1: Request: PROPFIND https://ocis.domain-name.com/dav/spaces/SPACE_ID/ Header: { Depth: 1, Prefer: return=minimal, Authorization: Bearer [redacted], User-Agent: user-agent, Accept: */*, Accept-Language: en_US, Content-Type: text/xml; charset=utf-8, X-Request-ID: REQUEST_ID_1, Original-Request-ID: REQUEST_ID_1, Content-Length: 467, }
Data:[<?xml version=\"1.0\" encoding=\"utf-8\"?><d:propfind xmlns:d=\"DAV:\"><d:prop><d:resourcetype/><d:getlastmodified/><d:getcontentlength/><d:getetag/><id xmlns=\"http://owncloud.org/ns\"/><downloadURL xmlns=\"http://owncloud.org/ns\"/><dDC xmlns=\"http://owncloud.org/ns\"/><permissions xmlns=\"http://owncloud.org/ns\"/><checksums xmlns=\"http://owncloud.org/ns\"/><share-types xmlns=\"http://owncloud.org/ns\"/><data-fingerprint xmlns=\"http://owncloud.org/ns\"/></d:prop></d:propfind>\n]"

Response

25-08-20 18:37:16:826 [ info sync.httplogger ]:	"REQUEST_ID_1: Response: PROPFIND 207 (15ms) https://ocis.domain-name.com/dav/spaces/SPACE_ID/ Header: { Access-Control-Expose-Headers: Tus-Resumable, Tus-Version, Tus-Extension, Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/ https://keycloak.domain-name.com; default-src 'none'; font-src 'self'; frame-ancestors 'none'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline', Content-Type: application/xml; charset=utf-8, Date: Wed, 20 Aug 2025 16:37:16 GMT, Dav: 1, 3, extended-mkcol, Preference-Applied: return=minimal, Referrer-Policy: strict-origin-when-cross-origin, Tus-Extension: creation, creation-with-upload, checksum, expiration, Tus-Resumable: 1.0.0, Tus-Version: 1.0.0, Vary: Origin, Prefer, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-Permitted-Cross-Domain-Policies: none, X-Request-Id: REQUEST_ID_1, X-Robots-Tag: none, X-Xss-Protection: 1; mode=block, Transfer-Encoding: chunked, } Data: [XXXXXXXXXXXXXXXXx]"

I removed the response for privacy concern but it only contains informations of files and folders at the root level of the space (so the file concerned by the issue isn't listed)

25-08-20 18:37:16:841 [ debug sync.networkjob ]	[ OCC::AbstractNetworkJob::slotFinished ]:	Network job finished OCC::PropfindJob(OCC::Account("[email protected]"), "https://ocis.domain-name.com/dav/spaces/SPACE_ID/", "PROPFIND", Original-Request-ID: "REQUEST_ID_1", X-Request-ID: "REQUEST_ID_1")

File processing

25-08-20 18:37:16:902 [ info sync.discovery ]:	Processing "...../myfile.bin" | valid: true/true/db | mtime: 1755359136/1755359136/0 | size: 250/250/0 | etag: "736da70ece213b939c9955e04dd60aa4"//"" | checksum: "SHA1:4467dade7e00145d8340e9e2660c1a7357fd278e"//"" | perm: "WDNVR"//"" | fileid: "SPACE_ID!5bc826bf-be75-4dfd-a1a2-a9a8840d943c"//"" | inode: 30417613/30417613/ | type: CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile
25-08-20 18:37:16:902 [ info sync.discovery ]:	Discovered "...../myfile.bin" CSyncEnums::CSYNC_INSTRUCTION_NONE OCC::SyncFileItem::None CSyncEnums::ItemTypeFile

Request 2

ID: REQUEST_ID_2 (0bdb9252-ee70-4250-9ec8-84ce8a3e6ae1) URL: https://ocis.domain-name.com/remote.php/webdav/ Header: {Depth: 0, Prefer: return=minimal}

Request

25-08-20 18:37:26:060 [ info sync.networkjob ]:	Created OCC::PropfindJob(OCC::Account("[email protected]"), "https://ocis.domain-name.com/remote.php/webdav/", "PROPFIND", Original-Request-ID: "REQUEST_ID_2", X-Request-ID: "REQUEST_ID_2") for OCC::ConnectionValidator(0x2a9c75d0)
25-08-20 18:37:26:060 [ info sync.httplogger ]:	"REQUEST_ID_2: Request: PROPFIND https://ocis.domain-name.com/remote.php/webdav/ Header: { Depth: 0, Prefer: return=minimal, Authorization: Bearer [redacted], User-Agent: user-agent, Accept: */*, Accept-Language: en_US, Content-Type: text/xml; charset=utf-8, X-Request-ID: REQUEST_ID_2, Original-Request-ID: REQUEST_ID_2, Content-Length: 116, } Data: [<?xml version=\"1.0\" encoding=\"utf-8\"?><d:propfind xmlns:d=\"DAV:\"><d:prop><d:getlastmodified/></d:prop></d:propfind>\n]"

Response

25-08-20 18:37:26:285 [ info sync.httplogger ]:	"REQUEST_ID_2: Response: PROPFIND 207 (225ms) https://ocis.domain-name.com/remote.php/webdav/ Header: { Access-Control-Expose-Headers: Tus-Resumable, Tus-Version, Tus-Extension, Content-Length: 320, Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/ https://keycloak.domain-name.com; default-src 'none'; font-src 'self'; frame-ancestors 'none'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline', Content-Type: application/xml; charset=utf-8, Date: Wed, 20 Aug 2025 16:37:26 GMT, Dav: 1, 3, extended-mkcol, Preference-Applied: return=minimal, Referrer-Policy: strict-origin-when-cross-origin, Tus-Extension: creation, creation-with-upload, checksum, expiration, Tus-Resumable: 1.0.0, Tus-Version: 1.0.0, Vary: Origin, Prefer, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-Permitted-Cross-Domain-Policies: none, X-Request-Id: REQUEST_ID_2, X-Robots-Tag: none, X-Xss-Protection: 1; mode=block, } Data: [<d:multistatus xmlns:s=\"http://sabredav.org/ns\" xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\"><d:response><d:href>/remote.php/webdav/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 28 Jul 2025 20:50:52 GMT</d:getlastmodified></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>]"
25-08-20 18:37:26:286 [ debug sync.networkjob ]	[ OCC::AbstractNetworkJob::slotFinished ]:	Network job finished OCC::PropfindJob(OCC::Account("[email protected]"), "https://ocis.domain-name.com/remote.php/webdav/", "PROPFIND", Original-Request-ID: "REQUEST_ID_2", X-Request-ID: "REQUEST_ID_2")

Request 3

ID: REQUEST_ID_3 (9d4b8d2c-13b3-477c-af12-93959e8b94ae) URL: https://ocis.domain-name.com/dav/spaces/SPACE_ID/ Header: { Depth: 1, Prefer: return=minimal}

Request

25-08-20 18:37:26:338 [ info sync.networkjob ]:	Created OCC::PropfindJob(OCC::Account("[email protected]"), "https://ocis.domain-name.com/dav/spaces/SPACE_ID/", "PROPFIND", Original-Request-ID: "REQUEST_ID_3", X-Request-ID: "REQUEST_ID_3") for OCC::DiscoverySingleDirectoryJob(0x2ab45bc0)
25-08-20 18:37:26:346 [ info sync.httplogger ]:	"REQUEST_ID_3: Request: PROPFIND https://ocis.domain-name.com/dav/spaces/SPACE_ID/ Header: { Depth: 1, Prefer: return=minimal, Authorization: Bearer [redacted], User-Agent: user-agent, Accept: */*, Accept-Language: en_US, Content-Type: text/xml; charset=utf-8, X-Request-ID: REQUEST_ID_3, Original-Request-ID: REQUEST_ID_3, Content-Length: 467, } Data: [<?xml version=\"1.0\" encoding=\"utf-8\"?><d:propfind xmlns:d=\"DAV:\"><d:prop><d:resourcetype/><d:getlastmodified/><d:getcontentlength/><d:getetag/><id xmlns=\"http://owncloud.org/ns\"/><downloadURL xmlns=\"http://owncloud.org/ns\"/><dDC xmlns=\"http://owncloud.org/ns\"/><permissions xmlns=\"http://owncloud.org/ns\"/><checksums xmlns=\"http://owncloud.org/ns\"/><share-types xmlns=\"http://owncloud.org/ns\"/><data-fingerprint xmlns=\"http://owncloud.org/ns\"/></d:prop></d:propfind>\n]"

Response

25-08-20 18:37:26:357 [ info sync.httplogger ]:	"REQUEST_ID_3: Response: PROPFIND 207 (10ms) https://ocis.domain-name.com/dav/spaces/SPACE_ID/ Header: { Access-Control-Expose-Headers: Tus-Resumable, Tus-Version, Tus-Extension, Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/ https://keycloak.domain-name.com; default-src 'none'; font-src 'self'; frame-ancestors 'none'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline', Content-Type: application/xml; charset=utf-8, Date: Wed, 20 Aug 2025 16:37:26 GMT, Dav: 1, 3, extended-mkcol, Preference-Applied: return=minimal, Referrer-Policy: strict-origin-when-cross-origin, Tus-Extension: creation, creation-with-upload, checksum, expiration, Tus-Resumable: 1.0.0, Tus-Version: 1.0.0, Vary: Origin, Prefer, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-Permitted-Cross-Domain-Policies: none, X-Request-Id: REQUEST_ID_3, X-Robots-Tag: none, X-Xss-Protection: 1; mode=block, Transfer-Encoding: chunked, } Data: [XXXX]"

Again, I removed the response for privacy concern but it only contains informations of files and folders at the root level of the space (so the file concerned by the issue isn't listed). This response is very similar to the one of the first request, listing the same files and folders.

25-08-20 18:37:26:372 [ debug sync.networkjob ]	[ OCC::AbstractNetworkJob::slotFinished ]:	Network job finished OCC::PropfindJob(OCC::Account("[email protected]"), "https://ocis.domain-name.com/dav/spaces/SPACE_ID/", "PROPFIND", Original-Request-ID: "REQUEST_ID_3", X-Request-ID: "REQUEST_ID_3")

mcarbonne avatar Aug 20 '25 17:08 mcarbonne

I found a way to reproduce a similar bug: Take 2 computers A & B (with sync enabled). On computer A, inside the sync folder:

mkdir test
echo "a" > test/file_a.txt; echo "b">test/file_b.txt

wait for both files to be synced and available on computer B Then, on computer A, execute:

rm test/file_a.txt && mv test/file_b.txt test/file_a.txt

On computer B: test/file_b.txt is removed but test/file_a.txt still contains a instead of b.

This is slightly different from the bug I observed because on the web server, the content is still the old one but in my case, the content was update to date on the server.

EDIT : "force sync now" on computer A does not work, the file is never updated on the server

mcarbonne avatar Aug 21 '25 15:08 mcarbonne

This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 29 '25 00:09 github-actions[bot]

@mcarbonne can you please retest this with client 6.0.2? Thank you

DeepDiver1975 avatar Dec 01 '25 11:12 DeepDiver1975

@mcarbonne can you please retest this with client 6.0.2? Thank you

Yes, the issue is still present. I tested again using the same protocol I described above (https://github.com/owncloud/client/issues/12249#issuecomment-3211097052). The file is still not updated on the server (and therefore on other devices).

Client version 6.0.2.17506

mcarbonne avatar Dec 01 '25 20:12 mcarbonne