Bug description

In the default auth_driver, there's a page load to /login to set user cookie

With the default page.goto, playwright failed with "An error occurred: Page.goto: Timeout 30000ms exceeded" I tried a test script with page.goto(""http://superset:8088"", wait_until='load' , timeout=60000) and it failed the same way

Changing wait_until to "networkidle" doesn't help. The only thing work is "domcontentloaded"

So I overwrite the auth_driver with page.goto(headless_url("/login"), wait_until="domcontentloaded") and everything work like it should.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: rusackas

@dosu any ideas here?

I suppose you could increase SCREENSHOT_PLAYWRIGHT_DEFAULT_TIMEOUT and see if that helps.

Comment From: dosubot[bot]

This is a known pain point with Playwright and SPA-style pages like Superset’s /login. The default wait_until='load' (or 'networkidle') can hang if there are lingering network requests or resources that never fully finish, which is common with modern frontend apps. That’s why 'domcontentloaded' works—it fires as soon as the initial HTML is parsed, regardless of outstanding resources or network activity.

Increasing SCREENSHOT_PLAYWRIGHT_DEFAULT_TIMEOUT will only delay the error if the event never fires; it won’t fix the root cause if the page never reaches the 'load' or 'networkidle' state due to unresolved requests or frontend behavior. The best approach is to override the wait event to 'domcontentloaded' for problematic pages. You can do this globally by setting SCREENSHOT_PLAYWRIGHT_WAIT_EVENT = "domcontentloaded" in your config, or by customizing the auth driver as you did. This is the intended way to handle these cases in Superset’s Playwright integration, which is designed to be flexible and config-driven, but doesn’t auto-detect/fallback for you cite cite.

There’s no evidence of a recent frontend change that would have introduced this, and there’s no official recommendation in the codebase for which wait_until to use—it’s left to the deployer to pick what works best for their environment. Your workaround is the right move here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

Comment From: ntcong

I didn't know about SCREENSHOT_PLAYWRIGHT_WAIT_EVENT. That seems like a better way without having to override the auth driver.

I just thought of posting the issue so people can search for the error and know about the fix.

Thank you

Comment From: rusackas

I think the bot is right here. Just opened up a PR to close this out.