android
android copied to clipboard
Large amount of file uploads fail; restarting causes crash
⚠️ Before posting ⚠️
- [X] This is a bug, not a question or an enhancement.
- [X] I've searched for similar issues and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's Code of Conduct.
Steps to reproduce
- attempt to manually upload a lot of files to my nextcloud server using the android app
- a few files go through, but most (500+ files) fail to upload
- press the restart/refresh icon to restart the upload process for these failed files.
- only a few files restart the upload process, so I click the refresh button a few more times
- crash
Expected behaviour
The files should upload to the server. If files fail to upload, the upload should restart with one click and no crash.
Actual behaviour
The file uploads repeatedly fail (even when the app is open and the phone is on and unlocked). The app crashes when I press the "restart" icon too many times in an attempt to restart failed uploads (as clicking restart one time seems to restart a few file uploads at a time).
Android version
13
Device brand and model
Google Pixel 5a
Stock or custom OS?
Custom (explain in "additional information")
Nextcloud android app version
3.22.3
Nextcloud server version
25.0.1
Using a reverse proxy?
Yes
Android logs
Cause of error
Exception in thread "Thread-75" java.lang.OutOfMemoryError: Failed to allocate a 40 byte allocation with 992168 free bytes and 968KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at java.security.Provider$Service.newInstance(Provider.java:1635)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at java.security.Security.getImpl(Security.java:628)
at java.security.MessageDigest.getInstance(MessageDigest.java:211)
at android.security.net.config.DirectoryCertificateSource.hashName(DirectoryCertificateSource.java:215)
at android.security.net.config.DirectoryCertificateSource.getHash(DirectoryCertificateSource.java:192)
at android.security.net.config.DirectoryCertificateSource.findCerts(DirectoryCertificateSource.java:140)
at android.security.net.config.DirectoryCertificateSource.findAllByIssuerAndSignature(DirectoryCertificateSource.java:115)
at android.security.net.config.SystemCertificateSource.findAllByIssuerAndSignature(SystemCertificateSource.java:27)
at android.security.net.config.CertificatesEntryRef.findAllCertificatesByIssuerAndSignature(CertificatesEntryRef.java:65)
at android.security.net.config.NetworkSecurityConfig.findAllCertificatesByIssuerAndSignature(NetworkSecurityConfig.java:146)
at android.security.net.config.TrustedCertificateStoreAdapter.findAllIssuers(TrustedCertificateStoreAdapter.java:46)
at com.android.org.conscrypt.TrustManagerImpl.findAllTrustAnchorsByIssuerAndSignature(TrustManagerImpl.java:932)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:556)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:503)
at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:332)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:113)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:87)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:118)
at com.owncloud.android.lib.common.network.AdvancedX509TrustManager.checkServerTrusted(AdvancedX509TrustManager.java:118)
at org.conscrypt.Platform.checkServerTrusted(Platform.java:437)
at org.conscrypt.ConscryptEngine.verifyCertificateChain(ConscryptEngine.java:1643)
at org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method)
at org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:567)
at org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1099)
at org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1083)
at org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:880)
at org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:751)
at org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:716)
at org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:833)
at org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:706)
at org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:230)
at org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:209)
at okhttp3.internal.connection.ConnectPlan.connectTls(ConnectPlan.kt:323)
at okhttp3.internal.connection.ConnectPlan.connectTlsEtc(ConnectPlan.kt:188)
at okhttp3.internal.connection.FastFallbackExchangeFinder.find(FastFallbackExchangeFinder.kt:78)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:267)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:84)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:65)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:205)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:158)
at com.nextcloud.common.OkHttpMethodBase.execute(OkHttpMethodBase.kt:175)
at com.nextcloud.client.network.ConnectivityServiceImpl.isInternetWalled(ConnectivityServiceImpl.java:81)
at com.owncloud.android.files.services.FileUploader.retryFailedUploads(FileUploader.java:1072)
at com.owncloud.android.ui.activity.UploadListActivity.lambda$refresh$0$com-owncloud-android-ui-activity-UploadListActivity(UploadListActivity.java:198)
at com.owncloud.android.ui.activity.UploadListActivity$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:1012)
App information
- ID:
com.nextcloud.client
- Version:
30220390
- Build flavor:
generic
Device information
- Brand:
google
- Device:
barbet
- Model:
Pixel 5a
- Id:
TP1A.221105.002
- Product:
barbet
Firmware
- SDK:
33
- Release:
13
- Incremental:
2022111000
Server error logs
No response
Additional information
GrapheneOS
Same Error to me - my logs Look Like this:
Cause of error
Exception in thread "Thread-5" java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 5315192 free bytes and 5190KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
at sun.security.x509.X500Name.parseDER(X500Name.java:803)
at sun.security.x509.X500Name.<init>(X500Name.java:317)
at javax.security.auth.x500.X500Principal.<init>(X500Principal.java:226)
at com.android.org.conscrypt.OpenSSLX509Certificate.getSubjectX500Principal(OpenSSLX509Certificate.java:502)
at okhttp3.internal.tls.BasicTrustRootIndex.<init>(BasicTrustRootIndex.kt:28)
at okhttp3.internal.platform.Platform.buildTrustRootIndex(Platform.kt:163)
at okhttp3.internal.platform.Platform.buildCertificateChainCleaner(Platform.kt:160)
at okhttp3.internal.platform.Android10Platform.buildCertificateChainCleaner(Android10Platform.kt:82)
at okhttp3.internal.tls.CertificateChainCleaner$Companion.get(CertificateChainCleaner.kt:42)
at okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.kt:870)
at com.nextcloud.common.PlainClient$Companion.createDefaultClient(PlainClient.kt:62)
at com.nextcloud.common.PlainClient$Companion.access$createDefaultClient(PlainClient.kt:47)
at com.nextcloud.common.PlainClient.<init>(PlainClient.kt:45)
at com.nextcloud.client.network.ClientFactoryImpl.createPlainClient(ClientFactoryImpl.java:94)
at com.nextcloud.client.network.ConnectivityServiceImpl.isInternetWalled(ConnectivityServiceImpl.java:79)
at com.owncloud.android.files.services.FileUploader.retryFailedUploads(FileUploader.java:1072)
at com.owncloud.android.utils.FilesSyncHelper.lambda$restartJobsIfNeeded$0(FilesSyncHelper.java:240)
at com.owncloud.android.utils.FilesSyncHelper$$ExternalSyntheticLambda0.run(Unknown Source:10)
at java.lang.Thread.run(Thread.java:1012)
App information
- ID:
com.nextcloud.client
- Version:
30220390
- Build flavor:
gplay
Device information
- Brand:
samsung
- Device:
c2s
- Model:
SM-N986B
- Id:
SP1A.210812.016
- Product:
c2sxeea
Firmware
- SDK:
31
- Release:
12
- Incremental:
N986BXXS5FVI5
I habe the same problem on LineageOs 19.1 with client 3.22.3 :
Cause of error
Exception in thread "Thread-3" java.lang.OutOfMemoryError: Failed to allocate a 64 byte allocation with 972592 free bytes and 949KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
at java.lang.StringFactory.newStringFromChars(StringFactory.java:112)
at java.lang.StringBuilder.toString(StringBuilder.java:413)
at sun.security.x509.X500Name.getRFC2253CanonicalName(X500Name.java:732)
at sun.security.x509.X500Name.hashCode(X500Name.java:383)
at javax.security.auth.x500.X500Principal.hashCode(X500Principal.java:487)
at java.util.HashMap.hash(HashMap.java:338)
at java.util.LinkedHashMap.get(LinkedHashMap.java:464)
at okhttp3.internal.tls.BasicTrustRootIndex.<init>(BasicTrustRootIndex.kt:57)
at okhttp3.internal.platform.Platform.buildTrustRootIndex(Platform.kt:163)
at okhttp3.internal.platform.Platform.buildCertificateChainCleaner(Platform.kt:160)
at okhttp3.internal.platform.Android10Platform.buildCertificateChainCleaner(Android10Platform.kt:82)
at okhttp3.internal.tls.CertificateChainCleaner$Companion.get(CertificateChainCleaner.kt:42)
at okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.kt:870)
at com.nextcloud.common.PlainClient$Companion.createDefaultClient(PlainClient.kt:62)
at com.nextcloud.common.PlainClient$Companion.access$createDefaultClient(PlainClient.kt:47)
at com.nextcloud.common.PlainClient.<init>(PlainClient.kt:45)
at com.nextcloud.client.network.ClientFactoryImpl.createPlainClient(ClientFactoryImpl.java:94)
at com.nextcloud.client.network.ConnectivityServiceImpl.isInternetWalled(ConnectivityServiceImpl.java:79)
at com.owncloud.android.files.services.FileUploader.retryFailedUploads(FileUploader.java:1072)
at com.owncloud.android.utils.FilesSyncHelper.lambda$restartJobsIfNeeded$0(FilesSyncHelper.java:240)
at com.owncloud.android.utils.FilesSyncHelper$$ExternalSyntheticLambda0.run(Unknown Source:10)
at java.lang.Thread.run(Thread.java:920)
App information
- ID:
com.nextcloud.client
- Version:
30220390
- Build flavor:
generic
Device information
- Brand:
Sony
- Device:
H4113
- Model:
H4113
- Id:
SQ3A.220705.004
- Product:
H4113
Firmware
- SDK:
32
- Release:
12
- Incremental:
eng.root.20221022.170335
Duplicate of #10572?
Duplicate of #10572?
There is no Error Log - maybe, Not Sure...