cryptomator / cryptomator/android

Improved Error Reporting for "No space left on device"

Open
#551 1 comment 1 reaction 0 assignees View on GitHub
good first issue type:minor-bug
Dominant language
Kotlin
Stars
1.2k
Forks
216
PR merge metrics
No merged PRs in 30d

Description

A user encountered an issue, where they tried to upload a large file to the cloud and encountered an unknown error. They noticed themselves that their phone storage was almost full and were able to resolve this issue, but a proper error message would've probably improved the situation.

```
E 20240919171857.987 ExceptionHandler org.cryptomator.domain.exception.FatalBackendException: java.io.IOException: write failed: ENOSPC (No space left on device)
at org.cryptomator.data.cloud.crypto.CryptoImplDecorator.writeShortNameFile(CryptoImplDecorator.kt:462)
at org.cryptomator.data.cloud.crypto.CryptoImplVaultFormat7.write(CryptoImplVaultFormat7.kt:460)
at org.cryptomator.data.cloud.crypto.CryptoCloudContentRepository.write(CryptoCloudContentRepository.kt:90)
at org.cryptomator.data.cloud.crypto.CryptoCloudContentRepository.write(CryptoCloudContentRepository.kt:21)
at org.cryptomator.data.repository.DispatchingCloudContentRepository.write(DispatchingCloudContentRepository.kt:149)
at org.cryptomator.domain.usecases.cloud.UploadFiles.writeCloudFile(UploadFiles.java:118)
at org.cryptomator.domain.usecases.cloud.UploadFiles.upload(UploadFiles.java:94)
at org.cryptomator.domain.usecases.cloud.UploadFiles.upload(UploadFiles.java:82)
at org.cryptomator.domain.usecases.cloud.UploadFiles.upload(UploadFiles.java:74)
at org.cryptomator.domain.usecases.cloud.UploadFiles.execute(UploadFiles.java:61)
at org.cryptomator.domain.usecases.cloud.UploadFilesUseCase$Launcher$2.subscribe(UploadFilesUseCase.java:119)
at io.reactivex.internal.operators.flowable.FlowableFromPublisher.subscribeActual(FlowableFromPublisher.java:29)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.Flowable.subscribe(Flowable.java:14882)
at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:288)
at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:253)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.io.IOException: write failed: ENOSPC (No space left on device)
at libcore.io.IoBridge.write(IoBridge.java:651)
at java.io.FileOutputStream.write(FileOutputStream.java:432)
at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:469)
at org.cryptomator.cryptolib.common.EncryptingWritableByteChannel.encryptAndFlushBuffer(EncryptingWritableByteChannel.java:71)
at org.cryptomator.cryptolib.common.EncryptingWritableByteChannel.write(EncryptingWritableByteChannel.java:54)
at org.cryptomator.data.cloud.crypto.CryptoImplDecorator.writeShortNameFile(CryptoImplDecorator.kt:446)
... 19 more
Suppressed: java.io.IOException: write failed: ENOSPC (No space left on device)
at libcore.io.IoBridge.write(IoBridge.java:651)
at java.io.FileOutputStream.write(FileOutputStream.java:432)
at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:469)
at org.cryptomator.cryptolib.common.EncryptingWritableByteChannel.encryptAndFlushBuffer(EncryptingWritableByteChannel.java:71)
at org.cryptomator.cryptolib.common.EncryptingWritableByteChannel.close(EncryptingWritableByteChannel.java:43)
at kotlin.io.CloseableKt.closeFinally(Closeable.kt:59)
at org.cryptomator.data.cloud.crypto.CryptoImplDecorator.writeShortNameFile(CryptoImplDecorator.kt:458)
... 19 more
Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left on device)
at libcore.io.Linux.writeBytes(Native Method)
at libcore.io.Linux.write(Linux.java:296)
at libcore.io.ForwardingOs.write(ForwardingOs.java:943)
at libcore.io.BlockGuardOs.write(BlockGuardOs.java:448)
at libcore.io.ForwardingOs.write(ForwardingOs.java:943)
at libcore.io.IoBridge.write(IoBridge.java:646)
... 25 more
Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left on device)
at libcore.io.Linux.writeBytes(Native Method)
at libcore.io.Linux.write(Linux.java:296)
at libcore.io.ForwardingOs.write(ForwardingOs.java:943)
at libcore.io.BlockGuardOs.write(BlockGuardOs.java:448)
at libcore.io.ForwardingOs.write(ForwardingOs.java:943)
at libcore.io.IoBridge.write(IoBridge.java:646)
... 24 more

ErrorCode: KFU8:J2RI
```

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.