Nextcloud Talk: Android login fails with HTTP 404 after domain change

Setup / Prerequisites

  • Nextcloud: 34.0.4.1

  • Talk (Spreed): 24.0.5

  • Nextcloud Android: 34.1.0 / 34.1.1

  • Nextcloud Talk Android: 24.0.4

  • Android: Phone 1 = Android 10; Phone 2 = different Android version

  • Server: Ubuntu in LXC, no Docker; Nextcloud directly installed under /var/www/nextcloud

  • Web server: Apache

  • Reverse proxy: Nginx Proxy Manager/OpenResty in Docker on a separate host

  • Nextcloud internal IP: anonymized as NC-IP

  • Proxy IP configured in Nextcloud: anonymized as PROXY-IP

  • Public URL: anonymized as https://cloud.example.tld

  • overwritehost, overwriteprotocol and overwrite.cli.url point to the public HTTPS domain.

  • trusted_proxies contains the configured proxy IP.

  • overwritecondaddr is restricted to that proxy IP.

Problem

After a domain change, Nextcloud Talk can no longer complete the login on Android. Talk worked correctly before the domain change.

The problem occurs on multiple Android devices, so it does not appear to be limited to a single device.

Normal Nextcloud login through the public domain continues to work correctly.

Current findings

The Login Flow v2 works successfully up to the browser grant:

POST /index.php/login/v2          → 200
GET  /index.php/login/v2/flow/... → 303
GET  /index.php/login/v2/flow...  → 200
GET  /index.php/login/v2/grant... → 200
POST /index.php/login/v2/grant    → 200

The grant demonstrably creates a new permanent Talk authentication token.

After that, the Android Talk client does not successfully poll, or receives:

POST /index.php/login/v2/poll → 404

The /login/v2/poll route exists; the corresponding controller and service are present.

/login/v2 also works correctly through the public domain and creates a Login Flow.

The oc_login_flow_v2 database table exists with the expected schema and contains newly created Talk flows.

There are also intermittent Nextcloud log messages such as:

Could not find the session token to renew
InvalidTokenException
Token does not exist

A direct connection between these messages and the Talk issue has not yet been established.

Current question

The problem appears to occur between /login/v2/grant and /login/v2/poll.

Specifically, we need to determine:

  • Are login_name, server and app_password correctly populated in oc_login_flow_v2 after the grant?

  • Does the flow record still exist when the client polls?

  • Is the Android client actually using the same poll token?

  • Could server-side processing/decryption of the app token be failing?

  • Could there be a session/Login Flow issue related to the domain change or reverse proxy configuration?

Already ruled out / not considered relevant anymore

  • Normal Nextcloud browser login works.

  • /login/v2 works.

  • /login/v2/grant works.

  • Login Flow v2 routes exist.

  • The reverse proxy works for normal and authenticated requests.

  • The user account is enabled.

  • oc_login_flow_v2 exists and is being populated.

  • The issue occurs on multiple Android devices.

Looking for

Any advice on why /login/v2/poll returns HTTP 404 after a successful grant, even though the Login Flow is created and the grant completes successfully — particularly with Nextcloud 34.0.4.1, Talk 24.0.5 and a reverse proxy/domain change.

No credentials, cookies or actual token values will be posted.

I am not an IT expert - I did all this with Chatgpt :slight_smile:

What, precisely, do you mean by a “domain change”? What did you change outside of Nextcloud and within Nextcloud?

Are the Android clients using the public URL and are they on a network where that URL’s mapping would send them through your proxy or not through your proxy?

Given mentioning overwritecondaddr I’m assuming you’re trying to do something special.

I solved it for now - I scanned the qr code - it works - I have no idea why - but I am open for any tip.