Skip to content

There might be a lag in between auth and contribute resulting in an error #220

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

Open
ctrlc03 opened this issue Oct 27, 2023 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@ctrlc03
Copy link
Collaborator

ctrlc03 commented Oct 27, 2023

After authenticating for the first time, the backend creates a user document. There might be a small lag in between the two, and if a user runs the contribute command before the document is created, then the cli might throw an error.

@sripwoud
Copy link
Member

I'll have a closer look next week.
My guess is it is happening here
https://github.com/privacy-scaling-explorations/p0tion/blob/8bb948959ddf324fa7c1633b567ffa9750afc91f/packages/phase2cli/src/commands/contribute.ts#L951C38-L951C38

My current fix idea is:
wrap it in a try/catch
on caught FirebaseError, sleep and retry

@glamperd
Copy link
Contributor

Fixed in #226

@ctrlc03
Copy link
Collaborator Author

ctrlc03 commented Jul 31, 2024

Fixed in #226

seems like that PR was closed and never merged in?

@glamperd
Copy link
Contributor

glamperd commented Aug 1, 2024

I'll reopen and revisit this when I get a chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants