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

SMTP issue - nothing in the console? How to debug further? #1574

Open
shuther opened this issue Jul 30, 2024 · 4 comments
Open

SMTP issue - nothing in the console? How to debug further? #1574

shuther opened this issue Jul 30, 2024 · 4 comments

Comments

@shuther
Copy link

shuther commented Jul 30, 2024

I setup .env with fake SMTP settings from mailtrap. If I try to sign-in using an email such as [email protected], I am getting the error message:
Something went wrong while sending the email. Please try again later.
However, there is nothing in the console to investigate further.

Is there a parameter I could use to get more logs about the issue? That would help a lot.

@deepakprabhakara
Copy link
Member

Please add logs to this function here to figure out what might be going on - https://github.com/boxyhq/saas-starter-kit/blob/main/lib/email/sendEmail.ts#L22. We'll push a change to include more details in the logs.

@niwsa
Copy link
Member

niwsa commented Jul 31, 2024

@shuther You need to signup first before logging in via magic link.

@shuther
Copy link
Author

shuther commented Aug 2, 2024

While debugging the issue, I discovered another "problem"; maybe I am missing an env to get proper debug statements? I am using for now: npm run dev
When I signed up for another account, I received on the browser side an error message (expected because I was playing with the DB):
Invalid prisma.user.findUnique()invocation: The columnUser.password does not exist in the current database.
However, there is nothing on the server console. Is it expected? I am not sure how I should be informed of such issue in production?

@shuther
Copy link
Author

shuther commented Aug 2, 2024

If we go back to the SMTP issue above (I reverted the changes in the DB), the email is sent (no sure what changed), however I am still stuck in this process when I click on the link:
On Safari in the console I have:

On Chrome I have:

And I still have nothing in the server console; I just see a bunch of:

@opentelemetry/instrumentation-http http instrumentation incomingRequest
Recording is off, propagating context in a non-recording span
@opentelemetry/instrumentation-http http instrumentation incomingRequest
Recording is off, propagating context in a non-recording span
Recording is off, propagating context in a non-recording span
Recording is off, propagating context in a non-recording span
Recording is off, propagating context in a non-recording span
Recording is off, propagating context in a non-recording span
Recording is off, propagating context in a non-recording span
Recording is off, propagating context in a non-recording span
 GET /_next/data/development/en/auth/join.json 200 in 30ms
@opentelemetry/instrumentation-http http instrumentation incomingRequest
Recording is off, propagating context in a non-recording span
items to be sent [
  {
    resource: Resource {
      _attributes: [Object],
      asyncAttributesPending: false,
      _syncAttributes: [Object],
      _asyncAttributesPromise: undefined
    },
    scopeMetrics: []
  }
]
items to be sent [
  {
    resource: Resource {
      _attributes: [Object],
      asyncAttributesPending: false,
      _syncAttributes: [Object],
      _asyncAttributesPromise: undefined
    },
    scopeMetrics: []
  }
]

thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants