Nextcloud version (eg, 12.0.2): 17.0.0
Operating system and version (eg, Ubuntu 17.04): Docker compose (https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm), Client 2.6.0 on Fedora 29
Apache or nginx version (eg, Apache 2.4.25): nginx:alpine
PHP version (eg, 7.1): php7
The issue you are facing:
I have created a GitHub issue already (https://github.com/nextcloud/desktop/issues/1521). I can’t get the NC client get to work, the first configuration of the client hangs at the “Grant access” step in the login flow v2.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Install nextcloud-client.
- Configure it with the endpoint, e.g.
https://cloud.example.com
- Browser page opens up, granting access does not work
The output of your Nextcloud log in Admin > Logging:
No Logs found related to this.
In the client:
[OCC::AbstractNetworkJob::start OCC::SimpleNetworkJob created for "https://cloud.example.com" + "" "OCC::Account"
[OCC::AccessManager::createRequest 4 "" "http://cloud.example.com/login/v2/poll" has X-Request-ID "2bf61995-e24b-4c72-afa5-34ec6e15cc12"
[OCC::AbstractNetworkJob::start OCC::SimpleNetworkJob created for "https://cloud.example.com" + "" "OCC::Account"
[OCC::AbstractNetworkJob::slotFinished QNetworkReply::NetworkError(ProtocolInvalidOperationError) "Server hat \"400 Bad Request\" auf \"POST http://cloud.example.com/login/v2/poll\" geantwortet" QVariant(int, 400)
[OCC::AbstractNetworkJob::slotFinished QNetworkReply::NetworkError(ProtocolInvalidOperationError) "Server hat \"400 Bad Request\" auf \"POST http://cloud.example.com/login/v2/poll\" geantwortet" QVariant(int, 400)
This is consistent with the nginx logs:
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:15 +0000] "POST /index.php/login/v2 HTTP/2.0" 200 321 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:16 +0000] "GET /login/v2/flow/<token> HTTP/2.0" 303 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:16 +0000] "GET /login/v2/flow HTTP/2.0" 200 3672 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:20 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:21 +0000] "GET /apps/logreader/poll?lastReqId=... HTTP/2.0" 200 2 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:25 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:30 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:32 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 74 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:35 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:36 +0000] "GET /login/v2/grant?stateToken=<token> HTTP/2.0" 200 3732 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:40 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:41 +0000] "GET /apps/logreader/poll?lastReqId=... HTTP/2.0" 200 2 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:45 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:50 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:51:55 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
nginx.1 | cloud.example.com 0.0.0.0 - - [18/Oct/2019:07:52:00 +0000] "POST /login/v2/poll HTTP/1.1" 400 249 "-" "Mozilla/5.0 (Linux) mirall/2.6.0git (Nextcloud)"
The client tries to poll the endpoint on HTTP protocol, although its configured with an HTTPS endpoint. Can I somehow pinpoint the NC client to use HTTPS?