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

_openRealmLib fails for dart compile to exe #1765

Closed
nielsenko opened this issue Jul 31, 2024 · 1 comment · Fixed by #1766
Closed

_openRealmLib fails for dart compile to exe #1765

nielsenko opened this issue Jul 31, 2024 · 1 comment · Fixed by #1766
Assignees

Comments

@nielsenko
Copy link
Contributor

Compiling a dart app dependent on realm_dart, and copying it outside the project directory, will fail to load shared library, even when it is placed correctly on the path.

./myapp.exe
Unhandled exception:
Bad state: Could not find package_config.json
#0      _getPackageConfigJson (package:realm_dart/src/handles/native/init.dart:78)
#1      _openRealmLib (package:realm_dart/src/handles/native/init.dart:114)
#2      initRealm (package:realm_dart/src/handles/native/init.dart:157)
#3      realmLib.<anonymous closure> (package:realm_dart/src/handles/native/realm_library.dart:16)
#4      realmLib (package:realm_dart/src/handles/native/realm_library.dart:25)
#5      new ConfigHandle.from.<anonymous closure> (package:realm_dart/src/handles/native/config_handle.dart)
#6      using (package:ffi/src/arena.dart:124)
#7      new ConfigHandle.from (package:realm_dart/src/handles/native/config_handle.dart:26)
#8      new RealmHandle.open (package:realm_dart/src/handles/native/realm_handle.dart:46)
#9      Realm._openRealm (package:realm_dart/src/realm_class.dart:207)
#10     new Realm._ (package:realm_dart/src/realm_class.dart:143)
#11     new Realm (package:realm_dart/src/realm_class.dart:141)
#12     main (file:///Users/kasper/Projects/mongodb/realm-dart-samples/realm_dart/bin/myapp.dart:39)
#13     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295)
#14     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184)

Related to #1755

@nielsenko nielsenko self-assigned this Jul 31, 2024
Copy link

sync-by-unito bot commented Jul 31, 2024

➤ PM Bot commented:

Jira ticket: RDART-1082

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

Successfully merging a pull request may close this issue.

1 participant