Ios: nextcloud ios client app "invalid certificate" bug

Created on 9 Dec 2019  ·  27Comments  ·  Source: nextcloud/ios

Expected behaviour

iOS App should (a) accept the self-signed certificate, when this is (b) still valid and (c) is added as an accepted exeption certificate during the first set-up of the app.

Actual behaviour

When accessing the iOS app to see/download documents, every two seconds the message appears: "the certificate for this server is invalid" and "Error: unable to download". This happens even if you click on "connect anyway" -> "yes" for several times. It seems to be limited to the iOS version, as desktop client and web-access is working fine. It also worked before nextcloud 17 and/or before an app update. Somebody reported this problem also here.

clear cache and reinstall the app and log-in again from scratch does not help.

Steps to reproduce

install ios app, connect to server (login), try to access a file.

iOS version

13.2.3

App version

2.2.5.1

Server configuration

Operating system:
Ubuntu 18.04.3 LTS (GNU/Linux 4.4.0-142-generic)

Web server:
Apache/2.4.39

Database:
mysql 8.0.18

PHP version:
7.2.18

TLS
TLS 1.3

Nextcloud version: (see Nextcloud admin page)
17.0.1.

IMG_0790
IMG_0789

Most helpful comment

@thesilk-tux I just tried the work-around that @TasPats mentioned above and it fixed the issue - for now. When re-creating the account, it gives the certificate error and then you can just connect anyway. After that the app connects normally (no persistent error messages, either).

The only thing is, I had to go in and completely set up all auto upload settings, turn off caching, etc in the app. It forgot all these settings. On top of this, I had to initialize a complete re-sync ("Upload whole camera role"), so it is now plugging away at over 1000 photos even though they are on the Nextcloud server already. Best I can tell, it is not creating duplicates so that's some good news.

I can confirm the same behavior, but with 8k+ files to re-upload.

iOS App version 3.0.5.8
Server 17.0.7

All 27 comments

I encountered this probelm too.Only happens on iOS.Android and Web is fine.
I am using self-sign certificate .

Okay,I search for why iOS 13 will fail when using self-sign certificate.It seems iOS needs certificate issued after 1/7/2019 needs to short than 825 days.
https://support.apple.com/en-us/HT210176

any solution? i have certificate created with letsencrypt and have short than 825 days. it was created in first of january 2020. with 2.25.5 of nextcloud doesn't allow access in ios 13

have you trust your self-signed certificate in "settings->genernal->about->certificate trust settings"?you have to enable the trust before ios trust your certificate for real.

my certificate is not selfsigned. is generated by letsencrypt. Anyway I have the certificate installed and it still doesn't work.

still here.
image

i think its not a problem with certificate because with another app to connect to Webdav of my server works with Iphone. But with nextcloud app not.

and my server with nextcloud app in android works.

oh,if your certificate is not self-signed,then i have no idea why it would happens.sorry.

My issue is similar. I have a self signed deployment. On first login it prompts to connect to server anyway. Specify yes. Works ok for a couple of hours.

Then suddenly it just doesn’t go away, constantly prompting me that the certificate is invalid and do I want to connect anyway (every 4 seconds roughly) and won’t go away.

Maybe an option could be added in the app settings to permanately accept an invalid certificate. So it doesn't keep prompting?

I have this issue as well. To me it occurs periodically after the LE certs are being rotated. The error message disappears when I reset the cache in the app.

This problem still exists and also affects Nextcloud Talk App (invalid certificate message) v. 8.1.0. Self-signed certificates are not the cause. It seems as if with the nextcloud iOS app (2.25.9.2):

a) the problem is caused by Nextcloud.

b) it is limited to iOS (web access and desktop client work without problems).

b) when the temporary storage/cache is cleared, the problem is solved for a short time, but then reappears.

c) it also affects server certificates that are valid for less than 825 days.

d) the fact that the certificates are self-signed is not the reason for the problem.

e) an update to nextcloud server 18.0.4 and app version 2.25.9.2 does not solve the problem.

f) it affects the downloading of files (start, speed).

g) mobile access to nextcloud via the browser (Safari iOS) works without problems (certificate seems therefore not to be a problem).

Did someone find a solution?

(@JorisBodin seems like other users experience this as well)

When this will be fixed?
Currently IOS app is unusable with nextcloud with self signed cert.

On iOS 13.5 and Ubuntu 20.04 LTS and the bug is still there.

Same behaviour as everyone above. The message still randomly pops up and randomly disappears after killing app but always comes back eventually. Web browser and most webdav apps are also fine.

