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

EDA analysis import on ClinEpiDB fails when user hasn't clicked "agree" on the disclaimer #794

Open
bobular opened this issue Nov 5, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@bobular
Copy link
Member

bobular commented Nov 5, 2024

E.g. make a new private window and try to import an analysis

https://qa.clinepidb.org/ce.b34/app/workspace/analyses/msRhETv/import

image

After clicking "agree" - reloading the page goes fine.

@bobular bobular added the bug Something isn't working label Nov 5, 2024
@dmfalke
Copy link
Member

dmfalke commented Nov 5, 2024

I don't see how the modal has any impact on this. I think something else must be going on.

@dmfalke
Copy link
Member

dmfalke commented Nov 5, 2024

I believe it's a race condition. There are two responses sending a set-cookie header for the Authorization cookie (project service and import service). So, the import request is made for one user id, and the request for the newly created analysis is made for another user id.

I'm guessing these requests are made in parallel. A possible fix is to make them serial, but I think this can be a challenge. Another option is to add some blocking logic when the Authorization cookie is not yet set.

@dmfalke
Copy link
Member

dmfalke commented Nov 5, 2024

We need to add some more control-flow logic related to bearer tokens to handle expiration, so this can probably fall into that task. I will link the issue to this one (I may need to create it, first).

@dmfalke
Copy link
Member

dmfalke commented Nov 5, 2024

It turns out I misread the network requests. The two responses that set the Authorization cookie are the project endpoint and the count-page-view metrics endpoint.

@dmfalke
Copy link
Member

dmfalke commented Nov 5, 2024

I just made an issue that will prevent this kind of thing from happening: VEuPathDB/web-monorepo#1269.

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

No branches or pull requests

2 participants