dwyl / auth

πŸšͺ πŸ” UX-focussed Turnkey Authentication Solution for Web Apps/APIs (Documented, Tested & Maintained)

Home Page:https://authdemo.fly.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error `expected a binary but got: nil`

LuchoTurtle opened this issue Β· comments

When setting up the database, if I run mix ecto.setup without ADMIN_EMAIL env set, it will obviously fail.

However, after setting the env variable, if I run mix ecto.setup again, I will run into this error.

** (ArgumentError) construction of binary failed: segment 2 of type 'binary': expected a binary but got: nil

To fix this, we ought to delete the database created and run mix ecto.setup again, as the initial run without the env variable configured will cause this error in subsequent tries.

I suggest adding a piece of documentation to clarify this.

Apparently this didn't entirely fix it. It just allowed me to normally create the database.
But I still get the same error when I try to run the application.

image

@LuchoTurtle thank you for opening this issue. This is valuable feedback. πŸ‘
I intend to iron out all of these setup hurdles in the next version. ⏭️ #207

Could you give me bit more context into how/where you're trying to run the auth App?

looks like localhost, but the context is helpful. Our idea behind building auth
is that devs would only run auth on localhost to develop auth.
are you developing/debugging a particular feature (or bug) in auth?

Clearly we (I) need to update the setup instructions.
I will 100% do that for the next version I'm currently working on. πŸ‘¨β€πŸ’» ⏳

I was (and still am) trying to run it on localhost to initially debug dwyl/phoenix-chat-example#150 (comment)

Yeah, don't waste your time trying to run this version of auth on your localhost it's considered "legacy". πŸ‘΄
Once the re-build #207 is complete I will axsk you to test it extensively on your localhost and on Fly.io πŸ™

Going to significantly streamline running the auth app on localhost in the next iteration, please see: #270 πŸ‘€
and comment to share your thoughts. πŸ’¬ πŸ™

Maybe this should be closed since it will be essentially deprecated after the next auth iteration, as you've mentioned.

Yes, Thanks. πŸ‘Œ