Nextcloud: Access Forbidden: Invalid App Password Issue

Hi,
When attempting to access my NextCloud server via the link “https://nextcloud.prodesigners-omvcloud.duckdns.org”, I receive the message “Nextcloud - a safe home for all your data,” prompting me to install the NextCloud app. Upon installation and subsequent attempt to access the server using the application-generated link, I am prompted to enter my username and password. However, upon entering the credentials and clicking on “Grant Access,” I am met with the following error message:

“Access Forbidden Invalid app password Nextcloud – a safe home for all your data”

This issue persists despite multiple attempts, and I am unable to access my NextCloud server through the application.
Thank you in advance for your time and assistance.

Hi @abdellah_gasmi, your nextcloud server seems misconfigured or something went wrong in your apache2/nginx config because a login page should be displayed.

Can you provide more information like nextcloud version, type of installation ( VM , docker, manual, snap)
web server software : (nginx, apache2,…)
errors related to your issue

1 Like

Hi @Mageunic , Thank you for your cooperation.
The problem started with me after updating version 28.0.2
type of installation: Docker
web server : nginx

@Mageunic
Nextcloud.log
{“reqId”:“8PExUUYwpJI4HWjNykFG”,“level”:3,“time”:“2023-12-26T12:39:22+00:00”,“remoteAddr”:“78.100.250.121”,“user”:“Abdallah”,“app”:“richdocuments”,“method”:“GET”,“url”:“/ocs/v2.php/apps/notifications/api/v2/notifications”,“message”:“Failed to fetch the Collabora capabilities endpoint: Client error: GET https://nextcloud.prodesigners-omvcloud.duckdns.org/apps/richdocumentscode/proxy.php?req=/hosting/capabilities resulted in a 404 Not Found response:\n\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n
nginx</c (truncated…)\n”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36”,“version”:“27.1.5.1”,“exception”:{“Exception”:“GuzzleHttp\Exception\ClientException”,“Message”:“Client error: GET https://nextcloud.prodesigners-omvcloud.duckdns.org/apps/richdocumentscode/proxy.php?req=/hosting/capabilities resulted in a 404 Not Found response:\n\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n
nginx</c (truncated…)\n”,“Code”:404,“Trace”:[{“file”:“/config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php”,“line”:69,“function”:“create”,“class”:“GuzzleHttp\Exception\RequestException”,“type”:“::”,“args”:[“*** sensitive parameters replaced “]},{“file”:”/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",“line”:204,“function”:“GuzzleHttp\{closure}”,“class”:“GuzzleHttp\Middleware”,“type”:“::”,“args”:[" sensitive parameters replaced “]},{“file”:”/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",“line”:153,“function”:“callHandler”,“class”:“GuzzleHttp\Promise\Promise”,“type”:“::”},{“file”:“/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php”,“line”:48,“function”:“GuzzleHttp\Promise\{closure}”,“class”:“GuzzleHttp\Promise\Promise”,“type”:“::”,“args”:[" sensitive parameters replaced “]},{“file”:”/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",“line”:248,“function”:“run”,“class”:“GuzzleHttp\Promise\TaskQueue”,“type”:“->”},{“file”:“/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php”,“line”:224,“function”:“invokeWaitFn”,“class”:“GuzzleHttp\Promise\Promise”,“type”:“->”},{“file”:“/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php”,“line”:269,“function”:“waitIfPending”,“class”:“GuzzleHttp\Promise\Promise”,“type”:“->”},{“file”:“/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php”,“line”:226,“function”:“invokeWaitList”,“class”:“GuzzleHttp\Promise\Promise”,“type”:“->”},{“file”:“/config/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php”,“line”:62,“function”:“waitIfPending”,“class”:“GuzzleHttp\Promise\Promise”,“type”:“->”},{“file”:“/config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php”,“line”:187,“function”:“wait”,“class”:“GuzzleHttp\Promise\Promise”,“type”:“->”},{“file”:“/config/www/nextcloud/lib/private/Http/Client/Client.php”,“line”:230,“function”:“request”,“class”:“GuzzleHttp\Client”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php”,“line”:135,“function”:“get”,“class”:“OC\Http\Client\Client”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php”,“line”:73,“function”:“refetch”,“class”:“OCA\Richdocuments\Service\CapabilitiesService”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php”,“line”:93,“function”:“getCapabilities”,“class”:“OCA\Richdocuments\Service\CapabilitiesService”,“type”:“->”},{“file”:“/config/www/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php”,“line”:45,“function”:“OCA\Richdocuments\AppInfo\{closure}”,“class”:“OCA\Richdocuments\AppInfo\Application”,“type”:“->”,“args”:[" sensitive parameters replaced ***”]},{“file”:“/config/www/nextcloud/lib/private/AppFramework/Bootstrap/BootContext.php”,“line”:50,“function”:“injectFn”,“class”:“OC\AppFramework\Bootstrap\FunctionInjector”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php”,“line”:92,“function”:“injectFn”,“class”:“OC\AppFramework\Bootstrap\BootContext”,“type”:“->”},{“file”:“/config/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php”,“line”:200,“function”:“boot”,“class”:“OCA\Richdocuments\AppInfo\Application”,“type”:“->”},{“file”:“/config/www/nextcloud/lib/private/App/AppManager.php”,“line”:437,“function”:“bootApp”,“class”:“OC\AppFramework\Bootstrap\Coordinator”,“type”:“->”},{“file”:“/config/www/nextcloud/lib/private/App/AppManager.php”,“line”:216,“function”:“loadApp”,“class”:“OC\App\AppManager”,“type”:“->”},{“file”:“/config/www/nextcloud/lib/private/legacy/OC_App.php”,“line”:126,“function”:“loadApps”,“class”:“OC\App\AppManager”,“type”:“->”},{“file”:“/config/www/nextcloud/ocs/v1.php”,“line”:59,“function”:“loadApps”,“class”:“OC_App”,“type”:“::”},{“file”:“/config/www/nextcloud/ocs/v2.php”,“line”:23,“args”:[“/config/www/nextcloud/ocs/v1.php”],“function”:“require_once”}],“File”:“/config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php”,“Line”:113,“message”:“Failed to fetch the Collabora capabilities endpoint: Client error: GET https://nextcloud.prodesigners-omvcloud.duckdns.org/apps/richdocumentscode/proxy.php?req=/hosting/capabilities resulted in a 404 Not Found response:\n\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n
nginx</c (truncated…)\n”,“exception”:{},“CustomMessage”:“Failed to fetch the Collabora capabilities endpoint: Client error: GET https://nextcloud.prodesigners-omvcloud.duckdns.org/apps/richdocumentscode/proxy.php?req=/hosting/capabilities resulted in a 404 Not Found response:\n\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n
nginx</c (truncated…)\n”}}

