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

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
mehulmptcommented, Apr 12, 2022

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

1reaction
mehulmptcommented, Apr 12, 2022

Facing a similar issue on GitHub actions with Vercel preview links

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Actions step is hanging until timeout · Issue #1326
Describe the bug At some point, a GitHub Actions step stops producing output and hangs until the workflow is terminated by timeout.
Read more >
Tests timeout in GitHub Action but work locally #13800
I changed webserver.command to build the library then run the dev server for the test environment and everything works as expected locally and ......
Read more >
Github Action Workflow fails because of env ...
Upon pushing my project to Github with a set of github action workflows, the actions work well until reaching the job step of...
Read more >
GitHub Actions keep failing, .NET 6 related? · Issue #423
The build using GitHub Actions fails while doing the build-windows part. It might be .NET 6 related but I am not really sure...
Read more >
[BUG]Wait for navigation with url and wait until network idle fail ...
As waiting for navigation times out all the time. I have used a try-catch and print the URL. The URL is the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found