最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

docker compose - Why would PlaywrightPercy be downloading the wrong architecture? - Stack Overflow

programmeradmin0浏览0评论

I am running Playwright via Percy with this config:

export default defineConfig({
  timeout: 20000, // 20 seconds
  use: {
    baseURL,
    browserName: 'chromium',
    channel: 'chromium',
    ignoreHTTPSErrors: true,
  },
  testDir: process.env.TEST_DIR || 'tests/e2e',
  expect: {
    timeout: 20000, // 20 seconds
  },
});

This runs fine locally. I am trying to run it from a Docker container to be used on my machine and then CI (for reasons you would expect). When the container platform was set for linux/amd64, there were very large exceptions ruining the run. I updated the platform to linux/arm64 to match my system, thinking there was some emulation issue.

It reduced the error to this:

[percy] Failure Reason: Percy was not able to launch a browser on your machine to capture snapshots.
[percy] Suggestion: Please resolve the error faced while launching the browser: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory. Try setting PERCY_BROWSER_EXECUTABLE to the correct Chrome browser executable path.

The x86-64 bit makes me think it has downloaded the Intel version still. I can't find a way to change this and docs I've read make it seem like it should download the right one based on my architecture.

My platforms were updated via docker-compose.yaml :

  test:
    container_name: local-test
    platform: linux/arm64

I also updated test.build.platforms to match. The change must have taken effect or I wouldn't be seeing a different error message now.

I’m aware of - but using our own build of Chrome would leave us out of date pretty quick.

Any idea about what I could be missing here?

发布评论

评论列表(0)

  1. 暂无评论