No connection to server with a new android phone

While I’m having connection with web interface and with android clients from the older smartphone, I have problems with configuring a new android smartphone.
I try to connect to the server, it says that the connection will be tested and then a error message “es ist ein unbekannter Fehler aufgetreten” (unknown error) comes.
I tried deleting bruteforce table with no success.
nextcloud server is 12.0.4
android client is 2.0.0

Could it be a problem with the selfsigned certificate?

But, on other client it works…

Best regards
DZ

Hi,
I have a similar problem.
I can login to my nextcloud with a browser on my phone, but the android app fails to login. (continues to attempt)
My next cloud server is: 12.0.4
Android phone OnePlus X with android 6.0.1

A ordinary windows PC login works very fine (browser and app)

Logs please folks.

  • Apache error to determine if it’s erroring on the server side
  • Apache access to determine if it’s even reaching the server
  • Nextcloud app logs (via expert mode in settings) to see if the app reports anything else.

Here I have the reduced logs. I have edited my Serveradress (myServer) and IP (myIP). The last unsuccessful access was on 2017-12-31 after 15:30.

access.log:

myIP - - [31/Dec/2017:12:35:11 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 553 "-" "Mozilla/5.0 (Android) ownCloud-android/2.0.0"
::1 - - [31/Dec/2017:12:44:28 +0100] "OPTIONS * HTTP/1.0" 200 128 "-" "Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t (internal dummy connection)"
::1 - - [31/Dec/2017:12:44:56 +0100] "OPTIONS * HTTP/1.0" 200 128 "-" "Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t (internal dummy connection)"
::1 - - [31/Dec/2017:12:45:16 +0100] "OPTIONS * HTTP/1.0" 200 128 "-" "Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t (internal dummy connection)"
::1 - - [31/Dec/2017:12:45:27 +0100] "OPTIONS * HTTP/1.0" 200 128 "-" "Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t (internal dummy connection)"
::1 - - [31/Dec/2017:12:47:22 +0100] "OPTIONS * HTTP/1.0" 200 128 "-" "Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t (internal dummy connection)"
63.246.129.199 - - [31/Dec/2017:12:56:32 +0100] "HEAD /app/etc/local.xml HTTP/1.1" 404 142 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
179.105.70.118 - - [31/Dec/2017:13:45:43 +0100] "GET /cgi/common.cgi HTTP/1.1" 404 456 "-" "Wget(linux)"
179.105.70.118 - - [31/Dec/2017:13:45:46 +0100] "GET /stssys.htm HTTP/1.1" 404 452 "-" "Wget(linux)"
179.105.70.118 - - [31/Dec/2017:13:45:49 +0100] "GET / HTTP/1.1" 200 10958 "-" "Wget(linux)"
179.105.70.118 - - [31/Dec/2017:13:45:53 +0100] "POST /command.php HTTP/1.1" 404 453 "-" "Wget(linux)"
184.105.247.195 - - [31/Dec/2017:14:53:25 +0100] "GET / HTTP/1.1" 200 12232 "-" "-"
myIP - - [31/Dec/2017:15:41:34 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 553 "-" "Mozilla/5.0 (Android) ownCloud-android/2.0.0"

other_vhosts_access.log

myserver.de:443 myIP - admin [31/Dec/2017:15:38:28 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:38:58 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:39:28 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 4172 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:39:58 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:40:28 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"

error.log

myserver.de:443 myIP - admin [31/Dec/2017:15:38:28 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:38:58 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:39:28 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 4172 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:39:58 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
myserver.de:443 myIP - admin [31/Dec/2017:15:40:28 +0100] "PROPFIND /nextcloud/remote.php/dav/files/admin/ HTTP/1.1" 207 1699 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"

nextcloud.log (no entry on this date)

{"reqId":"hZmYoyLNC35DK60qdaZW","level":4,"time":"2017-12-31T11:29:32+00:00","remoteAddr":"myIP","user":"admin","app":"webdav","method":"DELETE","url":"\/nextcloud\/remote.php\/dav\/files\/admin\/ftp_ipcam\/FI9828P_00626E6BA9A6\/record\/alarm_20171231_112236.mkv","message":"Exception: {\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Message\":\"\\\"ftp_ipcam\\\/FI9828P_00626E6BA9A6\\\/record\\\/alarm_20171231_112236.mkv\\\" is locked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(179): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->delete()\\n#1 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(287): Sabre\\\\DAV\\\\Tree->delete('files\\\/admin\\\/ftp...')\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpDelete(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:DELETE', Array)\\n#5 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/html\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(258): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/html\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(33): OCA\\\\DAV\\\\Server->exec()\\n#8 \\\/var\\\/www\\\/html\\\/nextcloud\\\/remote.php(162): require_once('\\\/var\\\/www\\\/html\\\/n...')\\n#9 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php\",\"Line\":353}","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.2 (build 1) (Nextcloud)","version":"12.0.4.3"}

Can you see something that can help?
Best regards
DZ

I have discovered a strange behaviour:

I wanted to test if some other apps could connect to my server, I had the app oCloud.de installed at my phone and a short test gave me access to my nextcloud server. I then tested if the nextcloud could get access. Yes it can.

After a reboot of my phone is the nextcloud app still connected to the server.

Please do not ask me, why it works this way!

???

If it’s your own server, install and use redis as file locking cache.

This is not the problem! I cannot login to the server from the one android client at all.

The locked files appear sometimes when I delete many files at all from a running client. Mostly it corrects itself with the next sync.

Best regards
DZ

Yes, it’s probably not related but the only real error visible on the server. Self-signed could perhaps be a problem. Are certificates from letsencrypt no option?
Can you connect to a demo server?

On rooted phones, you can check the logs, not sure if there are more ways for non-rooted phones:

I have tested your demo server nextcloud12. Here the mobilephone connects correctly. After testing the connection the client requests access to some functions on the phone and after granting them it connects.

On my server I can only see the testing of the connection, which aborts with “unknown error”.

I never had problems before with my nextcloud in the past when connecting. It runs over a year now. This new android phone is the first with troubles.

I had setup the server with open ssl and had never problems. I do not want to change my running system. There must be a reason why the new android device does not connect.

The phone is new, so I cannot root for logging.

Best regards
DZ

Spin up another vanilla NC server on your network with exactly the same setup, then see if that works.

If not, swap out the self signed cert for a proper one and test again. That’s as simple a test as you can do really without continuing to collect logs and waiting for the error to show up properly.

I don’t see nextcloud app logs (from the phone app) listed with your logs above, but @tflidd is particularly right in that you can get device logs too, but you don’t need to be rooted.

Using ADB with “allow debugging” enabled on the device may capture the error in more detail, but it takes a bit to set it up.