playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[BUG] Site doesn't load on Windows webkit due to audio context error

Open Nav-2d opened this issue 2 years ago • 2 comments

Context:

  • Playwright Version:1.21.1
  • Operating System: Windows
  • Node.js version: 14
  • Browser: WebKit
  • Extra: [any specific details about your environment]

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:

test('example test', async ({ page }) => {
  await page.goto("https://monarch-test.tinyeye.com"); 
  await.page.pause();
});

// config.js
{
  name: 'Desktop Safari',
  use: { browserName: 'webkit' },
},

Describe the bug This issue is related to https://github.com/microsoft/playwright/issues/12823 and https://github.com/microsoft/playwright/issues/13113

The site still doesn't load on Windows (webkit). The error in the console is attached image

Tentative solution for now that works:

await page.addInitScript(() => {
    class AudioContext {}
    (window as any).AudioContext = AudioContext;
})

Nav-2d avatar May 11 '22 16:05 Nav-2d

We could enable WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO PUBLIC ON) on Windows, that should fix it.

Update: Seems like ENABLE_WEB_AUDIO is not supported on Windows.

mxschmitt avatar Aug 21 '22 21:08 mxschmitt

I also just ran into this. Unfortunately, my project's stub for WebAudio is prohibitively complex, needing most functions in AudioContext and GainNode. It would be nice to support this general browser feature, at least in a formal stub.

zepumph avatar May 10 '23 23:05 zepumph

Why was this issue closed?

Thank you for your contribution to our project. This issue has been closed due to its limited upvotes and recent activity, and insufficient feedback for us to effectively act upon. Our priority is to focus on bugs that reflect higher user engagement and have actionable feedback, to ensure our bug database stays manageable.

Should you feel this closure was in error, please create a new issue and reference this one. We're open to revisiting it given increased support or additional clarity. Your understanding and cooperation are greatly appreciated.

pavelfeldman avatar Nov 17 '23 00:11 pavelfeldman