nextcloud / nextcloud/android

Uploading many files at once doesn't work: `RuntimeException: android.os.TransactionTooLargeException`

Open
#11,202 3 comments 0 reactions 0 assignees View on GitHub
bug feature: transfers performance: TTLE stable-3.23
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/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](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

1. Launch app
2. Click add files
3. Select folder Camera. Camera contains 1500 files
4. Click upload
5. Get exception

### Expected behaviour

Uploading Camera folder

### Actual behaviour

Crash app and get error. I attached log below

### Android version

10

### Device brand and model

Huawei Nova 5T

### Stock or custom OS?

Stock

### Nextcloud android app version

3.23.1

### Nextcloud server version

25.0.2

### Using a reverse proxy?

No

### Android logs

### Cause of error

```java
Exception in thread "main" java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=2, data=Intent { (has extras) }} to activity {com.nextcloud.client/com.owncloud.android.ui.activity.FileDisplayActivity}: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1099156 bytes
at android.app.ActivityThread.deliverResults(ActivityThread.java:5782)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5823)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
Caused by: Exception in thread "main" java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1099156 bytes
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1749)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:1705)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:674)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:674)
at com.owncloud.android.files.services.FileUploader.uploadNewFile(FileUploader.java:943)
at com.owncloud.android.ui.activity.FileDisplayActivity.requestUploadOfFilesFromFileSystem(FileDisplayActivity.java:964)
at com.owncloud.android.ui.activity.FileDisplayActivity.requestUploadOfFilesFromFileSystem(FileDisplayActivity.java:929)
at com.owncloud.android.ui.activity.FileDisplayActivity.onActivityResult(FileDisplayActivity.java:828)
at android.app.Activity.dispatchActivityResult(Activity.java:8541)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5775)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5823)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
Caused by: Exception in thread "main" android.os.TransactionTooLargeException: data parcel size 1099156 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:535)
at android.app.IActivityManager$Stub$Proxy.startService(IActivityManager.java:5376)
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1729)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:1705)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:674)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:674)

```

### Server error logs

_No response_

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.