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

** (UndefinedFunctionError) function Bcrypt.Base.gensalt_nif/3 #116

Closed
blackode opened this issue Aug 25, 2017 · 6 comments
Closed

** (UndefinedFunctionError) function Bcrypt.Base.gensalt_nif/3 #116

blackode opened this issue Aug 25, 2017 · 6 comments

Comments

@blackode
Copy link

blackode commented Aug 25, 2017

I am using Elixir V 1.5.1

comeonin, "~> 4.0 "
bcrypt_elixir, "~>1.0"
iex(2)> Comeonin.Bcrypt.hashpwsalt("mysecretpass")
[warn] The on_load function for module Elixir.Bcrypt.Base returned {:error,
 {:bad_lib,
  'NIF \'Elixir.Bcrypt.Base\':hash_nif/2 requires a runtime with dirty scheduler support.'}}

** (UndefinedFunctionError) function Bcrypt.Base.gensalt_nif/3 is undefined (module Bcrypt.Base is not available)
    (bcrypt_elixir) Bcrypt.Base.gensalt_nif([75, 149, 80, 213, 166, 174, 2, 77, 251, 164, 174, 209, 246, 97, 80, 189], 12, 98)
    (bcrypt_elixir) lib/bcrypt.ex:45: Bcrypt.gen_salt/2
    (bcrypt_elixir) lib/bcrypt.ex:78: Bcrypt.hash_pwd_salt/2
iex(2)> 
@riverrun
Copy link
Owner

For bcrypt_elixir version 1.0, you need to be using Erlang 20.

Downgrade to bcrypt_elixir version 0.12, and there should be no problem.

Let me know if that works.

@blackode
Copy link
Author

@riverrun Thanks for quick response. I am out now. I will let you know after either downgrading bcrypt_elixir or upgrading the erlang and testing.

@blackode
Copy link
Author

@riverrun Glad it worked when I upgraded to erlang 20.0 Thanks 💐

@blackode
Copy link
Author

According to @riverrun explained about the issue following his hints I Upgrading to erlang 20.0 It is working as expected now. Thanks to @riverrun for quick response.

@riverrun
Copy link
Owner

Glad to hear you got it working. I'm just working on improving the error message now.

@blackode
Copy link
Author

@riverrun error message with clear information what causing the error would be nice.... Glad to hear that you are working on that...

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

2 participants