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

Nextcloud App crashes on activity tab #5333

Closed
vikarandris opened this issue Jan 27, 2020 · 7 comments · Fixed by nextcloud/android-library#394
Closed

Nextcloud App crashes on activity tab #5333

vikarandris opened this issue Jan 27, 2020 · 7 comments · Fixed by nextcloud/android-library#394

Comments

@vikarandris
Copy link

Steps to reproduce

  1. open activity tab
  2. download file, or refresh tab
  3. nextcloud chrashed

Expected behaviour

  • Tell us what should happen

Actual behaviour

  • Tell us what happens

Environment data

Android version: 9

Device model: Huaewi p10

Stock or customized system:EMUI 9.1.0

Nextcloud app version: 3.1.10

Nextcloud server version: 17.0.2
Activity app version:2.10.1

Logs

Insert your Nextcloud log here
************ CAUSE OF ERROR ************

java.net.SocketTimeoutException: failed to connect to taborozok.ddns.net/80.98.88.136 (port 443) from /192.168.0.21 (port 33628) after 10000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:185)
at libcore.io.IoBridge.connect(IoBridge.java:129)
at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:137)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:391)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:231)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:213)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
at java.net.Socket.connect(Socket.java:621)
at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:73)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:247)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:167)
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:784)

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

************ DEVICE INFORMATION ************
Brand: HUAWEI
Device: HWVTR
Model: VTR-L29
Id: HUAWEIVTR-L29
Product: VTR-L29

************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: 252C432

@ezaquarii
Copy link
Collaborator

@tobiasKaminsky There is couple of similar errors in the backlog.

The main issue with the code is that NextcloudClient.execute() interface does not declare any exceptions and the underlying implementation throws checked exceptions.

To fix this problem:

  1. add exceptions to the execute() interface and handle them at the point of call
  2. catch those exceptions internally and return appropriate RemoteOperationResult with error status.

I believe 2. is the proper way of doing it, but the fix should follow in the library project.

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
@tobiasKaminsky
Copy link
Member

Yes, let us go with 2. as this is what we currently also do: in client respond on a RemoteOperationResult.

ezaquarii added a commit to nextcloud/android-library that referenced this issue Feb 4, 2020
@4q1
Copy link

4q1 commented Feb 5, 2020

When will this update get pushed out to the android store? I have the same issue, among many more. It's still an issue now.

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
@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

@vikarandris
Copy link
Author

I try nextcloud-dev-20200211.apk
After download a file I get the same exception:

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

java.net.SocketTimeoutException: failed to connect to taborozok.ddns.net/80.98.88.136 (port 443) from /10.251.6.77 (port 38918) after 10000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:185)
at libcore.io.IoBridge.connect(IoBridge.java:129)
at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:137)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:391)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:231)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:213)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
at java.net.Socket.connect(Socket.java:621)
at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:73)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:247)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:167)
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:784)

************ APP INFORMATION ************
ID: com.nextcloud.android.beta
Version: 20200211
Build flavor: versionDev

************ DEVICE INFORMATION ************
Brand: HUAWEI
Device: HWVTR
Model: VTR-L29
Id: HUAWEIVTR-L29
Product: VTR-L29

************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: 252C432

@vikarandris
Copy link
Author

With same version:
I go to the activity tab and I get this exception:
************ CAUSE OF ERROR ************

javax.net.ssl.SSLHandshakeException: Connection closed by peer
at org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:386)
at org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:225)
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:784)

************ APP INFORMATION ************
ID: com.nextcloud.android.beta
Version: 20200211
Build flavor: versionDev

************ DEVICE INFORMATION ************
Brand: HUAWEI
Device: HWVTR
Model: VTR-L29
Id: HUAWEIVTR-L29
Product: VTR-L29

************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: 252C432

@AndyScherzinger
Copy link
Member

Duplicate of #5331

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