@abdellah_gasmi the log that you have posted is related to collabora app.
have you tried to disable it using the occ command ?

@Mageunic i used the command : sudo -u www-data php occ app:disable richdocuments, but still the same pb

@abdellah_gasmi have you any other error in the nextcloud log ?

@Mageunic ,
SWAG/nginx/error.log:
2024/03/04 00:52:27 [error] 420#420: *158 open() “/config/www/favicon.ico” failed (2: No such file or directory), client: 167.94.146.52, server: _, request: “GET /favicon.ico HTTP/1.1”, host: “89.211.219.228”
2024/03/04 01:49:55 [error] 420#420: *166 open() “/config/www/favicon.ico” failed (2: No such file or directory), client: 87.236.176.31, server: _, request: “GET /favicon.ico HTTP/2.0”, host: “89.211.219.228”
2024/03/04 01:49:55 [error] 420#420: *167 open() “/config/www/favicon.ico” failed (2: No such file or directory), client: 206.189.7.178, server: _, request: “GET /favicon.ico HTTP/2.0”, host: “89.211.219.228”
2024/03/04 01:49:56 [error] 420#420: *168 open() “/config/www/favicon.ico” failed (2: No such file or directory), client: 77.105.146.42, server: _, request: “GET /favicon.ico HTTP/2.0”, host: “89.211.219.228”
2024/03/04 06:41:38 [error] 422#422: *212 “/config/www/webui/index.html” is not found (2: No such file or directory), client: 74.82.47.2, server: _, request: “GET /webui/ HTTP/1.1”, host: “89.211.219.228”
2024/03/04 06:51:01 [error] 422#422: *228 “/config/www/geoserver/web/index.html” is not found (2: No such file or directory), client: 74.82.47.2, server: _, request: “GET /geoserver/web/ HTTP/1.1”, host: “89.211.219.228”
2024/03/04 06:52:05 [error] 422#422: *229 open() “/config/www/.git/config” failed (2: No such file or directory), client: 74.82.47.2, server: _, request: “GET /.git/config HTTP/1.1”, host: “89.211.219.228”
2024/03/04 07:55:47 [error] 423#423: *241 open() “/config/www/favicon.ico” failed (2: No such file or directory), client: 36.99.136.129, server: _, request: “GET /favicon.ico HTTP/1.1”, host: “89.211.219.228”

@abdellah_gasmi are you using a reverse proxy behind your nextcloud?

@Mageunic No, I’m not using a hardware reverse proxy. Instead, I’ve configured a software-based reverse proxy to handle requests to my Nextcloud instance.

@abdellah_gasmi maybe your reverse proxy isn’t correctly set up. can you provide your configuration file for nextcloud reverse proxy (hide your private data)