Skip to content

fix: migrate playwright-go to mxschmitt module path after deprecation #2783

Description

@faisalaffan

Problem

github.com/playwright-community/playwright-go is deprecated and has moved to github.com/mxschmitt/playwright-go.

Additionally, Microsoft CDN has removed all Playwright driver binaries for versions 1.47 through 1.60. Running d2 init-playwright fails with:

$ d2 init-playwright
D2 needs to install Chromium v130.0.6723.19 to render non-SVG images. Continue? (y/N): y
err: failed to install Playwright: could not install driver: could not install driver:
error: got non 200 status code: 404 (404 Not Found) from
https://playwright.azureedge.net/builds/driver/playwright-1.52.0-mac-arm64.zip
error: got non 200 status code: 404 (404 Not Found) from
https://playwright-akamai.azureedge.net/builds/driver/playwright-1.52.0-mac-arm64.zip
error: got non 200 status code: 404 (404 Not Found) from
https://playwright-verizon.azureedge.net/builds/driver/playwright-1.52.0-mac-arm64.zip

Same result for drivers 1.47, 1.57, and 1.60 — all removed from CDN.

Root Cause

D2's go.mod pinned playwright-community/playwright-go v0.5200.0 which bundles driver 1.52.0. The playwright-community org is deprecated; the project now lives at mxschmitt/playwright-go. Older driver binaries have been purged from Microsoft's CDN mirrors (Azure, Akamai, Verizon).

Fix

Files Changed

┌──────────────────┬───────────────────────────────────────┐
│       File       │                Change                 │
├──────────────────┼───────────────────────────────────────┤
│ go.mod           │ Replace dependency + transitive bumps │
├──────────────────┼───────────────────────────────────────┤
│ go.sum           │ Updated checksums                     │
├──────────────────┼───────────────────────────────────────┤
│ d2cli/main.go    │ Import path                           │
├──────────────────┼───────────────────────────────────────┤
│ lib/png/png.go   │ Import path                           │
├──────────────────┼───────────────────────────────────────┤
│ lib/xgif/xgif.go │ Import path                           │
└──────────────────┴───────────────────────────────────────┘

Test Plan

  • d2 init-playwright installs Chromium successfully
  • d2 input.d2 output.png renders PNG
  • d2 input.d2 output.gif renders animated GIF

Related

Closes #2776

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions