Stuck "Logging In" on Android App

I have Nextcloud running on TrueNAS Scale.
Local access works fine. Remote access works fine on the Web.
However, the app will not log in remotely.
It just gets stuck on “logging in” and spins forever.
In the logs, it simply says “login failed” with the IP address.
I have been scouring articles and videos for days, to no avail.
Does anyone with the same setup that has gotten this to work have any tips or any guides that may resolve this? The app is not very useful without cloud access.
Thanks.

It usually is that straightforward.

Any chance you’re on a really old phone? I’ve seen the authentication screen sometimes have issues on really old versions of Android.

Can you login successfully via the web from the phone?

Hi. Sorry for the delayed response.
It is a Samsung Galaxy S22, so quite recent.
I have also tried on another phone, and on my tablet.
I am able to access the Web UI remotely from the phone and from a laptop.
However, the Android app will not connect. It just shows “Logging in” with a spinning circle that never completes.
If I type the password incorrectly, I get an error, so it’s obviously authenticating, but it never successfully logs in.

Okay, sounds a bit like a server-side issue.

  • Check your nextcloud.log (server)
  • Try an app password
  • Post your redacted config.php (or better yet the output of occ config:list system

Hello all !
I had the same issue and the topic was not marked as solved, so just thought I’d share how I got through this.

Background: Nextcloud 29 on TrueNAS, installed in a jail with Apache24 behind a reverse (in another jail) powered by NGINX. All installed following the brilliant guides from Samuel Dowling (here).
I had manually upgraded to NC29 following a number of mess-ups I did, but anyway the situation was as described in the 1st post: can access from within LAN, but access via WAN using the mobile app leads to the right server (so port forwarding all ok), but stuck at logging page after entering credentials. Note that I use No-IP for a DDNS.

Issue found: in my NC jail > httpd.conf > ServerName, the value was set as my no-ip cloud address. I changed it to the LAN IP address of the NC server, and job done !

‘hope this can help anybody !
Tang’