Synchronization stopped with "Daten sind verfälscht" as error-message

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.6
Operating system and version (eg, Ubuntu 20.04): Linux nextpi 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.54
PHP version (eg, 7.4): PHP 8.0.1

The issue you are facing:

Before this problem occurred, I’ve got a lot of “1213 Deadlock found”-messages as they are already described in

that I assume are the cause for the current problem. After a restart of the computer with the client I now get the following error-message

The error doesn’t go away. I’ve looked through the apache logs where I don’t see any error messages and the client debug log only contains essentially the same information that can be seen in the GUI:

2022-10-18 09:12:30:884 [ warning nextcloud.sync.networkjob C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\libsync\abstractnetworkjob.cpp:224 ]:	QNetworkReply::ProtocolFailure "Die Daten sind verfälscht" QVariant(int, 207)
2022-10-18 09:12:30:884 [ warning nextcloud.sync.credentials.webflow C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\gui\creds\webflowcredentials.cpp:228 ]:	QNetworkReply::ProtocolFailure
2022-10-18 09:12:30:884 [ warning nextcloud.sync.credentials.webflow C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\gui\creds\webflowcredentials.cpp:229 ]:	"Die Daten sind verfälscht"
2022-10-18 09:12:30:884 [ info nextcloud.sync.networkjob.lscol C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\libsync\networkjobs.cpp:395 ]:	LSCOL of QUrl(" - Computer Productivity & Coding/3D Printing/CH08/Figures") FINISHED WITH STATUS "ProtocolFailure Die Daten sind verfälscht"
2022-10-18 09:12:30:884 [ warning nextcloud.sync.networkjob.lscol C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\libsync\networkjobs.cpp:315 ]:	ERROR "Vorzeitiges Ende des Dokuments." ""
2022-10-18 09:12:30:884 [ warning nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\libsync\discoveryphase.cpp:589 ]:	LSCOL job error "Die Daten sind verfälscht" 207 QNetworkReply::ProtocolFailure
2022-10-18 09:12:30:884 [ warning sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\libsync\discovery.cpp:1746 ]:	Server error in directory "Ebooks/Mercury - Computer Productivity & Coding/3D Printing/CH08/Figures" 207
2022-10-18 09:12:30:884 [ warning nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\gui\tray\usermodel.cpp:493 ]:	Item  "F:\\Owncloud\\Humble Bundle"  retrieved resulted in  "Der Server hat während des Lesens des Verzeichnisses \"Ebooks/Mercury - Computer Productivity & Coding/3D Printing/CH08/Figures\" mit einem Fehler geantwortet: Die Daten sind verfälscht"
2022-10-18 09:12:30:884 [ info nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-11567\client-building\desktop\src\gui\tray\activitylistmodel.cpp:551 ]:	Error successfully added to the notification list:  "Der Server hat während des Lesens des Verzeichnisses \"Ebooks/Mercury - Computer Productivity & Coding/3D Printing/CH08/Figures\" mit einem Fehler geantwortet: Die Daten sind verfälscht"

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

I’m not sure how to replicate it

The output of your Nextcloud log in Admin > Logging:
The last entry before I got this error in the client is one of the serialization-errors that I’ve mentioned

[index] Fehler: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at <<closure>>

 0. /var/www/nextcloud/lib/private/DB/ConnectionAdapter.php line 109
 1. /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php line 132
 2. /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php line 178
 3. /var/www/nextcloud/lib/private/Files/Storage/Common.php line 758
 4. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 610
 5. /var/www/nextcloud/lib/private/Files/Cache/Scanner.php line 149
 6. /var/www/nextcloud/lib/private/Files/Cache/LocalRootScanner.php line 31
 7. /var/www/nextcloud/lib/private/Files/Cache/Scanner.php line 438
 8. /var/www/nextcloud/lib/private/Files/Cache/Scanner.php line 390
 9. /var/www/nextcloud/lib/private/Files/Cache/Scanner.php line 342
10. /var/www/nextcloud/lib/private/Files/Cache/LocalRootScanner.php line 39
11. /var/www/nextcloud/lib/private/Files/View.php line 1350
12. /var/www/nextcloud/lib/private/Files/View.php line 1390
13. /var/www/nextcloud/lib/private/Files/Node/Root.php line 205
14. <<closure>>
15. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 72
16. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 149
17. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 107
18. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 156
19. /var/www/nextcloud/lib/private/Preview/Storage/Root.php line 74
20. /var/www/nextcloud/lib/private/Preview/Generator.php line 573
21. /var/www/nextcloud/lib/private/Preview/Generator.php line 134
22. /var/www/nextcloud/lib/private/Preview/Generator.php line 111
23. /var/www/nextcloud/lib/private/PreviewManager.php line 212
24. /var/www/nextcloud/core/Controller/PreviewController.php line 169
25. /var/www/nextcloud/core/Controller/PreviewController.php line 142
26. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
27. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
28. /var/www/nextcloud/lib/private/AppFramework/App.php line 172
29. /var/www/nextcloud/lib/private/Route/Router.php line 298
30. /var/www/nextcloud/lib/base.php line 1030
31. /var/www/nextcloud/index.php line 36

GET /nextcloud/index.php/core/preview?fileId=739&c=b7e23c5ef451def82b211194f4358143&x=250&y=250&forceIcon=0&a=1
from by user at 2022-10-18T07:04:44+00:00```

The output of your Apache/nginx/system log in /var/log/____:

The Apache error.log only shows the serialization error:

[Tue Oct 18 09:04:33.761922 2022] [php:error] [pid 18041] [client] PHP Fatal error:  Uncaught PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transac...

The installation is “single-user”, i.e. only I’m using it. Only one client was uploading data at the time of the “serialization error” (but I assume parallel uploads were taking place).

How can I find out what data have been “falsified” and how can I fix this? How can all these serialization errors be fixed. The thread I’ve linked to above is quite old and seem to have a “no fix, just live with it until it’s fixed”-solution.

Some things more I’ve found. I’ve traced the communication between client and server using Wireshark and it seems that the PROPFIND-request for the problematic folders gets prematurely closed. When looking at the Apache access-log that particular request doesn’t show up:

root@nextpi:/var/log/apache2# grep -c “3D Printing/CH08/Figures HTTP” access.log

The Apache error.log doesn’t show any entries at the time of the request. Is there some log by Nextcloud where more info can be found?

I’ve found out the reason and found a workaround. Culprit is the gzip-compression that takes place in

It seems that gzencode can crash in a strange way that it doesn’t produce an error in any log file and no error to the client. The result in question doesn’t need to be long (that also leads to problems if uncompressed result plus compressed result exceeds the allowed memory limit). One of the problematic folders Here[TM] only contained eight files.

I’ve changed above php-file to stop compressing and now the client is happily synchronizing. As a bonus, a folder the client showed as completely synced actually had 10,000 more files to be uploaded. I’ve opened issues on GitHub, maybe there will be a fix at some time.

What did you change it to, to stop the gzip compression?

Unlikely but maybe worth a look

Maybe a problem with Memory caching.
Maybe a problem with Transactional file locking.

For one user do not use Redis and also set:
filelocking.enabled' => false,

I use APCu.

        public function compressResponse(Request $request, Response $response) {
                $header = $request->getHeader('Accept-Encoding');
if (true) return $response;

Thanks for the answer, but that did not work for me :slight_smile:

My config.php doesn’t contain any memcache- or Redis settings. So I guess that this is not the reason. As already mentioned: Culprit is a crashing gzencode that doesn’t show up in the logs.