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

io.objectbox.exception.DbException: Could not commit tx (-30786) (error code -30786) #1099

Closed
SergeyMakogon-WD opened this issue Sep 15, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@SergeyMakogon-WD
Copy link

Describe the bug
Crashlytics reported such error on real user device on app's prod release

Basic info (please complete the following information):

  • ObjectBox version (are you using the latest version?): 2.9.1
  • Reproducibility: occurred once only
  • Device: Galaxy S20 FE
  • OS: Android 12

Logs, stack traces

Caused by io.objectbox.exception.DbException: Could not commit tx (-30786)
at io.objectbox.Transaction.nativeCommit(Transaction.java)
at io.objectbox.Transaction.commit(Transaction.java:135)
at io.objectbox.Transaction.commitAndClose(Transaction.java:140)
at io.objectbox.Box.commitWriter(Box.java:123)
at io.objectbox.Box.internalCallWithWriterHandle(Box.java:698)
at io.objectbox.query.Query.remove(Query.java:590)
at *.android.upload.diskcache.DiskCacheManager.removeAllFromUpload(DiskCacheManager.kt:175)
at *.android.upload.upload.AutoBackupUploadManager.cancelAll(AutoBackupUploadManager.kt:132)
at *.android.upload.service.AutoBackupService.stopCameraScanning(AutoBackupService.kt:74)
at *.android.upload.service.AutoBackupService.onDestroy(AutoBackupService.kt:52)
at android.app.ActivityThread.handleStopService(ActivityThread.java:5122)
at android.app.ActivityThread.access$2300(ActivityThread.java:310)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2324)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

@SergeyMakogon-WD SergeyMakogon-WD added the bug Something isn't working label Sep 15, 2022
@greenrobot greenrobot removed the bug Something isn't working label Sep 22, 2022
@greenrobot
Copy link
Member

greenrobot commented Sep 22, 2022

-30786 is an internal code for a potential disk corruption. If this error was reported just once, it could be that it's a hardware failure of the user's device. The only thing that could be done for non-reproducible cases like this is to catch this and delete the DB hoping that it does not fail again. 🤷

PS.: my first response was wrong (-30786 is not "db is full"), in case you are wondering about the edited comment.

@greenrobot-team
Copy link
Member

greenrobot-team commented Jan 31, 2023

@SergeyMakogon-WD We have released 3.5.1 which should fix this issue for Android devices as well. Thanks for reporting!

See objectbox/objectbox-dart#485 where this was reported to occur more frequently on iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants