Skip to content

Unable to create new Object Box Database in flutter dart #509

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

Closed
jkrogers9862 opened this issue Feb 12, 2023 · 4 comments
Closed

Unable to create new Object Box Database in flutter dart #509

jkrogers9862 opened this issue Feb 12, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@jkrogers9862
Copy link

jkrogers9862 commented Feb 12, 2023

I am seeing an issue but it is with a brand new branch and database, the nuke option from the docs above does not even work either. I had no previous versions of a database and I was just investigating using ObjectBox so I am not sure if it is my entity that are wrong or what but I am providing what configuration I am using.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: ObjectBoxException: failed to create store: Incoming entity ID 1:1159196401019035950 does not match existing UID 19695048053676317
#0 ObjectBoxNativeError.throwMapped (package:objectbox/src/native/bindings/helpers.dart:84:9)
#1 throwLatestNativeError (package:objectbox/src/native/bindings/helpers.dart:50:48)
#2 checkObxPtr (package:objectbox/src/native/bindings/helpers.dart:32:5)
#3 Store._checkStorePointer (package:objectbox/src/native/store.dart:370:7)
#4 new Store (package:objectbox/src/native/store.dart:211:7)
#5 openStore (package:my_app/db/gen/objectbox.g.dart:103:5)
#6 ObjectRepository._create (package:my_app/db/object_repository.dart:38:25)

Lost connection to device.

pubspec.yaml:
dependencies:
objectbox: ^1.7.2
objectbox_sync_flutter_libs: any

flutter_localizations:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.1.11
objectbox_generator: any

objectbox:
output_dir: db/gen

@jkrogers9862 jkrogers9862 added the bug Something isn't working label Feb 12, 2023
@jkrogers9862
Copy link
Author

Not an issue, User error.

@Djostanisic
Copy link

Djostanisic commented Jul 16, 2024

I have the same issue, can you please explain please what was the user error, what caused this problem?

@greenrobot-team
Copy link
Member

@jkrogers9862
Copy link
Author

jkrogers9862 commented Jul 22, 2024

My recommendation is to version control your test databases in a separate repository for each branch you work with. I don't honestly remember what I did to fix it but I know I haven't seen it since I started doing this.

I am actually look to switch to isar because as of right now, objectbox does not support web which I want to expand to.

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