dargon2 icon indicating copy to clipboard operation
dargon2 copied to clipboard

Unhandled Exception: Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, argon2_hash): symbol not found)

Open seekcx opened this issue 4 years ago • 13 comments

Great library, thank you for your contribution.

I encountered the following error when using it, what should I do?

Unhandled Exception: Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, argon2_hash): symbol not found)
#0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:31:29)
#1      new LocalBinder._
package:dargon2/…/native/local_binder.dart:154
#2      LocalBinder._privateInstance
package:dargon2/…/native/local_binder.dart:127
#3      LocalBinder._privateInstance (package:dargon2/src/native/local_binder.dart)
package:dargon2/…/native/local_binder.dart:1
#4      LocalBinder.instance
package:dargon2/…/native/local_binder.dart:144
#5      DArgon2.hashPasswordBytesSync
package:dargon2/src/argon2.dart:156
#6      DArgon2.hashPasswordStringSync
package:dargon2/src/argon2.dart:123
#7      DArgon2.hashPasswordString
package:dargon2/src/argon2.dart:66
#8      RootController.make
package:elf/…/controller/root.dart:56
#9      _InkResponseState._handleTap
package:flutter/…/material/ink_well.dart:989
#10     GestureRecognizer.invokeCallback
package:flutter/…/gestures/recognizer.dart:182
#11     TapGestureRecognizer.handleTapUp
package:flutter/…/gestures/tap.dart:607
#12     BaseTapGestureRecognizer._checkUp
package:flutter/…/gestures/tap.dart:296
#13     BaseTapGestureRecognizer.acceptGesture
package:flutter/…/gestures/tap.dart:267
#14     GestureArenaManager.sweep
package:flutter/…/gestures/arena.dart:157
#15     GestureBinding.handleEvent
package:flutter/…/gestures/binding.dart:443
#16     GestureBinding.dispatchEvent
package:flutter/…/gestures/binding.dart:419
#17     RendererBinding.dispatchEvent
package:flutter/…/rendering/binding.dart:287
#18     GestureBinding._handlePointerEventImmediately
package:flutter/…/gestures/binding.dart:374
#19     GestureBinding.handlePointerEvent
package:flutter/…/gestures/binding.dart:338
#20     GestureBinding._flushPointerEventQueue
package:flutter/…/gestures/binding.dart:296
#21     GestureBinding._handlePointerDataPacket
package:flutter/…/gestures/binding.dart:279
#22     _rootRunUnary (dart:async/zone.dart:1370:13)
#23     _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#24     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#25     _invoke1 (dart:ui/hooks.dart:182:10)
#26     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
#27     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)

seekcx avatar Jun 02 '21 07:06 seekcx

Hey, what platform are you trying to run on and are you using this plugin or the dargon2_flutter plugin?

It seems like you have a flutter app. If so, you should be using the dargon2_flutter plugin as the normal C library loading doesn't work with mobile devices and flutter apps need to handle library loading differently.

tmthecoder avatar Jun 02 '21 12:06 tmthecoder

Closing due to inactivity. Please reopen if needed

tmthecoder avatar Jul 01 '21 08:07 tmthecoder

Hey @tmthecoder, thanks a lot for the library but I am also facing the same error when building to the iOS simulator running on MacOS using Visual Studio Code. The same code works on Windows for the Android simulator but I'm getting this error message on the MacOS.

Here is my flutter doctor flutter doctor macos

Thank you!

ThamMK avatar Jul 06 '22 09:07 ThamMK

@ThamMK What is the deploy platform? Are you deploying to macOS or building an iOS app on a Mac device? Either way, the plugin should be supported on all platforms. If you encounter a lookup error, try initializing it like it mentions on the README for the isolate-specific initialization or the pre Flutter 2.8

tmthecoder avatar Jul 06 '22 14:07 tmthecoder

I am building a flutter 3.0 app onto the iPhone simulator on a Mac device. I have tried initializing at the main function but I'm still getting the error.

flutter3_dargon2_error

ThamMK avatar Jul 06 '22 15:07 ThamMK

Is this app using Swift or Objective C?

tmthecoder avatar Jul 06 '22 22:07 tmthecoder

It's using Swift

ThamMK avatar Jul 07 '22 01:07 ThamMK

If you build for Android on that same Mac, does it work?

tmthecoder avatar Jul 07 '22 02:07 tmthecoder

@ThamMK I was able to reproduce this after a bit of messing with Flutter & iOS Apps. I found the issue to be weird since it wasn't present prior to Flutter 3.

Though, my fix was adding: pod 'Argon2Swift' then running a flutter pub get and cd ios && pod install. Can you verify that works for you?

tmthecoder avatar Jul 08 '22 18:07 tmthecoder

Thanks for the fix, I'll give it a try when I have the chance to test it out as at the moment we have switched to a different argon2 package.

ThamMK avatar Jul 15 '22 08:07 ThamMK

@ThamMK Any word on this? I'll close if not.

tmthecoder avatar Oct 09 '22 02:10 tmthecoder

@tmthecoder Works for me

the-recondite avatar Oct 21 '22 14:10 the-recondite

Works for me as well. Maybe this should be added to the installation instructions?

wbusey0 avatar Jun 05 '24 13:06 wbusey0