What's the best way to debug why a user can't log in after getting the SMS code with passwordless? (...
w
What's the best way to debug why a user can't log in after getting the SMS code with passwordless? (Once they enter the code, it says "Error" even though they are a user)
r
hey @wrnbrd can you share the full stack trace?
w
@rp_st where can I find that?
r
on your backend logs.
w
not sure I have that enabled. Sorry I am a bit slow today as coming back from illness 🙈
this is in production, is a support ticket from a customer. We are running supertokens passwordless with twilio on Netlify / node
r
"it says "Error" even though they are a user" -> where does it say error?
w
It's when they enter the code to sign in
r
where is it shown though?
on the UI, the console, the backend?
w
On the UI, I don't have a screenshot but it would be above the form
r
hmm
I would need some logs from the backend from your end
otherwise it's hard to say whats going on
it's too little info
w
Is this something I would need to enable or could I find it in netlify somewhere
r
netlify logs
im not sure how you are doing error handling on your backend
but if the API returned a 500 error, the error log should be there if you log it out in an error handler
w
@rp_st are you able to point me to a guide for setting up debug / logs?
https://supertokens.com/docs/thirdparty/troubleshooting/how-to-troubleshoot Is this what I'm looking for - but if the issue is when a user enters code and it says "We're sorry, something went wrong" - is that a backend log or front end log? Or both?
r
Backend log
w
@rp_st sorry just getting back to looking at this. Can't work how to get logs happening, currently just trying to get it to work in dev mode with Astro + Netlify.
don't worrk think I have it figured out!
@rp_st Here are the logs - this is happening when a user tries to consume a code. Looks like error is the refresh token is undefined?
r
uhmm. I don't think thats the issue. Since you are saying the user can't login at all.. what are the sign in response headers?
w
@rp_st I was able to log in on behalf of the user from my web browser. I will try find logs for the response headers. I just can't replicate it myself at the moment so hard to debug
r
hmm. Without more info, it will be difficult to help
w
Here is more of the logs: https://gist.github.com/wrainbird/5b5faed028130ca4d6f8c3e278735d71 Does anything in here help?
r
it just seems like their frontend cookie is not being able to store any info for some reason
not sure
w
this has happened a couple of times, but rarely. We have over 4000 accounts and I think we've had an issue of the code not working 2-3 times. Each time I have been able to sign in on a desktop browser. Most of these users would be on mobile devices. Perhaps I can try and replicate the issue in Lambdatest with my own account.
r
yea, unless you can replicate it, im not sure i can help too much for free. Sorry'
w
if I can manage to replicate it what are your options for paid support? Happy to do that if it's a possibility
r
if you can replicate it, we can help for free depending on the time we have! For paid support though, it's usually a yearly contract. I can DM you the pricing
w
I will reach out to the user who is encountering the issue and try find more details about their phone / browser version. Still am not able to replicate it myself just using my own login and testing on different phone browsers. Everything works fine. I am wondering if they have some sort of ad blocker or something perhaps?
r
Unlinkely. We have not heard from other users about this issue. Most likely a browser setting on the user.. but not quite sure.
w
yeah I was thinking that too, I have tried to disable all cookies but you don't even get to the login screen to begin with
r
hmm. Maybe you have a session recording for those users and can see what is happening. Or ask them for a call.
w
@rp_st This is our supertokens config: https://gist.github.com/wrainbird/de9208339d5ac3e6f673325da4398479 Do you think that something in this could be causing it?
r
Unliely. I think it's mostly some brwoser setting
w
no worries, thanks for your help as always
3 Views