添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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?

    Just for clarification:

    The web proxy is redirecting all http traffic to the respective https endpoint:

    $ curl http://cloud.example.com/login/v2/poll -X POST -v
    *   Trying 0.0.0.0...
    * TCP_NODELAY set
    * Connected to cloud.example.com (0.0.0.0) port 80 (#0)
    > POST /login/v2/poll HTTP/1.1
    > Host: cloud.example.com
    > User-Agent: curl/7.52.1
    > Accept: */*
    < HTTP/1.1 301 Moved Permanently
    < Server: nginx/1.14.1
    < Date: Fri, 18 Oct 2019 17:08:09 GMT
    < Content-Type: text/html
    < Content-Length: 185
    < Connection: keep-alive
    < Location: https://cloud.example.com/login/v2/poll
    <head><title>301 Moved Permanently</title></head>
    <body bgcolor="white">
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>nginx/1.14.1</center>
    </body>
    </html>
    * Curl_http_done: called premature == 0
    * Connection #0 to host cloud.example.com left intact
                  

    I have the same problem (web frontend works, android client works with old regestration method, client registration not working), these are my proxy settings in the docker-compose file :
    proxy: build: ./proxy restart: always ports: - 80:80 - 443:443 labels: com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" volumes: - certs:/etc/nginx/certs:ro - vhost.d:/etc/nginx/vhost.d - html:/usr/share/nginx/html - /var/run/docker.sock:/tmp/docker.sock:ro networks: - proxy-tier
    (the same like in the Github example), is there an solution in adding something to the docker-compose file?

    Hi nextnut,

    I have made the experience that on Github the response is much better. I created an issue and a solution: https://github.com/nextcloud/desktop/issues/1521

    I had the same error and fixed it by setting
    "overwriteprotocol" => "https"
    in my Nextcloud server configuration (/var/www/nextcloud/config/config.php)