nextcloud / nextcloud/desktop

[Bug]: Sync Conflict After Digitally Signing PDF

Open
#6,131 0 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug feature: :arrows_counterclockwise: sync engine
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 17h
Merged PRs (30d)
123

Description

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

- [X] This is a **bug**, not a question or a configuration issue.
- [X] This issue is **not** already reported on Github (I've searched it).
- [X] Nextcloud Server and Desktop Client are **up to date**. See [Server Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) and [Desktop Releases](https://nextcloud.com/install/#install-clients) for supported versions.
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/)

### Bug description

After digitally signing a PDF, the original and signed versions are in conflict.

### Steps to reproduce

- Create a PDF (Print/Export a Word doc to PDF)
- Open in PDF Software (Bluebeam Revu 20)
- Apply digital signature

### Expected behavior

Client should allow new, signed version, of the file to upload cleanly.

### Which files are affected by this bug

src\libsync\owncloudpropagator.cpp:284

### Operating system

Windows

### Which version of the operating system you are running.

Windows 10, 22H2

### Package

Appimage

### Nextcloud Server version

27.1.1

### Nextcloud Desktop Client version

3.10.0

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

Updated to a major version (ex. 3.3.6 to 3.4.0)

### 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

```shell
2023-10-10 11:19:47:386 [ debug nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:91 ] [ OCC::ProcessDirectoryJob::start ]: adjusted discovery policy "[dir1]" OCC::ProcessDirectoryJob::ParentNotChanged "[dir1]" OCC::ProcessDirectoryJob::ParentNotChanged
2023-10-10 11:19:47:386 [ info nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:464 ]: Processing "[dir1]/file1.docx" | (db/local/remote) | valid: true/db/db | mtime: 1696623209/0/0 | size: 500799/0/0 | etag: "8a369d6e58ae3c5f5c6c811531e72cc4"//"" | checksum: ""//"" | perm: "WDNVRS"//"" | fileid: "00214541ocln140xv7c1"//"" | type: CSyncEnums::ItemTypeVirtualFile/CSyncEnums::ItemTypeSkip/CSyncEnums::ItemTypeFile | e2ee: false/false | e2eeMangledName: ""/"" | file lock: not locked// | metadata missing: /false/
2023-10-10 11:19:47:386 [ debug nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:979 ] [ OCC::ProcessDirectoryJob::processFileAnalyzeLocalInfo ]: File "[dir1]/file1.docx" - servermodified: false noServerEntry: false
2023-10-10 11:19:47:386 [ debug nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:1615 ] [ OCC::ProcessDirectoryJob::processFileFinalize ]: Discovered "[dir1]/file1.docx" CSyncEnums::CSYNC_INSTRUCTION_NONE OCC::SyncFileItem::None CSyncEnums::ItemTypeVirtualFile
2023-10-10 11:19:47:387 [ info nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:464 ]: Processing "[dir2]/file2.pdf" | (db/local/remote) | valid: true/true/db | mtime: 1696961407/1696961407/0 | size: 66191/66191/0 | etag: "72d5f63916e21b912773e4d2b4199dfb"//"" | checksum: "SHA1:1e35b5349db21a130ec4e8f435d6cb34cd22e0cb"//"" | perm: "WDNVRS"//"" | fileid: "00216335ocln140xv7c1"//"" | type: CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile | e2ee: false/false | e2eeMangledName: ""/"" | file lock: not locked// | metadata missing: /false/
2023-10-10 11:19:47:387 [ debug nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:979 ] [ OCC::ProcessDirectoryJob::processFileAnalyzeLocalInfo ]: File "[dir2]/file2.pdf" - servermodified: false noServerEntry: false
2023-10-10 11:19:47:387 [ debug nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:1615 ] [ OCC::ProcessDirectoryJob::processFileFinalize ]: Discovered "[dir2]/file2.pdf" CSyncEnums::CSYNC_INSTRUCTION_NONE OCC::SyncFileItem::None CSyncEnums::ItemTypeFile
2023-10-10 11:19:47:387 [ info nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:464 ]: Processing "[dir2]/file2.docx" | (db/local/remote) | valid: true/true/db | mtime: 1696961330/1696961330/0 | size: 105726/105726/0 | etag: "9e8de58219fbc7ee66a6551501a4f809"//"" | checksum: "MD5:46f7f3faab93a33e5e26d4983972cfeb"//"" | perm: "WDNVRS"//"" | fileid: "00211881ocln140xv7c1"//"" | type: CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile | e2ee: false/false | e2eeMangledName: ""/"" | file lock: not locked// | metadata missing: /false/
2023-10-10 11:19:47:387 [ debug nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:979 ] [ OCC::ProcessDirectoryJob::processFileAnalyzeLocalInfo ]: File "[dir2]/file2.docx" - servermodified: false noServerEntry: false
2023-10-10 11:19:47:387 [ debug nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\discovery.cpp:1615 ] [ OCC::ProcessDirectoryJob::processFileFinalize ]: Discovered "[dir2]/file2.docx" CSyncEnums::CSYNC_INSTRUCTION_NONE OCC::SyncFileItem::None CSyncEnums::ItemTypeFile
2023-10-10 11:19:47:387 [ info nextcloud.sync.engine C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncengine.cpp:774 ]: #### Discovery end #################################################### 182 ms
2023-10-10 11:19:47:387 [ info nextcloud.sync.engine C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncengine.cpp:824 ]: #### Reconcile (aboutToPropagate) #################################################### 182 ms
2023-10-10 11:19:47:387 [ info nextcloud.sync.statustracker C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncfilestatustracker.cpp:229 ]: Investigating ".sync-exclude.lst" OCC::SyncFileItem::NoStatus CSyncEnums::CSYNC_INSTRUCTION_IGNORE OCC::SyncFileItem::None
2023-10-10 11:19:47:387 [ info nextcloud.sync.statustracker C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncfilestatustracker.cpp:229 ]: Investigating "[dir2]/file2 (conflicted copy 2023-10-10 111652).pdf" OCC::SyncFileItem::Conflict CSyncEnums::CSYNC_INSTRUCTION_IGNORE OCC::SyncFileItem::None
2023-10-10 11:19:47:387 [ info nextcloud.sync.statustracker C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncfilestatustracker.cpp:229 ]: Investigating "[dir2]/~$018-file2.docx" OCC::SyncFileItem::NoStatus CSyncEnums::CSYNC_INSTRUCTION_IGNORE OCC::SyncFileItem::None
2023-10-10 11:19:47:387 [ info nextcloud.sync.statustracker C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncfilestatustracker.cpp:229 ]: Investigating "Projects/Readme.md" OCC::SyncFileItem::NoStatus CSyncEnums::CSYNC_INSTRUCTION_IGNORE OCC::SyncFileItem::None
2023-10-10 11:19:47:387 [ info nextcloud.sync.statustracker C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncfilestatustracker.cpp:229 ]: Investigating "Readme.md" OCC::SyncFileItem::NoStatus CSyncEnums::CSYNC_INSTRUCTION_IGNORE OCC::SyncFileItem::None
2023-10-10 11:19:47:388 [ info nextcloud.sync.engine C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncengine.cpp:831 ]: #### Reconcile (aboutToPropagate OK) #################################################### 183 ms
2023-10-10 11:19:47:388 [ debug nextcloud.sync.database C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\common\syncjournaldb.cpp:2689 ] [ OCC::SyncJournalDb::commitInternal ]: Transaction commit "post treewalk" and starting new transaction
2023-10-10 11:19:47:388 [ debug nextcloud.sync.database C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\common\syncjournaldb.cpp:1505 ] [ OCC::deleteBatch ]: Removing stale "downloadinfo" entries: "[dir2]/file2.pdf"
2023-10-10 11:19:47:388 [ info nextcloud.sync.engine C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncengine.cpp:231 ]: Deleting stale temporary file: "D:/NC/[dir2]/.file2.pdf.~2b0e"
2023-10-10 11:19:47:388 [ debug nextcloud.sync.database C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\common\syncjournaldb.cpp:1505 ] [ OCC::deleteBatch ]: Removing stale "blacklist" entries: "[dir2]/file2.pdf"
2023-10-10 11:19:47:388 [ debug nextcloud.sync.database C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\common\syncjournaldb.cpp:2689 ] [ OCC::SyncJournalDb::commitInternal ]: Transaction commit "post stale entry removal" and starting new transaction
2023-10-10 11:19:47:390 [ info nextcloud.sync.engine C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncengine.cpp:885 ]: #### Post-Reconcile end #################################################### 184 ms
2023-10-10 11:19:47:390 [ info nextcloud.gui.folder C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\folder.cpp:1150 ]: #### Propagation start ####################################################
2023-10-10 11:19:47:390 [ debug nextcloud.gui.socketapi C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\socketapi\socketapi.cpp:492 ] [ OCC::SocketApi::slotUpdateFolderView ]: Not sending UPDATE_VIEW for "2" because status() is OCC::SyncResult::SyncRunning
2023-10-10 11:19:47:390 [ info nextcloud.gui.application C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\owncloudgui.cpp:233 ]: Sync state changed for folder "https://nc.example.com/remote.php/dav/files/user" : "Sync running"
2023-10-10 11:19:47:393 [ info nextcloud.sync.propagator.root.directory C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\owncloudpropagator.cpp:1457 ]: scheduleSelfOrChild OCC::PropagatorJob::NotYetStarted pending uploads 0 subjobs state OCC::PropagatorJob::NotYetStarted
2023-10-10 11:19:47:393 [ info nextcloud.sync.propagator C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\owncloudpropagator.h:216 ]: Starting CSyncEnums::CSYNC_INSTRUCTION_IGNORE propagation of ".sync-exclude.lst" by OCC::PropagateIgnoreJob(0x1d0f08f5070)
2023-10-10 11:19:47:393 [ warning nextcloud.sync.propagator C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\owncloudpropagator.cpp:284 ]: Could not complete propagation of ".sync-exclude.lst" by OCC::PropagateIgnoreJob(0x1d0f08f5070) with status OCC::SyncFileItem::FileIgnored and error: "File is listed on the ignore list."
2023-10-10 11:19:47:393 [ debug nextcloud.sync.statustracker C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncfilestatustracker.cpp:274 ] [ OCC::SyncFileStatusTracker::slotItemCompleted ]: Item completed ".sync-exclude.lst" OCC::SyncFileItem::FileIgnored CSyncEnums::CSYNC_INSTRUCTION_IGNORE
2023-10-10 11:19:47:393 [ warning nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\tray\usermodel.cpp:873 ]: Item ".sync-exclude.lst" retrieved resulted in "File is listed on the ignore list."
2023-10-10 11:19:47:393 [ warning nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\tray\usermodel.cpp:835 ]: Item ".sync-exclude.lst" retrieved resulted in error "File is listed on the ignore list."
2023-10-10 11:19:47:393 [ info nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\tray\activitylistmodel.cpp:611 ]: First checking for duplicates then add file to the notification list of ignored files: ".sync-exclude.lst"
2023-10-10 11:19:47:397 [ info nextcloud.sync.propagator.root.directory C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\owncloudpropagator.cpp:1457 ]: scheduleSelfOrChild OCC::PropagatorJob::Running pending uploads 0 subjobs state OCC::PropagatorJob::Running
2023-10-10 11:19:47:397 [ info nextcloud.sync.propagator C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\owncloudpropagator.h:216 ]: Starting CSyncEnums::CSYNC_INSTRUCTION_IGNORE propagation of "[dir2]/file2 (conflicted copy 2023-10-10 111652).pdf" by OCC::PropagateIgnoreJob(0x1d0f08f5610)
2023-10-10 11:19:47:397 [ warning nextcloud.sync.propagator C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\owncloudpropagator.cpp:284 ]: Could not complete propagation of "[dir2]/file2 (conflicted copy 2023-10-10 111652).pdf" by OCC::PropagateIgnoreJob(0x1d0f08f5610) with status OCC::SyncFileItem::Conflict and error: "Conflict: Server version downloaded, local copy renamed and not uploaded."
2023-10-10 11:19:47:397 [ debug nextcloud.sync.statustracker C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\libsync\syncfilestatustracker.cpp:274 ] [ OCC::SyncFileStatusTracker::slotItemCompleted ]: Item completed "[dir2]/file2 (conflicted copy 2023-10-10 111652).pdf" OCC::SyncFileItem::Conflict CSyncEnums::CSYNC_INSTRUCTION_IGNORE
2023-10-10 11:19:47:397 [ warning nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\tray\usermodel.cpp:873 ]: Item "[dir2]/file2 (conflicted copy 2023-10-10 111652).pdf" retrieved resulted in "Conflict: Server version downloaded, local copy renamed and not uploaded."
2023-10-10 11:19:47:397 [ warning nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\tray\usermodel.cpp:835 ]: Item "[dir2]/file2 (conflicted copy 2023-10-10 111652).pdf" retrieved resulted in error "Conflict: Server version downloaded, local copy renamed and not uploaded."
2023-10-10 11:19:47:397 [ debug nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-17670\client-building\desktop\src\gui\tray\activitylistmodel.cpp:599 ] [ OCC::ActivityListModel::addErrorToActivityList ]: Error successfully added to the notification list: OCC::ActivityListModel::ErrorType::SyncError "[dir2]/file2 (conflicted copy 2023-10-10 111652).pdf" "Conflict: Server version downloaded, local copy renamed and not uploaded." OCC::SyncResult::Undefined OCC::SyncFileItem::Conflict
```

### Additional info
This first appeared in 3.10.0. Prior to 3.10, the client was crashing. So it's an improved situation, but still inconvenient.

I've retained full desktop logs from before/after the event, can email to the devs if the above snippet didn't capture enough context. I've also retained server logs for the same period. Too much hassle sanitizing the PII for a public post.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.