Closed centy closed 1 month ago
Upgrade to v2.5.0 and use file-less in-memory databases for your tests.
I have 2.5.0. Same error. Invalid argument(s): Failed to load dynamic library 'objectbox.dll': The specified module could not be found.
Sounds like workaround
It's correct. For unit tests you need to download the native library for your machine manually. I made the note on https://docs.objectbox.io/getting-started about this more prominent.
Edit: we welcome any suggestions on how to automate this.
Without additional information, we are unfortunately not sure how to resolve this issue. Therefore this issue has been automatically closed. Feel free to comment with additional details and we can re-open this issue.
Is there an existing issue?
Build info
Steps to reproduce
void main() { test('test', () async { final store = await openStore(directory: 'test.db'); }); }
Expected behavior
Running test is expected
Actual behavior
Invalid argument(s): Failed to load dynamic library 'objectbox.dll': The specified module could not be found. (error code: 126) dart:ffi new DynamicLibrary.open package:objectbox/src/native/bindings/bindings.dart 84:29 _tryObjectBoxLibFile package:objectbox/src/native/bindings/bindings.dart 123:12 loadObjectBoxLib package:objectbox/src/native/bindings/bindings.dart 144:22 C package:objectbox/src/native/bindings/bindings.dart C package:objectbox/src/native/model.dart 19:31 new Model package:objectbox/src/native/store.dart 225:21 new Store package:pixyfy_color_by_number/objectbox/objectbox.g.dart 131:5 openStore