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

Error expected a binary but got: nil #266

Closed
LuchoTurtle opened this issue Feb 2, 2023 · 7 comments · May be fixed by #267
Closed

Error expected a binary but got: nil #266

LuchoTurtle opened this issue Feb 2, 2023 · 7 comments · May be fixed by #267
Assignees
Labels
bug Suspected or confirmed bug (defect) in the code chore a tedious but necessary task often paying technical debt documentation Improvements or additions to documentation

Comments

@LuchoTurtle
Copy link
Member

LuchoTurtle commented Feb 2, 2023

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 LuchoTurtle added bug Suspected or confirmed bug (defect) in the code chore a tedious but necessary task often paying technical debt documentation Improvements or additions to documentation labels Feb 2, 2023
@LuchoTurtle LuchoTurtle self-assigned this Feb 2, 2023
@LuchoTurtle
Copy link
Member Author

LuchoTurtle commented Feb 2, 2023

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

nelsonic commented Feb 3, 2023

@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
Copy link
Member Author

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

@nelsonic
Copy link
Member

nelsonic commented Feb 3, 2023

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

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

@LuchoTurtle
Copy link
Member Author

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

@nelsonic
Copy link
Member

nelsonic commented Apr 9, 2023

Yes, Thanks. 👌

@nelsonic nelsonic closed this as completed Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Suspected or confirmed bug (defect) in the code chore a tedious but necessary task often paying technical debt documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants