Android: Show file/folder sharing details

Created on 18 Jan 2020  路  17Comments  路  Source: nextcloud/android

Steps to reproduce

  1. Self signed server certificate
  2. Click on sharing symbol of preshared folder/file in app

Expected behaviour

  • Show details, modify sharing options

Actual behaviour

  • App crashes with error message

Environment data

Android version:
10
Device model:
Oneplus 7 Pro
Stock or customized system:
Stock
Nextcloud app version:
3.10.0
Nextcloud server version:

Logs

Web server error log

Insert your webserver log here

-

Nextcloud log (data/nextcloud.log)

************ CAUSE OF ERROR ************

javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
    at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@[email protected] (120400-284611645):27)
    at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:320)
    at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:284)
    at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:169)
    at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:258)
    at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
    at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
    at okhttp3.RealCall.execute(RealCall.java:93)
    at com.nextcloud.common.OkHttpMethodBase.execute(OkHttpMethodBase.kt:126)
    at com.nextcloud.common.NextcloudClient.execute(NextcloudClient.kt:67)
    at com.owncloud.android.lib.resources.activities.GetActivitiesRemoteOperation.run(GetActivitiesRemoteOperation.java:131)
    at com.nextcloud.common.NextcloudClient.execute(NextcloudClient.kt:63)
    at com.owncloud.android.ui.fragment.FileDetailActivitiesFragment.lambda$fetchAndSetData$5$FileDetailActivitiesFragment(FileDetailActivitiesFragment.java:331)
    at com.owncloud.android.ui.fragment.-$$Lambda$FileDetailActivitiesFragment$N7POe6TZvoGcuV2qP-niPxY_7t4.run(Unknown Source:12)
    at java.lang.Thread.run(Thread.java:919)
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
    at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:674)
    at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:551)
    at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:507)
    at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:426)
    at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:354)
    at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
    at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:89)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.google.android.gms.org.conscrypt.Platform.checkTrusted(:com.google.android.gms@[email protected] (120400-284611645):2)
    at com.google.android.gms.org.conscrypt.Platform.checkServerTrusted(:com.google.android.gms@[email protected] (120400-284611645):1)
    at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(:com.google.android.gms@[email protected] (120400-284611645):7)
    at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
    at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@[email protected] (120400-284611645):6)
    at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@[email protected] (120400-284611645):14)
    ... 26 more
Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
    ... 40 more

************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30100090
Build flavor: gplay

************ DEVICE INFORMATION ************
Brand: OnePlus
Device: OnePlus7Pro
Model: GM1913

************ FIRMWARE ************
SDK: 29
Release: 10
Incremental: 1912061900

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

approved bug high pr exists

Most helpful comment

@AndyScherzinger just ignore my above comment. Our bought Certificate is shit.
Already thought about switching to letsencrypt.

I've also noticed that reconnecting the nextcloud Account in the App solves the Problem.
Tested on 4 devices.

All 17 comments

@tobiasKaminsky please also see closed duplicates. This issue seems to happen in different scenarios (loading file details, opening different type of files) though I couldn't find a general pattern _when_ this happens or if it happens all the time.

@tobiasKaminsky reports keep coming in, my guess is (since most users reported this) that it is related to selfsigned certificates (which is something that worked before, since we askeddd the users if they want to accept the certificate), maybe this needs to be re-implemented for okhttp?

@AndyScherzinger got the same problem on my Nextcloud instance even with a bought certificate.

@kwmkjf so https://www.digicert.com/help/ won't give you any errors/warnings, could you check this? Or in case you have a linux shell run openssl s_client -debug -connect www.thedomaintocheck.com:443

@AndyScherzinger just ignore my above comment. Our bought Certificate is shit.
Already thought about switching to letsencrypt.

I've also noticed that reconnecting the nextcloud Account in the App solves the Problem.
Tested on 4 devices.

@kwmkjf so https://www.digicert.com/help/ won't give you any errors/warnings, could you check this? Or in case you have a linux shell run openssl s_client -debug -connect www.thedomaintocheck.com:443

I can provide you with such an output if you want. Is there anyting secret about that debug output, or can I just paste here.

But TLS-Connection is established without problems. I can browse the file Tree. I cannot download any files. But I can view files cached locally.

I can issue an GET / HTTP/1.1 but my server will return 400 Bad request without allowing me to specify a "host: ........ " line. I don't know if this helps.

But I can access to all files using the browser.

So I removed my account on the phone and re-added it. I used the QR-Code. Normally this would give me instant access. But I was redirected the the login-Screen. After typing username and password I was requested to grant access.

Now I have a difference behavior!

  • I can browse all files
  • When I pick a file I don't have in the cache, I get the exception BUT
  • eventually some files are downloaded and get cached locally ( I can see the notification of background download).
  • So next time I browse to that file it is indicated as cached locally (green dot) and I CAN open the file on my device.

EDIT: Reconnecting account does not work for me!

Can someone with as self-signed cert give me some test credentials?

Can you create us a test account and send the credentials to tobias at nextcloud dot com with a reference to this issue?

Can someone with as self-signed cert give me some test credentials?

Can you create us a test account and send the credentials to tobias at nextcloud dot com with a reference to this issue?

You should have just received such an email from me. Feel free to contact me, if I can help further.

Can you all try the APK please?
https://github.com/nextcloud/android/pull/5326#issuecomment-578695568

It can be installed in parallel.
Please login, accept your self signed cert and then check if everything works as expected without crashes.

Hello!

Works for me!

I could not reproduce the error on this new version. I can donwload the files correctly now.
I did not do any further testing.

Thanks!

Hans

Hello
It works also for me.
I downloaded and viewed some PDF, DOC and TXT files.

Thank you!

Claudio

Can you all try the APK please?
#5326 (comment)

It can be installed in parallel.
Please login, accept your self signed cert and then check if everything works as expected without crashes.

The APK works for me too! Thank you very much!
I have Samsung Galaxy S10 and used Nextcloud-App 3.10.0
Nextcloud-Version 17.0.2 with selfsigned Cert and custom-port.

The next update following after 3.10.0 will work again?

Regards
Daniel

The next update following after 3.10.0 will work again?

Hi @badsmurf, exactly! It'll ship with 3.10.1 :+1:

The next update following after 3.10.0 will work again?

Hi @badsmurf, exactly! It'll ship with 3.10.1 馃憤

Thank you very much for the info!

AND: Thank you VERY MUCH for this GREAT work around this app! Nextcloud and the Android-App is one of the most usefull things :-)

3.10.1 RC1 is released on play store in beta track.
Please give it a try and confirm if it resolves the problem.

3.10.1 RC1 is released on play store in beta track.
Please give it a try and confirm if it resolves the problem.

Hello,
it seems it works!
I've tested several documents and files without errors.
Thank you very much!

thnaks for testing and providing feedback @badsmurf - this is highly appreciated 鉂わ笍

@ all: I am closing the issue for now, please report back if 3.10.1 does not fix the issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daywalk3r666 picture daywalk3r666  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments

Bugsbane picture Bugsbane  路  3Comments

JSoko picture JSoko  路  3Comments

rainer042 picture rainer042  路  3Comments