Windows client won't connect albeit having a connection, probably a E2E error

Nextcloud version: Client: 3.0.2, Server 19.0.3
Operating system and version: Client: Windows 10 Home, Server: Ubuntu 20.0.4 LTS
Apache or nginx version: Caddyv2
PHP version: 7.3

The issue you are facing:
The windows client will say that it couldn’t connect to my cloud. Other clients and the website on the same server are able to connect and even Wireshark is recording some connectivity. As far as I can see, this seems to be a problem of the E2E public/private key or some other security related stuff.

Is this the first time you’ve seen this error?: Y

config.php

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '',
  ),
  'datadirectory' => '',
  'dbtype' => 'mysql',
  'version' => '19.0.3.1',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
  ),
  'app_install_overwrite' => 
  array (
    0 => 'drawio',
  ),
  'maintenance' => false,
  'mail_from_address' => '',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'tls',
  'mail_smtphost' => '',
  'mail_smtpport' => '587',
  'mail_smtpname' => '',
  'mail_smtppassword' => ',
  'theme' => '',
  'loglevel' => 2,
  'allow_local_remote_servers' => true,
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'data-fingerprint' => '',
);

Client log file:

2020-10-03 23:13:40:292 [ info nextcloud.gui.folder.manager ]:	Setup folders from settings file
2020-10-03 23:13:40:303 [ info nextcloud.sync.database ]:	Detected filesystem "NTFS" for "C:/Users/Anwender/AppData/Roaming/Nextcloud/._sync_bcdd439e8fdd.db"
2020-10-03 23:13:40:305 [ info nextcloud.sync.configfile ]:	Adding user defined ignore list to csync: "C:/Users/Anwender/AppData/Roaming/Nextcloud/sync-exclude.lst"
2020-10-03 23:13:40:309 [ info nextcloud.gui.folder.manager ]:	Adding folder to Folder Map  OCC::Folder(0x1dea49a3600) "1"
2020-10-03 23:13:40:310 [ info nextcloud.gui.folder.manager ]:	Schedule folder  "1"  to sync!
2020-10-03 23:13:40:310 [ info nextcloud.gui.folder.manager ]:	Folder is not ready to sync, not scheduled!
2020-10-03 23:13:40:313 [ info nextcloud.gui.application ]:	Sync state changed for folder  "https://cloud.example.com/remote.php/webdav/" :  "Not yet Started"
2020-10-03 23:13:40:316 [ info nextcloud.sync.database ]:	sqlite3 version "3.24.0"
2020-10-03 23:13:40:317 [ info nextcloud.sync.database ]:	sqlite3 journal_mode= "wal"
2020-10-03 23:13:40:319 [ info nextcloud.sync.clientproxy ]:	Set proxy configuration to use the preferred system proxy for http tcp connections
2020-10-03 23:13:40:532 [ info nextcloud.sync.credentials.webflow ]:	Fetch from keychain!
2020-10-03 23:13:40:538 [ info nextcloud.gui.socketapi ]:	New connection QLocalSocket(0x1dea4dad8f0)
2020-10-03 23:13:40:539 [ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "Nextcloud_user0_clientCertificatePEM:https://cloud.example.com/:0" chunk "0" "Password entry not found"
2020-10-03 23:13:40:545 [ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "Nextcloud_user0_clientKeyPEM:https://cloud.example.com/:0" chunk "0" "Password entry not found"
2020-10-03 23:13:40:546 [ warning nextcloud.sync.credentials.webflow ]:	Unable to read client key "Password entry not found"
2020-10-03 23:13:40:546 [ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "Nextcloud_user0_clientCaCertificatePEM0:https://cloud.example.com/:0" chunk "0" "Password entry not found"
2020-10-03 23:13:40:547 [ warning nextcloud.sync.credentials.webflow ]:	Unable to read client CA cert slot "0" "Password entry not found"
2020-10-03 23:13:40:550 [ info nextcloud.gui.account.state ]:	Fetched credentials for "https://cloud.example.com" attempting to connect
2020-10-03 23:13:40:551 [ info nextcloud.sync.credentials.webflow ]:	Get QNAM
2020-10-03 23:13:40:554 [ info nextcloud.sync.connectionvalidator ]:	No system proxy set by OS
2020-10-03 23:13:40:555 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/status.php" has X-Request-ID "d81a7caf-1faa-4ef4-bbf3-71c64e02a936"
2020-10-03 23:13:40:555 [ info nextcloud.sync.networkjob ]:	OCC::CheckServerJob created for "https://cloud.example.com" + "status.php" "OCC::ConnectionValidator"
2020-10-03 23:13:40:770 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:40:771 [ info nextcloud.sync.networkjob.checkserver ]:	status.php returns:  QJsonDocument({"edition":"","extendedSupport":false,"installed":true,"maintenance":false,"needsDbUpgrade":false,"productname":"Nextcloud","version":"19.0.3.1","versionstring":"19.0.3"})   QNetworkReply::NoError  Reply:  QNetworkReplyHttpImpl(0x1dea4bb7d30)
2020-10-03 23:13:40:771 [ info nextcloud.sync.connectionvalidator ]:	** Application: ownCloud found:  QUrl("https://cloud.example.com")  with version  "19.0.3" ( "19.0.3.1" )
2020-10-03 23:13:40:772 [ info nextcloud.sync.connectionvalidator ]:	QUrl("https://cloud.example.com") has server version "19.0.3.1"
2020-10-03 23:13:40:781 [ info nextcloud.sync.account ]:	appPassword stored in keychain
2020-10-03 23:13:40:782 [ info nextcloud.sync.accessmanager ]:	6 "PROPFIND" "https://cloud.example.com/remote.php/webdav/" has X-Request-ID "c614914a-fb0d-4fd0-8678-5d696f80ee1f"
2020-10-03 23:13:40:782 [ info nextcloud.sync.networkjob ]:	OCC::PropfindJob created for "https://cloud.example.com" + "/" "OCC::ConnectionValidator"
2020-10-03 23:13:41:256 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:256 [ info nextcloud.sync.networkjob.propfind ]:	PROPFIND of QUrl("https://cloud.example.com/remote.php/webdav/") FINISHED WITH STATUS "OK"
2020-10-03 23:13:41:257 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/ocs/v1.php/cloud/capabilities?format=json" has X-Request-ID "63a1a06b-926e-456d-9d35-2572fbc95534"
2020-10-03 23:13:41:257 [ info nextcloud.sync.networkjob ]:	OCC::JsonApiJob created for "https://cloud.example.com" + "ocs/v1.php/cloud/capabilities" "OCC::ConnectionValidator"
2020-10-03 23:13:41:258 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/ocs/v1.php/config?format=json" has X-Request-ID "5946e06d-58c3-48f9-8a2a-96036eaa4590"
2020-10-03 23:13:41:258 [ info nextcloud.sync.networkjob ]:	OCC::JsonApiJob created for "https://cloud.example.com" + "ocs/v1.php/config" ""
2020-10-03 23:13:41:374 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:374 [ info nextcloud.sync.networkjob.jsonapi ]:	JsonApiJob of QUrl("https://cloud.example.com/ocs/v1.php/cloud/capabilities?format=json") FINISHED WITH STATUS "OK"
2020-10-03 23:13:41:375 [ info nextcloud.sync.connectionvalidator ]:	Server capabilities QJsonObject({"activity":{"apiv2":["filters","filters-api","previews","rich-strings"]},"bruteforce":{"delay":0},"core":{"pollinterval":60,"webdav-root":"remote.php/webdav"},"dav":{"chunking":"1.0"},"deck":{"version":"1.0.5"},"end-to-end-encryption":{"api-version":"1.1","enabled":true},"files":{"bigfilechunking":true,"blacklisted_files":[".htaccess"],"directEditing":{"etag":"a08d011a3a406d289813e0e4c861f4f4","url":"https://cloud.example.com/ocs/v2.php/apps/files/api/v1/directEditing"},"undelete":true,"versioning":true},"files_sharing":{"api_enabled":true,"default_permissions":31,"federation":{"expire_date":{"enabled":true},"incoming":true,"outgoing":true},"group":{"enabled":true,"expire_date":{"enabled":true}},"group_sharing":true,"public":{"enabled":true,"expire_date":{"enabled":false},"expire_date_internal":{"enabled":false},"multiple_links":true,"password":{"askForOptionalPassword":false,"enforced":false},"send_mail":false,"upload":true,"upload_files_drop":true},"resharing":true,"sharebymail":{"enabled":true,"expire_date":{"enabled":true},"password":{"enabled":true},"upload_files_drop":{"enabled":true}},"sharee":{"query_lookup_default":false},"user":{"expire_date":{"enabled":true},"send_mail":false}},"fulltextsearch":{"providers":[],"remote":true},"notes":{"api_version":["0.2","1.1"],"version":"3.6.4"},"notifications":{"admin-notifications":["ocs","cli"],"ocs-endpoints":["list","get","delete","delete-all","icons","rich-strings","action-web"],"push":["devices","object-data","delete"]},"ocm":{"apiVersion":"1.0-proposal1","enabled":true,"endPoint":"https://cloud.example.com/index.php/ocm","resourceTypes":[{"name":"file","protocols":{"webdav":"/public.php/webdav/"},"shareTypes":["user","group"]}]},"password_policy":{"api":{"generate":"https://cloud.example.com/ocs/v2.php/apps/password_policy/api/v1/generate","validate":"https://cloud.example.com/ocs/v2.php/apps/password_policy/api/v1/validate"},"enforceNonCommonPassword":true,"enforceNumericCharacters":false,"enforceSpecialCharacters":false,"enforceUpperLowerCase":false,"minLength":8},"spreed":{"config":{"attachments":{"allowed":true,"folder":"/Talk"},"chat":{"max-length":32000},"conversations":{"can-create":true}},"features":["audio","video","chat-v2","conversation-v2","guest-signaling","empty-group-room","guest-display-names","multi-room-users","favorites","last-room-activity","no-ping","system-messages","mention-flag","in-call-flags","notification-levels","invite-groups-and-mails","locked-one-to-one-rooms","read-only-rooms","chat-read-marker","webinary-lobby","start-call-flag","chat-replies","circles-support","force-mute","chat-reference-id"]},"theming":{"background":"https://cloud.example.com/core/img/background.png?v=0","background-default":true,"background-plain":false,"color":"#0082c9","color-element":"#0082c9","color-element-bright":"#0082c9","color-element-dark":"#0082c9","color-text":"#ffffff","favicon":"https://cloud.example.com/core/img/logo/logo.svg?v=0","logo":"https://cloud.example.com/core/img/logo/logo.svg?v=0","logoheader":"https://cloud.example.com/core/img/logo/logo.svg?v=0","name":"Nextcloud","slogan":"ein sicherer Ort fĂĽr all Ihre Daten","url":"https://nextcloud.com"}})
2020-10-03 23:13:41:377 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/ocs/v2.php/apps/files/api/v1/directEditing?format=json" has X-Request-ID "e9ad5819-4254-46ca-84f4-46fa76e99d8d"
2020-10-03 23:13:41:378 [ info nextcloud.sync.networkjob ]:	OCC::JsonApiJob created for "https://cloud.example.com" + "ocs/v2.php/apps/files/api/v1/directEditing" "OCC::Account"
2020-10-03 23:13:41:379 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/ocs/v1.php/cloud/user?format=json" has X-Request-ID "7c5a4e73-fc73-4ea5-ae14-2ee95a818dd2"
2020-10-03 23:13:41:379 [ info nextcloud.sync.networkjob ]:	OCC::JsonApiJob created for "https://cloud.example.com" + "ocs/v1.php/cloud/user" "OCC::UserInfo"
2020-10-03 23:13:41:471 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:471 [ info nextcloud.sync.networkjob.jsonapi ]:	JsonApiJob of QUrl("https://cloud.example.com/ocs/v1.php/config?format=json") FINISHED WITH STATUS "OK"
2020-10-03 23:13:41:471 [ info nextcloud.sync.connectionvalidator ]:	Determined user-visible host to be "cloud.example.com"
2020-10-03 23:13:41:524 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:524 [ info nextcloud.sync.networkjob.jsonapi ]:	JsonApiJob of QUrl("https://cloud.example.com/ocs/v2.php/apps/files/api/v1/directEditing?format=json") FINISHED WITH STATUS "OK"
2020-10-03 23:13:41:584 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:584 [ info nextcloud.sync.networkjob.jsonapi ]:	JsonApiJob of QUrl("https://cloud.example.com/ocs/v1.php/cloud/user?format=json") FINISHED WITH STATUS "OK"
2020-10-03 23:13:41:585 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/remote.php/dav/avatars/user0/128.png" has X-Request-ID "95faf078-cf5d-4569-ac99-3c414c3723e4"
2020-10-03 23:13:41:586 [ info nextcloud.sync.networkjob ]:	OCC::AvatarJob created for "https://cloud.example.com" + "" "OCC::UserInfo"
2020-10-03 23:13:41:686 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:687 [ info nextcloud.sync.clientsideencryption ]:	Initializing
2020-10-03 23:13:41:688 [ info nextcloud.sync.server.capabilities ]:	E2EE API version: "1.1"
2020-10-03 23:13:41:693 [ info nextcloud.sync.clientsideencryption ]:	Retrieving public key from server
2020-10-03 23:13:41:694 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/public-key?format=json" has X-Request-ID "e48c8b7b-2f21-40bb-a180-9b9a14b6672e"
2020-10-03 23:13:41:694 [ info nextcloud.sync.networkjob ]:	OCC::JsonApiJob created for "https://cloud.example.com" + "ocs/v2.php/apps/end_to_end_encryption/api/v1/public-key" "OCC::ClientSideEncryption"
2020-10-03 23:13:41:800 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:801 [ info nextcloud.sync.networkjob.jsonapi ]:	JsonApiJob of QUrl("https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/public-key?format=json") FINISHED WITH STATUS "OK"
2020-10-03 23:13:41:802 [ info nextcloud.sync.clientsideencryption ]:	"-----BEGIN CERTIFICATE-----"
2020-10-03 23:13:41:803 [ info nextcloud.sync.clientsideencryption ]:	Found Public key, requesting Private Key.
2020-10-03 23:13:41:804 [ info nextcloud.sync.clientsideencryption ]:	Retrieving private key from server
2020-10-03 23:13:41:804 [ info nextcloud.sync.accessmanager ]:	2 "" "https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key?format=json" has X-Request-ID "1bb9a60b-0316-43bb-a921-1786f39c7d3e"
2020-10-03 23:13:41:805 [ info nextcloud.sync.networkjob ]:	OCC::JsonApiJob created for "https://cloud.example.com" + "ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key" "OCC::ClientSideEncryption"
2020-10-03 23:13:41:914 [ info nextcloud.sync.credentials.webflow ]:	request finished
2020-10-03 23:13:41:915 [ warning nextcloud.sync.networkjob ]:	QNetworkReply::ContentNotFoundError "Server hat \"404 Not Found\" auf \"GET https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key?format=json\" geantwortet" QVariant(int, 404)
2020-10-03 23:13:41:915 [ warning nextcloud.sync.credentials.webflow ]:	QNetworkReply::ContentNotFoundError
2020-10-03 23:13:41:915 [ warning nextcloud.sync.credentials.webflow ]:	"Error transferring https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key?format=json - server replied: Not Found"
2020-10-03 23:13:41:916 [ info nextcloud.sync.networkjob.jsonapi ]:	JsonApiJob of QUrl("https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key?format=json") FINISHED WITH STATUS "ContentNotFoundError Server hat \"404 Not Found\" auf \"GET https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key?format=json\" geantwortet"
2020-10-03 23:13:41:916 [ warning nextcloud.sync.networkjob.jsonapi ]:	Network error:  "ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key" "Server hat \"404 Not Found\" auf \"GET https://cloud.example.com/ocs/v2.php/apps/end_to_end_encryption/api/v1/private-key?format=json\" geantwortet" QVariant(int, 404)
2020-10-03 23:13:41:916 [ info nextcloud.sync.clientsideencryption ]:	No private key on the server: setup is incomplete.
2020-10-03 23:13:43:334 [ info nextcloud.gui.updater ]:	Checking for available update
2020-10-03 23:13:43:334 [ info nextcloud.sync.accessmanager ]:	2 "" "https://updates.nextcloud.org/client/?version=3.0.2.20200924&platform=win32&oem=Nextcloud&versionsuffix=stable-Win64&updatesegment=7" has X-Request-ID "2cc34c07-3ca7-4b3d-98d1-5723c87e91a1"
2020-10-03 23:13:43:525 [ info nextcloud.gui.updater ]:	Client is on latest version!
2020-10-03 23:14:12:332 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:14:44:327 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:15:16:327 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:15:48:327 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:16:20:331 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:16:52:332 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:17:24:327 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:17:56:331 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:18:28:333 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:19:00:330 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:19:32:337 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:20:04:336 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:20:36:338 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:21:08:326 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:21:40:332 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:22:12:327 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:22:44:328 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"
2020-10-03 23:23:16:659 [ warning nextcloud.gui.account.state ]:	ConnectionValidator already running, ignoring "user0@cloud.example.com"