dwyl / auth

🚪 🔐 UX-focussed Turnkey Authentication Solution for Web Apps/APIs (Documented, Tested & Maintained)
https://authdemo.fly.dev
GNU General Public License v2.0
135 stars 9 forks source link

(ArgumentError) argument error: Fields.Helpers.get_salt/1 #229

Closed nelsonic closed 2 years ago

nelsonic commented 2 years ago

While attempting to run the tests for auth (main branch) on my localhost, after running source .env I attempted both mix test and the alias mix c and got the following error:

 mix c
Generated auth app
The database for Auth.Repo has been dropped
** (ArgumentError) argument error
    (fields 2.8.2) lib/helpers.ex:19: Fields.Helpers.get_salt/1
    (fields 2.8.2) lib/helpers.ex:15: Fields.Helpers.hash/2
    (fields 2.8.2) lib/hash.ex:22: Fields.Hash.dump/1
    (ecto 3.7.2) lib/ecto/type.ex:915: Ecto.Type.process_dumpers/3
    (elixir 1.13.4) lib/enum.ex:2396: Enum."-reduce/3-lists^foldl/2-0-"/3

I think I know why this is happening ... but not 100%. Hence opening this issue proactively before diving into solving it so that: a. I capture the steps I took to resolve it. ✍️ b. I can refer back to those steps if this happens again in the future 🔗 c. Google indexes this error message and corresponding solution in case anyone else in the community sees this error and needs the fix! 🔍

nelsonic commented 2 years ago

Re-installing the dependencies in the auth project "fixed" the issue ... 🙄 But obviously I'd prefer a more robust/repeatable solution. 💭

New/next issue to fix coverage dip: https://github.com/dwyl/auth/issues/230