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

BLOCKER: Internal Server Error when Registering with Email Address! #264

Open
nelsonic opened this issue Jan 25, 2023 · 5 comments
Open
Labels
BLOCKED :fire: Core team's HIGHEST priority, blocking critical work bug Suspected or confirmed bug (defect) in the code chore a tedious but necessary task often paying technical debt help wanted If you can help make progress with this issue, please comment! T1d Time Estimate 1 Day tech-debt A feature/requirement implemented in a sub-optimal way & must be re-written technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

Just tried to use my email address to register: https://auth.dwyl.com/auth/loginregister and got:
image

Need to investigate this as our highest priority.
Related to: dwyl/mvp#281

@nelsonic nelsonic added bug Suspected or confirmed bug (defect) in the code help wanted If you can help make progress with this issue, please comment! chore a tedious but necessary task often paying technical debt T1d Time Estimate 1 Day technical A technical issue that requires understanding of the code, infrastructure or dependencies BLOCKED :fire: Core team's HIGHEST priority, blocking critical work tech-debt A feature/requirement implemented in a sub-optimal way & must be re-written labels Jan 25, 2023
@SimonLab
Copy link
Member

@nelsonic would it be possible to have access to the Fly auth app?
I can have a look at the logs

@nelsonic
Copy link
Member Author

nelsonic commented Jan 25, 2023

Invite sent. ✅

GOTO: https://fly.io/apps/authprod 🙏

@SimonLab
Copy link
Member

image

out of memory.?

I'll try to have a look at what can cause this issue.
I still think we need to simplify the auth app (see #240) especially if it's going to be used with Flutter.

@SimonLab
Copy link
Member

This issue might be linked to the email application not being available anymore, https://dwylmail.herokuapp.com/

So all the code to send emails won't work:

auth/lib/auth/email.ex

Lines 24 to 40 in f34305c

def sendemail(params) do
url = System.get_env("EMAIL_APP_URL") <> "/api/send"
# until further notice use the SECRET_KEY_BASE for sending email:
secret = System.get_env("SECRET_KEY_BASE")
jwt = AuthPlug.Token.generate_jwt!(params, secret)
headers = [Authorization: "#{jwt}"]
options = [
ssl: [{:versions, [:"tlsv1.2"]}],
# github.com/dwyl/auth/issues/48
timeout: 50_000,
recv_timeout: 50_000
]
{:ok, response} = HTTPoison.post(url, "_nobody", headers, options)
Jason.decode!(response.body)
end

@nelsonic
Copy link
Member Author

@SimonLab thanks for investigating. 🔍
The memory issue is lame. 😕
Wonder if it's an OTP garbage collection issue. 🤷‍♂️
Indeed not having the email (heroku) server working is probably the reason it's failing. 🤦‍♂️

100% agree on simplifying auth. It's constantly in the back of my mind. 💭
Along with a million other things ... 🙄
The only thing keeping me from just diving straight in to rewriting auth in Phoenix v1.7
is the fact that I really don't like the Ecto syntax.
It feels so cumbersome when compared to SurrealDB dwyl/technology-stack#104
I hate having to specify the schema in multiple places it feels "dirty".
I know that if I just embraced Ecto I could get over the hurdles.

Ultimately we need to ship. :shipit: 💭
And to do that, I need to go sleep. 🛌
BRB. ⏳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKED :fire: Core team's HIGHEST priority, blocking critical work bug Suspected or confirmed bug (defect) in the code chore a tedious but necessary task often paying technical debt help wanted If you can help make progress with this issue, please comment! T1d Time Estimate 1 Day tech-debt A feature/requirement implemented in a sub-optimal way & must be re-written technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

2 participants