thrillfall / nextcloud-gpodder

nextcloud app that replicates basic gpodder.net api
https://apps.nextcloud.com/apps/gpoddersync
GNU Affero General Public License v3.0
220 stars 11 forks source link

login problem from antennapod #132

Closed herrxyz closed 1 year ago

herrxyz commented 1 year ago

hello, just installed a new nextcloud-instance using this docker-compose file (including related files from this folder) https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/mariadb/fpm then installed gpodder sync nextcloud works fine, but when I try to login using Antenna-Pod it opens browser, I login, click "grant permission" but nothing happens (405 or 303 answer)

any idea to solve this problem (or at least where to look deeper)?

output from docker (changed domain & 2 IPs for security/privacy reasons):


nextcloud-docker-ssl-proxy-1                  | nginx.1     | 2023/07/02 18:31:27 [warn] 72#72: no resolver defined to resolve r3.o.lencr.org while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/certs/subdomain.domain.name.crt"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:27 +0000 "POST /index.php" 200
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:28 +0000] "POST /index.php/login/v2 HTTP/1.1" 200 322 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:28 +0000] "POST /index.php/login/v2 HTTP/1.1" 200 322 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:28 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:28 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:28 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:28 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | 2023/07/02 18:31:29 [warn] 74#74: no resolver defined to resolve r3.o.lencr.org while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/certs/subdomain.domain.name.crt"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | 2023/07/02 18:31:29 [warn] 73#73: no resolver defined to resolve r3.o.lencr.org while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/certs/subdomain.domain.name.crt"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | 2023/07/02 18:31:29 [warn] 75#75: no resolver defined to resolve r3.o.lencr.org while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/certs/subdomain.domain.name.crt"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:29 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:29 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:29 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:29 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:29 +0000 "GET /index.php" 303
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:30 +0000] "GET /login/v2/flow/VVUNwi4FhvFvN34vq3BkYjGucbgPPXfn7SwEnjR5cwwzLG6fbUzS0iICltn8FZU8vYVFG5wRD5LcggT0Cg6NrSZQn3kel8epjMuxfEAYGUraQzJEbbCQqpa7QYZVkJK5 HTTP/1.1" 303 0 "-"                            "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:30 +0000] "GET /login/v2/flow/VVUNwi4FhvFvN34vq3BkYjGucbgPPXfn7SwEnjR5cwwzLG6fbUzS0iICltn8FZU8vYVFG5wRD5LcggT0Cg6NrSZQn3kel8epjMuxfEAYGUraQzJE                           bbCQqpa7QYZVkJK5 HTTP/2.0" 303 0 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:31 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:31 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:31 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:31 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:30 +0000 "GET /index.php" 200
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:31 +0000] "GET /login/v2/flow?user= HTTP/1.1" 200 8655 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "80.1                           87.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:31 +0000] "GET /login/v2/flow?user= HTTP/2.0" 200 8655 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/1                           14.0.0.0 Mobile Safari/537.36" "199.199.0.4:80"
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:31 +0000] "GET /apps/theming/img/background/kamil-porembinski-clouds.jpg HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114                           .0.0.0 Mobile Safari/537.36" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:31 +0000] "GET /apps/theming/img/background/kamil-porembinski-clouds.jpg HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/5                           37.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:32 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:32 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:32 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:32 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:32 +0000 "GET /index.php" 200
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:32 +0000] "GET /login/v2/grant?user=&stateToken=xZkne9aDQWaD2krhK40OCnmzL35p02g9N1cG5XC8kV6AiZWjmMhbQ3ElufsuawmC HTTP/1.1" 200 8338 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleW                           ebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:32 +0000] "GET /login/v2/grant?user=&stateToken=xZkne9aDQWaD2krhK40OCnmzL35p02g9N1cG5XC8kV6AiZWjmMhbQ3ElufsuawmC HTTP/2.0" 200 8338 "-" "Mozil                           la/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:33 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:33 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:33 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:33 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:34 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:34 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:34 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:34 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:35 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:35 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:35 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:35 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:36 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:37 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:37 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:37 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:37 +0000 "GET /index.php" 200
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:38 +0000] "GET /login/v2/flow?user= HTTP/1.1" 200 8659 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "80.1                           87.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:38 +0000] "GET /login/v2/flow?user= HTTP/2.0" 200 8659 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/1                           14.0.0.0 Mobile Safari/537.36" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:38 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:38 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:38 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:38 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:39 +0000] "POST /login/v2/poll HTTP/1.1" 301 169 "-" "AntennaPod/3.0.2" "-"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:39 +0000 "GET /index.php" 403
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:39 +0000] "GET /login/v2/grant?user=&stateToken=Nsjjvx2WQKej6JBP8tH8nqAoXImq4tIkwU9tMmbhlsqXV0prGWEE3sAGuRK1SFLg HTTP/1.1" 403 8129 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleW                           ebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:39 +0000] "GET /login/v2/grant?user=&stateToken=Nsjjvx2WQKej6JBP8tH8nqAoXImq4tIkwU9tMmbhlsqXV0prGWEE3sAGuRK1SFLg HTTP/2.0" 403 8116 "-" "Mozil                           la/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36" "199.199.0.4:80"
nextcloud-docker-ssl-app-1                    | 172.25.0.6 -  02/Jul/2023:18:31:39 +0000 "GET /index.php" 405
nextcloud-docker-ssl-web-1                    | 199.199.0.2 - - [02/Jul/2023:18:31:39 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "123.123.67.223"
nextcloud-docker-ssl-proxy-1                  | nginx.1     | subdomain.domain.name 123.123.67.223 - - [02/Jul/2023:18:31:39 +0000] "GET /login/v2/poll HTTP/1.1" 405 5 "-" "AntennaPod/3.0.2" "199.199.0.4:80"
herrxyz commented 1 year ago

as it was not working, I also tried to add location /ocs/ { try_files $uri $uri/ /ocs/v2.php?$args; } to nxginx.conf as suggested in an solved issue somewhere (don't understand what this does)

JonOfUs commented 1 year ago

Hmm... It doesn't look like a problem with gpoddersync but with your Nextcloud instance.

Normally, 404 should be returned instead of 301 on POST /login/v2/poll (https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/index.html#login-flow-v2). Do you know to where the request gets redirected? (Since 301 indicates a redirect)

For more competent help regarding general Nextcloud problems like this one, maybe https://help.nextcloud.com is a good place to start.

herrxyz commented 1 year ago

you are right, most likely a nextcloud problem and not of gpodder sync (just realiced that nextcloud android-app got the same problem during login) -> can be closed, sorry for disturbing you

JonOfUs commented 1 year ago

No problem at all, finding out where the problem lies can be difficult on its own. And I just don't know too much about the authentication flow.