playwright: waiting until load fails although URL is accessible (from github actions)

I’m getting:

page.goto: Timeout 30000ms exceeded.
=========================== logs ===========================
navigating to "https://xxx.vercel.app/sign-in", waiting until "load"
============================================================

This is caused by random .goto in app, eg. by code in global-setup:


async function globalSetup(config: FullConfig) {
  const projectConfig = config.projects[0].use
  baseUrl = projectConfig.baseURL

  const browser = await chromium.launch({
    headless: projectConfig.headless,
    channel: projectConfig.channel,
  })

  const context = await browser.newContext({ viewport: projectConfig.viewport })
  const page = await context.newPage()

   await page.goto(`${baseUrl}/sign-in`)
}

Funny part is that if I’m entering Vercel url right after deployment starts manually it works. Somehow it’s not accessible from github actions?

Edit: I got another error like that from within tests, once Vercel was reached by global setup. So this proves that it’s not Vercel problem. It’s not github actions network problem. It’s seems random problem of test runner then?

Edit2: Another important thing - I’m not able to reproduce on local env. It’s happening only in github actions.

Edit3: I’ve used DEBUG=pw:api,pw:browser and this is part of logs showing successful load and right after failed load:

2022-02-28T10:36:55.021Z pw:api navigating to "https://xxx.vercel.app/", waiting until "load"
2022-02-28T10:36:55.033Z pw:api   "commit" event fired
2022-02-28T10:36:55.033Z pw:api   navigated to "https://xxx.vercel.app/"
2022-02-28T10:36:55.087Z pw:api   "load" event fired
2022-02-28T10:36:55.087Z pw:api   "domcontentloaded" event fired
2022-02-28T10:36:55.092Z pw:api navigating to "https://accounts.google.com/", waiting until "load"
2022-02-28T10:36:55.127Z pw:api   "commit" event fired
2022-02-28T10:36:55.127Z pw:api   navigated to "https://accounts.google.com/"
2022-02-28T10:36:55.132Z pw:api   "load" event fired
2022-02-28T10:36:55.132Z pw:api   "domcontentloaded" event fired
2022-02-28T10:36:55.139Z pw:api <= browserContext.storageState succeeded
2022-02-28T10:36:55.140Z pw:api => page.close started
2022-02-28T10:36:55.148Z pw:api <= page.close succeeded
2022-02-28T10:36:55.149Z pw:api => browser.newContext started
2022-02-28T10:36:55.159Z pw:api <= browser.newContext succeeded
2022-02-28T10:36:55.159Z pw:api => browserContext.newPage started
2022-02-28T10:36:55.191Z pw:api <= browserContext.newPage succeeded
2022-02-28T10:36:55.192Z pw:api => tracing.start started
2022-02-28T10:36:55.203Z pw:api <= tracing.start succeeded
2022-02-28T10:36:55.204Z pw:api => page.goto started
2022-02-28T10:36:55.206Z pw:api navigating to "https://xxx.vercel.app/sign-in", waiting until "load"
2022-02-28T10:37:25.208Z pw:api <= page.goto failed

It seems to be connected with starting a new context?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

Running tests locally works perfectly fine. On GitHub actions, Vercel pages sometimes never load (60 seconds navigation timeout)

Screenshot 2022-04-12 at 3 52 08 PM

Happens randomly (and quite often) across all browsers

Facing a similar issue on GitHub actions with Vercel preview links

Experiencing similar problems, only when running tests on GHA.