-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Whitescreen when user not found #7244
Comments
can i work on this issue? |
Sure @himanshuraimau thanks! Note: I'm not sure the hint I gave is the right one |
no problem i will try to figure it out. |
@himanshuraimau Mmh no I think that's something different linked to the fact that your database schema changed (no artist object) |
/oss.gg 150 |
Thanks for opening an issue! It's live on oss.gg! |
/assign |
Assigned to @Anujv93! Please open a draft PR linking this issue within 48h |
This issue is already assigned to another person. Please find more issues here. |
/assign |
This issue is already assigned to another person. Please find more issues here. |
/assign |
This issue is already assigned to another person. Please find more issues here. |
/assign |
This issue is already assigned to another person. Please find more issues here. |
/assign |
This issue is already assigned to another person. Please find more issues here. |
Removing you @Anujv93 as it's been two weeks, thanks for contributing! |
/assign |
Assigned to @krVatsal! Please open a draft PR linking this issue within 48h |
@FelixMalfait Can you help me to replicate the issue such that i can fix it more efficiently |
@krVatsal, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically. |
/assign |
This issue is already assigned to another person. Please find more issues here. |
I just tried to reproduce this locally and I wonder if it's still happening. Here's what I did:
I get a {
"errors": [
{
"message": "Token has expired.",
"extensions": {
"code": "UNAUTHENTICATED"
}
}
]
} {
"errors": [
{
"message": "Token invalid.",
"extensions": {
"code": "UNAUTHENTICATED"
}
}
],
"data": null
} I'm then redirected to the login page, as expected too. I'm currently logged in on the real |
ensure frontend recognize the "unauthenticated" errors from the expire token and trigger a refresh request. |
@Anuragyadav622003 I'm not sure I understand your point... I'm saying that as far as I'm concerned everything seems to work as expected. I will double check tomorrow on the demo environment if I can reproduce the issue, once the cron task to reseed the |
@nicolasrouanne I suspect it's this: ![]() ![]() When we validate the token we throw a |
@FelixMalfait I still couldn't reproduce either in Anyway, I believe it may happen and you maybe are able to reproduce it on your side, so I'm still going to try to fix it. 🤞🏻 Thanks for the pointers it really helped me out, and I think you were right in your analysis. I try to sum it up here:
So I suggest rather, when a user is not found in Lines 26 to 28 in 898006f
By the way, that's what's done in Warning This will change the HTTP response code for the REST API though... It will go from 400 to 404. Which is actually a breaking change. twenty/packages/twenty-server/src/engine/core-modules/auth/filters/auth-rest-api-exception.filter.ts Lines 20 to 24 in 898006f
|
Agree with your analysis @nicolasrouanne thanks a lot! |
Arf I completely forgot UUIDs are hardcoded that's why! Thanks! Is changing the HTTP code for the REST API not an issue? Do you want that I open a PR? |
@nicolasrouanne yes changing that part of the REST API isn't a big deal, I don't even think the token endpoints should be available in REST as we only use GraphQL internally and this is not something workspace users should care about |
I managed to reproduce, following your hint @FelixMalfait . It was indeed because I was using the Here is how to reproduce in dev environment
If you inspect the browser console requests, you can see that the [
{
"message": "User not found",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
] |
I was going back to demo.twenty.com and since the database was reset it threw a "user not found" error. But this error wasn't properly interpreted by the frontend and I just had a full blank page. Instead I should have been logged out and sent to the login page (we should already have this mechanism for token expiration).
Maybe check if it's a proper AuthException being thrown in every case?
This probably happens to everyone who visits the demo website and comes back the following day.
The text was updated successfully, but these errors were encountered: