Login faild for Sync cal&con with DAVx5

Nextcloud version (eg, 20.0.5): 27.1.5.1
Operating system and version (eg, Ubuntu 20.04): debian bookworm (Proxmox LXC)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.57 (Debian)
PHP version (eg, 7.4): 8.2
Reverse Proxy: Nginx Proxy Manager (192.168.10.107)

The issue you are facing:

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

Steps to replicate it:

  1. Connection via Mobile Nexcloud app works fine.
  2. Open the Settings of the Nextcloud app.
  3. Choose “Sync calendar & contacts”.
  4. DAVx⁵ will open with Nextcloud Login Flow.
  5. Login with Username and App-Password faild.

After the login failed, DAVx5 shows: ‘Nextcloud-Serveraddress:’

https://nextcloud.domain.de/index.php/login/flow

If I call this address in my browser, then I see an error
Access Forbidden
Invalid request

The output of your Nextcloud log in Admin > Logging:

[no app in context] Warnung: Login failed: Mark (Remote IP: 192.168.10.1)

POST /index.php/login
from 192.168.10.1 at 2024-01-23T09:43:23+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'trusted_domains' =>
  array (
    0 => '192.168.10.102',
    1 => 'nextcloud.domain.de',
  ),
  'trusted_proxies' =>
  array (
    0 => '192.168.10.107',
  ),
  'datadirectory' => '/nc_data',
  'dbtype' => 'mysql',
  'version' => '27.1.5.1',
  'overwrite.cli.url' => 'https://nextcloud.domain.de',
  'overwriteprotcol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'installed' => true,
  'default_language' => 'de',
  'default_locale' => 'de',
  'default_phone_region' => 'DE',
  'skeletondirectory' => '',
  'loglevel' => 2,
  'filelocking.enabled' => 'true',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
);

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


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"Xwm7BBEsB4YBE7pJwXiy","level":2,"time":"2024-01-23T09:43:23+00:00","remoteAddr":"192.168.10.1","user":"--","app":"no app in context","method":"POST","url":"/index.php/login","message":"Login failed: Mark (Remote IP: 192.168.10.1)","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36","version":"27.1.5.1","data":[]}

NPM:

location /.well-known/carddav {
   return 301 $scheme://$host/remote.php/dav;
}

location /.well-known/caldav {
   return 301 $scheme://$host/remote.php/dav;
}