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

[realm_dart] [macOS] Failed to load dynamic library #664

Closed
hmbenhaim opened this issue Jun 9, 2022 · 8 comments
Closed

[realm_dart] [macOS] Failed to load dynamic library #664

hmbenhaim opened this issue Jun 9, 2022 · 8 comments

Comments

@hmbenhaim
Copy link

hmbenhaim commented Jun 9, 2022

Hi,
I get the error below when trying to run realm on macOS with dart 2.17.1
I tried to find where can I get this binaries but no luck.

Invalid argument(s): Failed to load dynamic library '/Users/username/Documents/GitHub/services/realm_project/binary/macos/librealm_dart.dylib': dlopen(/Users/username/Documents/GitHub/services/realm_project/binary/macos/librealm_dart.dylib, 0x0001): tried: '/Users/username/Documents/GitHub/services/realm_project/binary/macos/librealm_dart.dylib' (no such file)
#0 _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:12:43)
#1 new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:23:12)
#2 initRealm (package:realm_dart/src/init.dart:67:39)
#3 new RealmCore. (package:realm_dart/src/native/realm_core.dart:65:17)
#4 new RealmCore (package:realm_dart/src/native/realm_core.dart:70:37)
#5 realmCore (package:realm_dart/src/native/realm_core.dart:47:30)
#6 realmCore (package:realm_dart/src/native/realm_core.dart)
#7 new Realm.
(package:realm_dart/src/realm_class.dart:97:69)
#8 new Realm (package:realm_dart/src/realm_class.dart:95:38)
#9 main (file:///Users/username/Documents/GitHub/services/realm_project/bin/main.dart:25:15)
#10 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:295:32)
#11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

@hmbenhaim hmbenhaim changed the title [real_dart] [macOS] Failed to load dynamic library [realm_dart] [macOS] Failed to load dynamic library Jun 9, 2022
@nielsenko
Copy link
Contributor

Did you run dart run realm_dart install?

@hmbenhaim
Copy link
Author

No sorry, I installed the library I thought it was enough, it did the trick 👍 thank you

@nielsenko
Copy link
Contributor

It is only needed for Dart, for Flutter we hook into the build process. Good luck with you project.

@hmbenhaim
Copy link
Author

I see, we build flutter apps and our backend is in dart as well.
We use atlas mongo DB and we are thinking of using realm.
Thank you 🙏

@demux79
Copy link

demux79 commented Jan 10, 2023

I have a similar issue in Flutter. Every app launch in the iOS simulator I get this exception. Luckily, it can be skipped.
realm

@desistefanova
Copy link
Contributor

@demux79 ,
Could you share some more details about the steps that you do to run the app? What do you have in pubspec.yml? Did you have some installation errors similar to described in #1023?

@desistefanova
Copy link
Contributor

Hm,
Everything looks fine.
Do you have such problem with the other environments?
Did you already try to create a new emulator?

@demux79
Copy link

demux79 commented Jan 12, 2023

Yes, running it on a different iOS simulator or a real iPhone causes the same error. This is from the real iPhone:
image

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants