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

Crash when choosing newly formatted USB storage #557

Open
grote opened this issue Sep 14, 2023 · 2 comments
Open

Crash when choosing newly formatted USB storage #557

grote opened this issue Sep 14, 2023 · 2 comments
Labels
Milestone

Comments

@grote
Copy link
Collaborator

grote commented Sep 14, 2023

17:36:18.539  D  Selected storage is a removable USB device.
17:36:18.544  D  Saved flash drive: FlashDrive(name=SanDisk Ultra Fit, serialNumber=redacted, vendorId=1921, productId=21891)
17:36:18.544  D  New storage location saved: content://com.android.externalstorage.documents/tree/353D-47C4%3A
17:36:18.555  E  Error finding file blocking
                 java.io.IOException
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt$getLoadedCursor$2.invokeSuspend(DocumentsStorage.kt:283)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt$getLoadedCursor$2.invoke(Unknown Source:8)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt$getLoadedCursor$2.invoke(Unknown Source:4)
                 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturnIgnoreTimeout(Undispatched.kt:100)
                 	at kotlinx.coroutines.TimeoutKt.setupTimeout(Timeout.kt:146)
                 	at kotlinx.coroutines.TimeoutKt.withTimeout(Timeout.kt:44)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt.getLoadedCursor(DocumentsStorage.kt:281)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt.getLoadedCursor$default(DocumentsStorage.kt:280)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt.listFilesBlocking(DocumentsStorage.kt:206)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt.findFileBlocking(DocumentsStorage.kt:250)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt.createOrGetDirectory(DocumentsStorage.kt:176)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorage$rootBackupDir$1.invokeSuspend(DocumentsStorage.kt:69)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
                 	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
                 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
                 	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
                 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
                 	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorage.getRootBackupDir$packages__apps__Seedvault__android_common__Seedvault(DocumentsStorage.kt:64)
                 	at com.stevesoltys.seedvault.storage.SeedvaultStoragePlugin.getRoot(SeedvaultStoragePlugin.kt:24)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getFolder(SafStoragePlugin.kt:56)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots$suspendImpl(SafStoragePlugin.kt:239)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots(Unknown Source:0)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invokeSuspend(StorageBackup.kt:116)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:8)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:4)
                 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
                 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
                 	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
                 	at org.calyxos.backup.storage.api.StorageBackup.deleteAllSnapshots(StorageBackup.kt:114)
                 	at com.stevesoltys.seedvault.ui.storage.BackupStorageViewModel$onLocationSet$1.invokeSuspend(BackupStorageViewModel.kt:38)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
                 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
17:36:18.556  W  Failed to create document
                 android.os.ParcelableException: java.io.FileNotFoundException: No root for 06E2-63C8
                 	at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82)
                 	at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:79)
                 	at android.os.Parcel.readParcelableInternal(Parcel.java:4816)
                 	at android.os.Parcel.readParcelable(Parcel.java:4778)
                 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3006)
                 	at android.os.Parcel.createException(Parcel.java:2995)
                 	at android.os.Parcel.readException(Parcel.java:2978)
                 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
                 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
                 	at android.content.ContentProviderProxy.call(ContentProviderNative.java:732)
                 	at android.content.ContentResolver.call(ContentResolver.java:2450)
                 	at android.provider.DocumentsContract.createDocument(DocumentsContract.java:1380)
                 	at androidx.documentfile.provider.TreeDocumentFile.createFile(TreeDocumentFile.java:54)
                 	at androidx.documentfile.provider.TreeDocumentFile.createDirectory(TreeDocumentFile.java:64)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt.createOrGetDirectory(DocumentsStorage.kt:176)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorage$rootBackupDir$1.invokeSuspend(DocumentsStorage.kt:69)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
                 	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
                 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
                 	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
                 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
                 	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorage.getRootBackupDir$packages__apps__Seedvault__android_common__Seedvault(DocumentsStorage.kt:64)
                 	at com.stevesoltys.seedvault.storage.SeedvaultStoragePlugin.getRoot(SeedvaultStoragePlugin.kt:24)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getFolder(SafStoragePlugin.kt:56)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots$suspendImpl(SafStoragePlugin.kt:239)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots(Unknown Source:0)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invokeSuspend(StorageBackup.kt:116)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:8)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:4)
                 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
                 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
                 	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
                 	at org.calyxos.backup.storage.api.StorageBackup.deleteAllSnapshots(StorageBackup.kt:114)
                 	at com.stevesoltys.seedvault.ui.storage.BackupStorageViewModel$onLocationSet$1.invokeSuspend(BackupStorageViewModel.kt:38)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
                 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
17:36:18.556  W  Caused by: java.io.FileNotFoundException: No root for 06E2-63C8
                 	at java.lang.reflect.Constructor.newInstance0(Native Method)
                 	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
                 	at android.os.ParcelableException.readFromParcel(ParcelableException.java:56)
                 	... 45 more
17:36:18.557  E  Error creating root backup dir.
                 java.io.IOException
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorageKt.createOrGetDirectory(DocumentsStorage.kt:180)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorage$rootBackupDir$1.invokeSuspend(DocumentsStorage.kt:69)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
                 	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
                 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
                 	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
                 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
                 	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
                 	at com.stevesoltys.seedvault.plugins.saf.DocumentsStorage.getRootBackupDir$packages__apps__Seedvault__android_common__Seedvault(DocumentsStorage.kt:64)
                 	at com.stevesoltys.seedvault.storage.SeedvaultStoragePlugin.getRoot(SeedvaultStoragePlugin.kt:24)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getFolder(SafStoragePlugin.kt:56)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots$suspendImpl(SafStoragePlugin.kt:239)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots(Unknown Source:0)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invokeSuspend(StorageBackup.kt:116)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:8)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:4)
                 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
                 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
                 	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
                 	at org.calyxos.backup.storage.api.StorageBackup.deleteAllSnapshots(StorageBackup.kt:114)
                 	at com.stevesoltys.seedvault.ui.storage.BackupStorageViewModel$onLocationSet$1.invokeSuspend(BackupStorageViewModel.kt:38)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
                 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
17:36:18.577  E  FATAL EXCEPTION: DefaultDispatcher-worker-2
                 Process: com.stevesoltys.seedvault, PID: 21924
                 java.lang.IllegalStateException: No storage set
                 	at com.stevesoltys.seedvault.storage.SeedvaultStoragePlugin.getRoot(SeedvaultStoragePlugin.kt:24)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getFolder(SafStoragePlugin.kt:56)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots$suspendImpl(SafStoragePlugin.kt:239)
                 	at org.calyxos.backup.storage.plugin.saf.SafStoragePlugin.getCurrentBackupSnapshots(Unknown Source:0)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invokeSuspend(StorageBackup.kt:116)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:8)
                 	at org.calyxos.backup.storage.api.StorageBackup$deleteAllSnapshots$2.invoke(Unknown Source:4)
                 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
                 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
                 	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
                 	at org.calyxos.backup.storage.api.StorageBackup.deleteAllSnapshots(StorageBackup.kt:114)
                 	at com.stevesoltys.seedvault.ui.storage.BackupStorageViewModel$onLocationSet$1.invokeSuspend(BackupStorageViewModel.kt:38)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
                 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
                 	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@246a137, Dispatchers.IO]
@arodier
Copy link

arodier commented Dec 9, 2023

This is happening for me too. LineageOS 20, freshly formatted SSD usb drive.

@grote
Copy link
Collaborator Author

grote commented May 17, 2024

need to test if this is still an issue after the refactoring from #647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants