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

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

Open
seekcx opened this issue Jun 2, 2021 · 13 comments

Comments

@seekcx
Copy link

seekcx commented Jun 2, 2021

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)
@tmthecoder
Copy link
Owner

tmthecoder commented Jun 2, 2021

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
Copy link
Owner

Closing due to inactivity. Please reopen if needed

@ThamMK
Copy link

ThamMK commented Jul 6, 2022

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!

@tmthecoder
Copy link
Owner

@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

@ThamMK
Copy link

ThamMK commented Jul 6, 2022

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

@tmthecoder
Copy link
Owner

Is this app using Swift or Objective C?

@ThamMK
Copy link

ThamMK commented Jul 7, 2022

It's using Swift

@tmthecoder
Copy link
Owner

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

@tmthecoder tmthecoder reopened this Jul 7, 2022
@tmthecoder
Copy link
Owner

@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?

@ThamMK
Copy link

ThamMK commented Jul 15, 2022

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.

@tmthecoder
Copy link
Owner

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

@the-recondite
Copy link

@tmthecoder Works for me

@wbusey0
Copy link

wbusey0 commented Jun 5, 2024

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

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

No branches or pull requests

5 participants