1

I'm trying to run a webpage that calls a .wasm file in playwright webkit

const { webkit } = require('playwright');

(async () => {
    const browser = await webkit.launch();
    const page = await browser.newPage();
    page.on("pageerror", err => {
        console.error(err.message)
    })
    await page.goto('https://wasmbyexample.dev/examples/hello-world/demo/rust/');
})();

However, I get the following page-error:

Unhandled Promise Rejection: ReferenceError: Can't find variable: WebAssembly

Seems that the WebAssembly object within the browser is not even initialized.

Any idea why this is happening?

If it matters, I'm on windows.

Mendy
  • 7,612
  • 5
  • 28
  • 42
  • Quick answer. It seems that they know about this issue https://github.com/microsoft/playwright/blob/54f07f9bd6ede736570e168976f1eee6bf8c9e2d/test/capabilities.spec.js#L20 – hardkoded Jun 10 '20 at 20:16
  • 1
    Playwright WebKit on Windows does not support WebAssembly at this stage. Can you use WSL or Docker to run a Linux build of WebKit? – arjunattam Jun 13 '20 at 01:04

0 Answers0