I'm wondering if it's the cert and not the app though - Subsonic clients for example have a mixture of success too - e.g., I can get the iOS app Soundwaves to work because it has a do not validate SSL certificates option, but not on other Subsonic-based apps that I guess must rely on valid certificates.

Running "openssl s_client -connect my.local.ip:443" returns a line that says "Verification error: self signed certificate" which I think is a lot to do with it.

Self-signed certs and iPhones needs work. I've imported my cert into my iPhone and have allowed it permission too but still get this persistent bug.

iOS App 3.0.1.18
Nextcloud Server 18.0.6

I access my server via NATed server address, say 192.168.88.10 to hide it from external access, only internal users can access or they use VPN

but from outside server is accessible trough FQDN with Lets Encrypt certificates. before it works fine - it complains about invalid certificates, I restart iOS App and accept these "invalid" (but really legal certificates of this server) and all was fine

but!

today I updated my Lets Encrypt certificates and now message is not like from topic starters first post, but red and without possibility to accept and interact atall

image0

worked around by "old, but gold" - removed account, add same 192.168.88.10 server, accepted "invalid" certificate, login with my creds and all works again, hope, that it is only once, not every 3 month's

worked around by "old, but gold" - removed account, add same 192.168.88.10 server, accepted "invalid" account, login with my creds and all works again, hope, that it is only once, not every 3 month's

@TasPats Did the same a while ago. Will come back randomly. And does not solve the problem NC (@JorisBodin) should really look into it.

I was having the problem exactly as described and was just "dealing with it" by clicking on "connect anyway" -> "yes" several times. It was annoying, but it worked.

A recent ios upgrade has made things worse. I can no longer click "yes". There is no option to "connect anyway". All three of our ios phones can no longer connect at all to my Nextcloud server with self-signed certificates. This sucks.

Also, I went into the ios setting to Certificate Trust Settings and there is nothing to configure. No way to add exceptions.

I also have the same issue like @cogitech2 described above. In my home network I have a Odroid with Ubuntu 18.04. On this server runs Nextcloud 19.0.1. On my Linux Desktop all works fine (browser and app). On my iOS device (13.6) I got the invalid certificate error. This was normal because the instance is running in my local network so the certificate is self signed. Normally, there was a modal where I could accept the risk and all was fine. But for 1-2 weeks it was not possible to accept the risk and the app is useless at the moment. It would be nice if someone can provide a fix because I think many users could have a similar issue.

“The best cloud is the private cloud” 😄

Log: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “10.10.0.112”, which could put your confidential information at risk.

@thesilk-tux Thanks for taking the time to post your report! The more who speak up, the more likely we will receive a solution of some sort. Cheers!

@thesilk-tux I just tried the work-around that @TasPats mentioned above and it fixed the issue - for now. When re-creating the account, it gives the certificate error and then you can just connect anyway. After that the app connects normally (no persistent error messages, either).

The only thing is, I had to go in and completely set up all auto upload settings, turn off caching, etc in the app. It forgot all these settings. On top of this, I had to initialize a complete re-sync ("Upload whole camera role"), so it is now plugging away at over 1000 photos even though they are on the Nextcloud server already. Best I can tell, it is not creating duplicates so that's some good news.

@thesilk-tux I just tried the work-around that @TasPats mentioned above and it fixed the issue - for now. When re-creating the account, it gives the certificate error and then you can just connect anyway. After that the app connects normally (no persistent error messages, either).

The only thing is, I had to go in and completely set up all auto upload settings, turn off caching, etc in the app. It forgot all these settings. On top of this, I had to initialize a complete re-sync ("Upload whole camera role"), so it is now plugging away at over 1000 photos even though they are on the Nextcloud server already. Best I can tell, it is not creating duplicates so that's some good news.

I can confirm the same behavior, but with 8k+ files to re-upload.

iOS App version 3.0.5.8
Server 17.0.7

@jurkstas @cogitech2 thanks a lot. This helped us a lot and my wife is happy now after uploading 1700 pictures manually 😄

When updated to Nextcloud 19.0.2 Server Side, the problem so far seems to be gone. Anyone observed the same? App is on iOS Version 3.0.6.8.

my Lets Encrypt certificate updated and I get red error window without option to accept certificate as valid

Nextcloud Server 19.0.3.
iOS/iPAD client 3.0.7.26

only option remove active account, lost cached files and reenter credentials and resync data

ironically, that Linux Desktop client 3.0.2. accept new certificate with one click and so Nextclod Android app 3.13.1. with one touch

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rakekniven picture rakekniven  ·  4Comments

marinofaggiana picture marinofaggiana  ·  5Comments

oxivanisher picture oxivanisher  ·  4Comments

Alphakilo picture Alphakilo  ·  3Comments

helmut72 picture helmut72  ·  4Comments