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

Failed to load dynamic library (dlopen failed: library "libobjectbox-jni.so" not found) #187

Closed
Katekko opened this issue Feb 3, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@Katekko
Copy link

Katekko commented Feb 3, 2021

Describe the bug
Just trying to start my store, nothing more

Basic info:

  • ObjectBox Dart version: 0.11.0
  • Flutter/Dart SDK: ">=2.7.0 <3.0.0" => Dart SDK version: 2.10.5 (stable) (Unknown timestamp) on "linux_x64"
  • Reproducibility: Create a new project and try to reproduce the very first example on the main page on pubdev
  • Device: Android Emulator - 10.0 (Q) - API 29

Flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio (not installed)
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

Code that I'm using to try instantiate my store.
The Get.put, is a just my way to put on memory the Store. (See the lib getx)
image

Screenshot from 2021-02-03 16-13-55

Logs, stack traces

StackTrace: 
#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:55)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:20:12)
#2      loadObjectBoxLib (package:objectbox/src/bindings/bindings.dart:42:26)
#3      C (package:objectbox/src/bindings/bindings.dart:48:41)
#4      new Model (package:objectbox/src/model.dart:18:31)
#5      new Store (package:objectbox/src/store.dart:46:17)
#6      Initializer._initObjectBox (package:arctekko/initializer.dart:70:19)
<asynchronous suspension>
#7      Initializer.init (package:arctekko/initializer.dart:26:13)
#8      _rootRunUnary (dart:async/zone.dart:1198:47)
#9      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#13     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#14     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#15     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#16     Initializer._initStorage (package:arctekko/initializer.dart)
#17     _rootRunUnary (dart:async/zone.dart:1198:47)
#18     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#19     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#20     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#21     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#22     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#23     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#24     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#25     new GetStorage._internal.<anonymous closure> (package:get_storage/src/storage_impl.dart)
#26     _rootRunUnary (dart:async/zone.dart:1198:47)
#27     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#28     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#29     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#30     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#31     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#32     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#33     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#34     GetStorage._init (package:get_storage/src/storage_impl.dart)
#35     _rootRunUnary (dart:async/zone.dart:1198:47)
#36     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#37     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#38     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#39     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#40     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#41     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#42     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#43     StorageImpl._readFile (package:get_storage/src/storage/io.dart)
#44     _rootRunUnary (dart:async/zone.dart:1198:47)
#45     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#46     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#47     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#48     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#49     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#50     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#51     _rootRun (dart:async/zone.dart:1190:13)
#52     _CustomZone.run (dart:async/zone.dart:1093:19)
#53     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#54     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#55     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#56     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

Please lemme know if you need anything more to reproduce. Maybe is something wrong with me

@Katekko Katekko added the bug Something isn't working label Feb 3, 2021
@RTrackerDev
Copy link
Contributor

@Katekko Did you add objectbox_flutter_libs: ^0.11.0?

@Katekko
Copy link
Author

Katekko commented Feb 3, 2021

objectbox_flutter_libs: ^0.11.0

No, really thanks, I was missing this dependence.

Working now. I guess if someone was dumb like me will find this issue closed and will know what to do lol

@Katekko Katekko closed this as completed Feb 3, 2021
bm2ilabs added a commit to bm2ilabs/objectbox-dart that referenced this issue Oct 27, 2021
This pull request for the issue related to objectbox#187 
Failed to load dynamic library (dlopen failed: library "libobjectbox-jni.so" not found)
@GardenerMartino
Copy link

I experience the same for older android device 5.0 (lolipop), tested working properly on android 8+

  • objectbox: ^1.3.0
  • objectbox_flutter_libs: ^1.3.0

@greenrobot-team
Copy link
Member

greenrobot-team commented Jan 10, 2022

@GardenerMartino Thanks for reporting. Could you please create a new issue with additional details for this? The above one is rather outdated.

Update: tested our example on an Android 5.0 emulator and it runs fine.

@alsoLut
Copy link

alsoLut commented Jan 20, 2022

Any progress on this issue?

@GardenerMartino
Copy link

GardenerMartino commented Jan 21, 2022

this will fixed by this PR:
#328

@greenrobot-team
which branch did you try? because I tried from pub.dev v1.3.0, it still has the error, while the PR above fixed the error.

@greenrobot-team
Copy link
Member

@GardenerMartino Yes, tested with the latest version. As said, could you create a new issue and fill in as many details as possible, maybe even a small example project. I can't reproduce this with the information you have given. So we can't work on fixing this.

@greenrobot-team
Copy link
Member

OK, @BogdanMarinescu created a new issue for this: please share more details in #369

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

5 participants