dwyl / auth

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

Error `expected a binary but got: nil` #266

Closed LuchoTurtle closed 1 year ago

LuchoTurtle commented 1 year ago

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.

LuchoTurtle commented 1 year ago

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
nelsonic commented 1 year ago

@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. 👨‍💻 ⏳

LuchoTurtle commented 1 year ago

I was (and still am) trying to run it on localhost to initially debug https://github.com/dwyl/phoenix-chat-example/issues/150#event-8429216080

nelsonic commented 1 year ago

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 🙏

nelsonic commented 1 year ago

Going to significantly streamline running the auth app on localhost in the next iteration, please see: #270 👀 and comment to share your thoughts. 💬 🙏

LuchoTurtle commented 1 year ago

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

nelsonic commented 1 year ago

Yes, Thanks. 👌