Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash displying a pdf file #5245

Closed
kellnerp opened this issue Jan 19, 2020 · 14 comments · Fixed by nextcloud/android-library#394
Closed

crash displying a pdf file #5245

kellnerp opened this issue Jan 19, 2020 · 14 comments · Fixed by nextcloud/android-library#394

Comments

@kellnerp
Copy link

kellnerp commented Jan 19, 2020

Steps to reproduce

  1. Create pdf file using pdflatex in Nextcloud folder on Ubuntu 18.04
  2. Open said pdf file in Android on Samsung Galaxy Note 4
  3. Crash

Expected behaviour

  • Tell us what should happen
    Pdf file should display

Actual behaviour

  • Tell us what happens
    Flashes pdf as a text file then complains of internal error then crashes.

Environment data

Android version:
6.01
Device model:
SM-N916S
Stock or customized system:
STOCK
Nextcloud app version:
3.10.0
Nextcloud server version:
17

Logs

Web server error log

N/A```
Insert your webserver log here


#### Nextcloud log (data/nextcloud.log)
N/A```
Insert your Nextcloud log here

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

javax.net.ssl.SSLPeerUnverifiedException: Hostname 45.x.x.x not verified:
    certificate: sha256/xxxxxxxxxcc
    DN: 1.2.840.113549.1.9.1=#16166b656c6c6e6572704065617274686c696e6b2e6e6574,CN=45.x.x.x,O=xx,L=xxx,ST=xx,C=xx
    subjectAltNames: []
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:334)
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(lambda)
at java.lang.Thread.run(Thread.java:818)

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

************ DEVICE INFORMATION ************
Brand: samsung
Device: tre3calteskt
Model: SM-N916S
Id: MMB29K
Product: tre3calteskt

************ FIRMWARE ************
SDK: 23
Release: 6.0.1
Incremental: N916SKSU2DSA1




Sent from my Samsung device
**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
@kellnerp kellnerp added the bug label Jan 19, 2020
@kellnerp
Copy link
Author

kellnerp commented Jan 19, 2020

Nextcloud server has no domain name, only ip address with snakeoil certificate.
Pdf file was downloaded and could be read. But not initially by app.

@kellnerp kellnerp reopened this Jan 19, 2020
@avalx
Copy link

avalx commented Jan 20, 2020

I have the same problem, not only PDF but other files as well (odt, doc for example). And sometimes it only happens the first time I try to download/open a file, when I restart the client and try to open the same file everything works OK.

Here is my log:

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

javax.net.ssl.SSLPeerUnverifiedException: Hostname www.sever.lan not verified:
certificate: sha256/8rVpiCZXpVMIfGLFWCMdA5VYGvzX/ZS3DoPf9Bmo7Ac=
DN: 1.2.840.113549.1.9.1=#160e726f6f744073657665722e6c616e,CN=www.sever.lan,OU=Sever Web Server,O=AVAL d.o.o.,ST=Slovenia,C=SI
subjectAltNames: []
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:334)
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(lambda)
at java.lang.Thread.run(Thread.java:818)

************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30100053
Build flavor: generic

************ DEVICE INFORMATION ************
Brand: Android
Device: espressowifi
Model: Galaxy Tab 2
Id: MOI10E
Product: espresso10wifixx

************ FIRMWARE ************
SDK: 23
Release: 6.0.1
Incremental: eng.andi.20190729.140516
`

I also noticed that this only happens when using the client with my local/internal NC server (signed with my own CA). Using the client with Disroot.org for example does not produce such errors.

@avalx
Copy link

avalx commented Jan 20, 2020

Just to add another observation. This problem only occurs if I tap on the file I want to open. If on the other hand I tap on the 3 dot menu and choose "Download", the file is downloaded without errors and I can than open it normally.

@AndyScherzinger
Copy link
Member

Cc @tobiasKaminsky and @ezaquarii for okhttp topic

@kellnerp
Copy link
Author

kellnerp commented Jan 20, 2020

Avalx. The behavior you mentioned has happened frequently, but the crashing and error report is new. Not just pdf, but videos.

@kellnerp
Copy link
Author

Also text files cause this error until they have time to download.

@tobiasKaminsky
Copy link
Member

Is this with self-signed certs?

@kellnerp
Copy link
Author

kellnerp commented Jan 23, 2020

I am using self signed certs. It is a private storage without domain name.
Nextcloud has always choked when trying to play or display anything forever. Only recently have these error dumps showed up.

@moviuro
Copy link

moviuro commented Feb 1, 2020

I have the same issue as otherwise reported on my own server https://sco.popho.be (TLS 1.3 only, Let's Encrypt certificate, nginx). Crash report below.

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

javax.net.ssl.SSLHandshakeException: Handshake failed
	at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@20104037@20.1.04 (120400-288960190):38)
	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: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x730a93b488: Failure in SSL library, usually a protocol error
error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (third_party/openssl/boringssl/src/ssl/tls_record.cc:592 0x730a81b808:0x00000001)
	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@20104037@20.1.04 (120400-288960190):6)
	at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@20104037@20.1.04 (120400-288960190):14)
	... 26 more

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

************ DEVICE INFORMATION ************
Brand: Nokia
Device: B2N_sprout
Model: Nokia 7 plus
Id: QKQ1.190828.002
Product: Onyx_00WW

************ FIRMWARE ************
SDK: 29
Release: 10
Incremental: 00WW_4_10D

@kellnerp
Copy link
Author

kellnerp commented Feb 2, 2020

I have had this happen frequently since I first reported it. If I can download the file first then the error generally doesn't occur. Never had this problem with Dropbox. It streams anything streamable without complaint.

ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 3, 2020
ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 3, 2020
ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 3, 2020
ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 4, 2020
ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 5, 2020
ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 6, 2020
ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 6, 2020
tobiasKaminsky pushed a commit to nextcloud/android-library that referenced this issue Feb 7, 2020
@moviuro
Copy link

moviuro commented Feb 7, 2020

If this could stay open until the 3.10.2 client is published, it'd be better IMHO.

BTW, the crash still happens on 3.10.1 (not surprising considering all the latest commits were done on 2020-02-07 when 3.10.1 was published on 2020-02-05).

@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.10.2 milestone Feb 10, 2020
@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Feb 11, 2020

Can you try out our dev version (you can install it in parallel) and give us feedback:
https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md#developement-release

@avalx
Copy link

avalx commented Feb 11, 2020

In my case the version 3.10.1 also works OK - pdf and other files as well.

@moviuro
Copy link

moviuro commented Feb 11, 2020

@tobiasKaminsky the 20200211 version of the dev app seems to behave correctly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants