Ios: iOS app stuck app login

Created on 11 Oct 2019  路  18Comments  路  Source: nextcloud/ios

Expected behaviour

Register app pass
Open iOS app
Enter and grant
Login

NOTE _all other access_ types work, (Firefox & Chrome browsers, Android app)

Actual behaviour

Stuck

901FA3CC-6FF1-469D-902F-9513FED50949

The 鈥済rant accessory button clicks but doesn鈥檛 do anything

Steps to reproduce

Login to server and add app decide for my user

Open in iOS and try to authgrant

iOS version

13.1.2

App version

2.24.1

Server configuration

URL is something like https://my domain.blah.ca/cloud

$ sudo cat /srv/nextcloud/config/config.php
<?php
$CONFIG = array (
  'instanceid' => 'SNIP',
  'passwordsalt' => 'SNIP',
  'secret' => 'SNIP',
  'trusted_domains' => 
  array (
    0 => 'nextcloud',
    1 => 'SNIP.homenode.ca',
  ),
  'trusted_proxies' => 
  array (
    0 => '10.0.0.52',
  ),
  'overwritehost' => 'SNIP.homenode.ca',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/cloud',
  'overwritecondaddr' => '^10\\.0\\.0\\.52$',
  'datadirectory' => '/opt/nextcloud/',
  'dbtype' => 'mysql',
  'version' => '14.0.4.2',
  'overwrite.cli.url' => 'https://nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud_admin',
  'dbpassword' => 'SNIP',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'updater.release.channel' => 'stable',
);

Operating system: linux

Linux nextcloud 4.4.0-164-generic #192-Ubuntu SMP Fri Sep 13 12:02:50 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Ubuntu 16.04.5 LTS \n \l

Web server:

Apache apache2 2.4.18-2ubuntu3.13

$ cat /etc/apache2/sites-enabled/nextcloud.conf 
Alias / "/srv/nextcloud/"

<Directory /srv/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /srv/nextcloud
 SetEnv HTTP_HOME /srv/nextcloud

 Satisfy Any

</Directory>
  • a reverse proxy (10.0.0.52) in front of it
# Nextcloud ("nextcloud" is the local hostname which resolves to 10.0.0.55)
ProxyPass /cloud https://nextcloud:443
ProxyPassReverse /cloud https://nextcloud:443
# https://docs.nextcloud.com/server/14/admin_manual/issues/general_troubleshooting.html#service-discovery
Redirect 301 /.well-known/carddav /cloud/remote.php/dav
Redirect 301 /.well-known/caldav /cloud/remote.php/dav

Database:
N/A

PHP version:
php7.0-common 7.0.33-0ubuntu0.16.04.7

Nextcloud version: (see Nextcloud admin page)

  • 14.0.4

Most helpful comment

Assuming you are:

  • running your own webserver
  • with HTTPS redirection (all HTTP requests redirected)

Can you please confirm that you set the:
'overwriteprotocol' => 'https'

in config/config.php

I had a similar issue in the webbrowser, and this fixed it when running via a reverse proxy.

All 18 comments

Tried again with new app pass and after restarting phone no go

What debug steps shall I proceed with?

The same here:
I already stopped the Nextcloud App, turned my iPhone off and on again. But still no login is possible with Nextcloud App 2.24.1 and iOS version 13.1.2. Than I upgrade to iOS version 13.1.3.
But it's still stuck at "Grant access"... :-(
Nextcloud App 2.24.3 (which seems to be the most current version) is not available at the moment in the App Store.

Wild stab in the dark based on a similar issue I remember having once: Try dismissing the iOS keyboard before you tap any login or grant access buttons?

https://github.com/nextcloud/ios/issues/960#issuecomment-543996678

Tried good idea, didn鈥檛 work

Is there a better way to raise attention to this? Who鈥檚 the owner of the iOS functionality? Or does it fall to open source community?

Assuming you are:

  • running your own webserver
  • with HTTPS redirection (all HTTP requests redirected)

Can you please confirm that you set the:
'overwriteprotocol' => 'https'

in config/config.php

I had a similar issue in the webbrowser, and this fixed it when running via a reverse proxy.

It is set correctly, yes

@nextcloud:/etc$ sudo grep https /srv/nextcloud/config/config.php
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'https://nextcloud',

EDIT: also back-updated the original post with full server-side details

I got the same issue with NGINX reverse proxy, which was related to HTTP/2 handling of IOS devices.

Solved it by adding proxy_hide_header Upgrade; within the location part of the configuration. I think you can do this in apache2 with Header unset Upgrade;

Hi @paulluijben , I'm really no nginx-expert. So I tried your hint and added this to "location /" and restarted my nextcloud (docker-compose restart). But the problem still exists with iOS-App-Version 2.24.4 :-(

Hi @thomas-merz, this only works in case you are using an reverse proxy in front of your Nextcloud instance.

Assuming you are:

  • running your own webserver
  • with HTTPS redirection (all HTTP requests redirected)

Can you please confirm that you set the:
'overwriteprotocol' => 'https'

in config/config.php

I had a similar issue in the webbrowser, and this fixed it when running via a reverse proxy.

Solved my problem perfectly, Thanks very much.

Problem is still existing with 2.24.4 now! 馃憥 Who can help with this?
Is this a problem with the iOS App, the Nextcloud Server or what can I do to get connected again with my Nextcloud?
I also found this (old) thread on help.nextcloud.com

I got the same issue with NGINX reverse proxy, which was related to HTTP/2 handling of IOS devices.

Solved it by adding proxy_hide_header Upgrade; within the location part of the configuration. I think you can do this in apache2 with Header unset Upgrade;

did not work for me, did it like this:

# Nextcloud
ProxyPass /cloud https://nextcloud:443
ProxyPassReverse /cloud https://nextcloud:443

<Location /cloud>
    # nextcloud:
    # https://github.com/nextcloud/ios/issues/960
    Header unset Upgrade
</Location>

Latest version updates

  • nextcloud iOS 2.25.0
  • iOS = 13.2.3

UPDATE: (SUCCESS)

It's been a while since I conducted any maintenance on the server back end. Due to v14 unsupported status recently, I fired through the serial updates v14 -> v15 -> v16 -> v17.

After this, my instance continued to work from a web-UI perspective (great!).

Then i (on a whim) decided to retest this. Now it's working! Versioning info is now:

  • nextcloud v17.02
  • iOS v13.3
  • nextcloud iOS app v2.25.3.6

So not sure if it was that minor app version bump, or the backend server having an incompatibility with the iOS app... but for me it is working now!

Keen to hear if others have similar success based on this information.

Still had trouble on v17.02 with iOS v13.3 - proposed solution by @paulluijben worked like charm! Wonderful, I love this community!

Also works easily with NGINX proxy manager
Screenshot 2020-01-15 at 01 29 09

Worked for me on Apache with RequestHeader unset Upgrade

Worked for me on nginx with the RequestHeader unset Upgrade config under location
proxy_hide_header Upgrade;

Was this page helpful?
0 / 5 - 0 ratings