-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Fix flaky auth test with console error "Failed to fetch" #3287
Conversation
@@ -69,7 +69,7 @@ | |||
"format-util": "1.0.5", | |||
"globby": "14.0.1", | |||
"jsdom": "24.0.0", | |||
"lerna": "8.1.2", | |||
"lerna": "7.4.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using lerna 7 until this gets fixed: lerna/lerna#3964
2ee7775
to
8f6370c
Compare
2fb4285
to
8e2da66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah that makes sense, great catch. suggestion: consider waiting for something in the page content if that works as well. It'd be a more user facing signal.
I tried as Playwright also doesn't recommend using this method, but the other options didn't work. Edit: Ok looks like waiting for a page element also works, that way we don't use anything that Playwright discourages. |
Caused by a CSRF token request for auth that fails with "Failed to fetch", only happens in headless mode, probably because the requests there happen fast and previous pending auth requests end up making this one fail.
Waiting for network requests to complete seems to fix the issue.
In a real application this will probably never happen and even if it does it's just a console error.