cryptomator / android

Cryptomator for Android
https://cryptomator.org
GNU General Public License v3.0
760 stars 126 forks source link

Failed to write back edited file on some devices #540

Closed SailReal closed 5 months ago

SailReal commented 5 months ago

Please agree to the following

Summary

Writing back an edited file using a thrid party fails

System Setup

- Android: 14
- Cryptomator: 1.10.1
- Device: SM-P613

Cloud Type

No response

Steps to Reproduce

  1. Open a file using Cryptomator
  2. Change it using a third party app
  3. Resume to Cryptomator

Expected Behavior

Cryptomator uploads the changed file

Actual Behavior

Cryptomator shows an error and discards the change

Reproducibility

Intermittent

Relevant Log Output

E   20240628203518.368  ExceptionHandler    android.database.CursorIndexOutOfBoundsException: Requested column: -1, # of columns: 2
    at android.database.MatrixCursor.get(MatrixCursor.java:72)
    at android.database.MatrixCursor.isNull(MatrixCursor.java:324)
    at android.database.CursorWrapper.isNull(CursorWrapper.java:186)
    at org.cryptomator.presentation.util.ContentResolverUtil.fileModifiedDateForContentUri(ContentResolverUtil.kt:35)
    at org.cryptomator.presentation.util.ContentResolverUtil.fileModifiedDate(ContentResolverUtil.kt:22)
    at org.cryptomator.presentation.presenter.UriBasedDataSource.modifiedDate(UriBasedDataSource.kt:33)
    at org.cryptomator.domain.usecases.cloud.CancelAwareDataSource.modifiedDate(CancelAwareDataSource.kt:40)
    at org.cryptomator.data.cloud.crypto.CryptoImplDecorator.writeShortNameFile(CryptoImplDecorator.kt:452)
    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)

ErrorCode: MIOQ:KCRI

Anything else?

Can not reproduce it on my device, seems to be device specific