Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Error executing included example app on iOS #38

Closed
soyangel opened this issue Jun 16, 2020 · 6 comments
Closed

Error executing included example app on iOS #38

soyangel opened this issue Jun 16, 2020 · 6 comments

Comments

@soyangel
Copy link

Hi,

Included example app crashes on iOS:

Jun 16 13:48:42 iPhone-7 Runner(Flutter)[510] : [VERBOSE-2:ui_dart_state.cc(166)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, sodium_init): symbol not found)
#0 DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:31)
#1 new SodiumBindings (package:flutter_sodium/src/bindings/sodium_bindings.dart:9)
#2 Sodium._sodium (package:flutter_sodium/src/sodium.dart:49)
#3 Sodium._sodium (package:flutter_sodium/src/sodium.dart:0)
#4 Sodium.sodiumInit (package:flutter_sodium/src/sodium.dart:2013)
#5 main (package:flutter_sodium_example/main.dart:7)
#6 _runMainZoned.. (dart:ui/hooks.dart:247)
#7 _rootRun (dart:async/zone.dart:1190)
#8 _CustomZone.run (dart:async/zone.dart:1093)
#9 _runZoned (dart:async/zone.dart:1630)
#10 runZonedGuarded (dart:async/zone.dart:1618)
#11 _runMainZoned. (dart:ui/hooks.dart:239)
#12 _startIsolate. (dart:isolate-patch/isolate_patch.dart:<\M-b\M^@\M-&>

Flutter 1.19.0-4.1.pre • channel beta • https://github.com/flutter/flutter.gitFramework • revision f994b76974 (7 days ago) • 2020-06-09 15:53:13 -0700Engine • revision 9a28c3bcf4Tools • Dart 2.9.0 (build 2.9.0-14.1.beta)

@kozw
Copy link
Contributor

kozw commented Jun 17, 2020

Unable to reproduce on iPhoneX with flutter beta. Assuming you're trying to debug example app as-is to device?

@soyangel
Copy link
Author

I'm just compiling from example dir with:

flutter build its

and then Archive - Product - export as Ad hoc from Xcode. Same as with my other Flutter apps that work (e.g. the real app I'm using this library on that it's working ok with a version previous to FFI).

Maybe I have to set some option on Xcode so it links the .a?

Running on iPhone 7 with iOS: 13.4.1
Xcode: 11.4.1

@kozw
Copy link
Contributor

kozw commented Jun 23, 2020

Yes, so debug mode seems to work just fine. Release mode not so much, I'm running into a white screen without any error logging whatsoever. Investigating.

@kozw
Copy link
Contributor

kozw commented Jul 9, 2020

Possibly related: dart-lang/native#897

@kozw
Copy link
Contributor

kozw commented Jul 14, 2020

I've just pushed an update that might fix the function lookup failure in release mode. Does this work for you?

@soyangel
Copy link
Author

It works great here.

Thanks for your work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants