objectbox / objectbox/objectbox-java
io.objectbox.exception.DbException Not a database file (-30793)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
io.objectbox.exception.DbException
Not a database file (-30793)
Basic info (please complete the following information):
- ObjectBox version : [2.8.1]
- Reproducibility: [occasionally without visible pattern]
- Device: [series]
- OS: [series]
Expected behavior
A clear and concise description of what you expected to happen.
Code
boxStore = MyObjectBox.builder().androidContext(context.applicationContext).build()
Logs, stack traces
io.objectbox.exception.DbException: Not a database file (-30793)
--
java.lang.RuntimeException:Unable to create application com.qq.ac.android.ComicApplication: io.objectbox.exception.DbException: Not a database file (-30793) (error code -30793)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5770)
......
Caused by:
io.objectbox.exception.DbException:Not a database file (-30793)
io.objectbox.BoxStore.nativeCreateWithFlatOptions(Native Method)
io.objectbox.BoxStore.<init>(SourceFile:17)
f.b.d.b(SourceFile:5)
Additional context
Initialization of the database is in the main thread, the main process. It was initialized only once.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report points to MyObjectBox.builder().androidContext(...) and the BoxStore.nativeCreateWithFlatOptions stack trace; start by reviewing the ObjectBox 2.8.1 Android initialization and database file involved there. Reproduce the intermittent -30793 failure while recording the actual device, OS, and storage conditions, then verify the cause and fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- database, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100