Playwright: [BUG] Doesn't work with mac10.13

Created on 23 Apr 2020  路  11Comments  路  Source: microsoft/playwright

Context:

  • Playwright Version: 0.14.0-next.1587663620223
  • Operating System: Mac 10.13.6 (17G2208)
  • Node: 12.16.2

Code Snippet

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

(async () => {
  const browser = await chromium.launch();
  // ... 
})();

Describe the bug

When running the above simple example, I get this error:

Error: Unsupported platform for webkit: mac10.13
    at Object.assert (/Users/tim/code/example/node_modules/playwright-core/lib/helper.js:288:15)
    at Object.executablePath (/Users/tim/code/example/node_modules/playwright-core/lib/server/browserFetcher.js:130:14)
    at downloadOptionsFromENV (/Users/tim/code/example/node_modules/playwright-core/download-browser.js:45:36)
    at Object.<anonymous> (/Users/tim/code/example/node_modules/playwright/index.js:25:37)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)

As in my understanding, https://github.com/microsoft/playwright/pull/1549 should have fixed this, I guess it's unintended behavior, therefore a bug.

Most helpful comment

@Pezhvak, v1.4.2 was just released with the fix

All 11 comments

1549 fixed macOS 10.13 support for Firefox and Chromium only. We don't have a WebKit build that can run on 10.13 unfortunately :(

Just to clarify, does this mean that we can't use Playwright on mac 10.13 even if not using Webkit?

If you're using Chromium and/or Firefox, macOS 10.13 will work. Are you having any issues with that?

So we have a tool built on top of playwright to run visual regression tests. The tool handles all three browsers but the browsers that are going to be used at runtime for tests can be defined by flags when starting the tool.

People trying to run our tool on 10.13 with only Chrome still get the above error

Ah, this happens due to Playwright early initialization. Should not be hard to fix.

Thanks for looking into it!

Note, that no matter, if I try to launch firefox, webkit or chrome, all of them error with the same error:

Unsupported platform for webkit: mac10.13

So Chromium and Firefox do not work as of now.
Just confirmed it with the latest next build 0.15.0-next.1588118874017.

@timsuchanek can you please check v0.17.0 that we just released? It should've fixed this issue.

Thanks @aslushnikov! I just tried it out - chromium and firefox work now.
webkit errors like this:

UnhandledPromiseRejectionWarning: Error: Browser is not supported on current platform
    at WebKit.executablePath (/Users/tim/code/repros/playwright/node_modules/playwright-core/lib/server/browserType.js:28:19)
    at WebKit._launchServer (/Users/tim/code/repros/playwright/node_modules/playwright-core/lib/server/webkit.js:77:57)
    at async WebKit.launch (/Users/tim/code/repros/playwright/node_modules/playwright-core/lib/server/webkit.js:41:69)

To sum up this:

  • chromium and firefox should work on Mac 10.13
  • we don't support webkit for Mac 10.13 and we don't plan to since Mac 10.13 will be End-of-Life'd soon (end of November 2020)

trying with macos 10.13.6 (17G2208), no matter what i get the error "Browser is not supported on current platform"

const { firefox, devices } = require('playwright');
const iPhone11 = devices['iPhone 11 Pro'];

(async () => {
    const browser = await firefox.launch();
    const context = await browser.newContext({
        ...iPhone11,
        locale: 'en-US',
        geolocation: { longitude: 12.492507, latitude: 41.889938 },
        permissions: ['geolocation']
    });
    const page = await context.newPage();
    await page.goto('https://google.com');
    await browser.close();
})();

@Pezhvak, v1.4.2 was just released with the fix

Was this page helpful?
0 / 5 - 0 ratings