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

When user tries to log in to workspace after token expiration, multiple errors appear #6731

Open
BOHEUS opened this issue Aug 24, 2024 · 11 comments
Labels
good first issue Good for newcomers prio: high scope: front Issues that are affecting the frontend side only size: short

Comments

@BOHEUS
Copy link
Contributor

BOHEUS commented Aug 24, 2024

I'm not sure if scenario is reproducible as I didn't try to repeat it but here's what I did:

  1. Log in
  2. In Settings > Developers generate new key (save it for later)
  3. In Settings > Developers add webhook URL
  4. Using Twenty docs, create simple bash script for creating 1 million companies effectively spamming REST API (or use attached script but change file format to .sh and replace key) and run it for few minutes till 1000 companies are created
  5. Wait for token expiration (~30 min)
  6. Try to log in

Actual: When user tries to log in to workspace with more than 1000 companies after token expiration, multiple errors appear
Screencast from 2024-08-24 17-41-14.webm

Expected: When user tries to log in to workspace with more than 1000 companies after token expiration, user should be able to log in without any problems

Note: While on video there's clearly visible that Companies are deactivated, I don't think they're a necessary step to reproduce bug.

Script: 1companies.txt

@Bonapara
Copy link
Member

@BOHEUS Can you reproduce it to help determine the root cause of this issue? Otherwise, I think I'll close it and keep the bug in mind since it's not really actionable. Thanks for pushing Twenty!

@BOHEUS
Copy link
Contributor Author

BOHEUS commented Aug 28, 2024

Sure, I'll report back when token will expire

@BOHEUS
Copy link
Contributor Author

BOHEUS commented Aug 28, 2024

I was able to reproduce it on newest version of repo (mistakenly also reported it in #6732), I can't really pinpoint it in the code but it's definitely something with Apollo and useManyFindRecords like shown in the video

@charlesBochet
Copy link
Member

@BOHEUS I can reproduce, I'm working on the sign-in / token expirations issues, will ping you back!

@charlesBochet
Copy link
Member

I have made the fix but haven't tried this case yet. Any chance you could retry on the 0.24?

@BOHEUS
Copy link
Contributor Author

BOHEUS commented Sep 1, 2024

@charlesBochet I'll check once I have some time

@BOHEUS
Copy link
Contributor Author

BOHEUS commented Sep 1, 2024

@charlesBochet I can still reproduce it on 0.24

@FelixMalfait FelixMalfait changed the title When user tries to log in to workspace with more than 1000 companies after token expiration, multiple errors appear When user tries to log in to workspace after token expiration, multiple errors appear Sep 3, 2024
@FelixMalfait FelixMalfait added scope: front Issues that are affecting the frontend side only size: short prio: high labels Sep 12, 2024
@charlesBochet charlesBochet added the good first issue Good for newcomers label Sep 14, 2024
@charlesBochet
Copy link
Member

Ok so it's still there! Let's see if someone from the community can fix it. If not, we will take it under 0.31 release

@charlesBochet charlesBochet moved this from 🆕 New to 🔖 Planned in Product development ✅ Sep 16, 2024
@FelixMalfait
Copy link
Member

@ad-elias will look into this

@FelixMalfait
Copy link
Member

Screenshot 2024-11-15 at 17 42 01

Seems like the table below is trying to fetch companies (the mocked table or real table?)

@FelixMalfait
Copy link
Member

FelixMalfait commented Nov 15, 2024

Maybe look around here? Is currentWorkspaceMember null? What happens onError?
Screenshot 2024-11-15 at 17 45 35

See skip: xxx

Could also be linked to fetchMoreRecords?

Skip applying to the first query but not to fetchMore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers prio: high scope: front Issues that are affecting the frontend side only size: short
Projects
Status: 🔖 Planned
Development

No branches or pull requests

5 participants