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

[BUG]: Config/Export after deleting the storage directory crashes the app #1061

Closed
kamathprasad9 opened this issue Oct 11, 2024 · 3 comments
Closed
Assignees
Labels

Comments

@kamathprasad9
Copy link
Collaborator

Description

Process: com.fieldbook.tracker, PID: 23424
                            java.util.NoSuchElementException: List is empty.
                            	at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:214)
                            	at com.fieldbook.tracker.utilities.ExportUtil.handleExportResult(ExportUtil.kt:539)
                            	at com.fieldbook.tracker.utilities.ExportUtil.access$handleExportResult(ExportUtil.kt:48)
                            	at com.fieldbook.tracker.utilities.ExportUtil$startExportTasks$1$1.invokeSuspend(ExportUtil.kt:351)
                            	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                            	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                            	at android.os.Handler.handleCallback(Handler.java:959)
                            	at android.os.Handler.dispatchMessage(Handler.java:100)
                            	at android.os.Looper.loopOnce(Looper.java:232)
                            	at android.os.Looper.loop(Looper.java:317)
                            	at android.app.ActivityThread.main(ActivityThread.java:8699)
                            	at java.lang.reflect.Method.invoke(Native Method)
                            	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
                            	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
                            	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@2e942ce, Dispatchers.IO]

Expected behavior

No response

Field Book version

No response

@chaneylc
Copy link
Member

chaneylc commented Dec 4, 2024

I can't reproduce this on the latest version, please reopen this if it occurs again for you.

@chaneylc chaneylc closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Field Book Dec 4, 2024
@kamathprasad9
Copy link
Collaborator Author

I can still see this on the latest version.

Here's what I did:

  1. Open up the app, stay on the home page of the app (config activity)
  2. Without killing the app, switch to the device's file manager and delete the storage directory
  3. Switch back to the app and try doing Config/Export

This is just an extreme case - highly unlikely to happen

@kamathprasad9 kamathprasad9 reopened this Dec 12, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress in Field Book Dec 12, 2024
@kamathprasad9
Copy link
Collaborator Author

kamathprasad9 commented Dec 12, 2024

Taking a similar approach for settings/database/export gives a success toast message to the user - but the db file is never saved in the device #1060

@trife trife closed this as completed in e9eec0b Jan 4, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in Field Book Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants