Skip to content

Regression: playwright.service.config breaks on Playwright 1.61 (sync loader contract break) #64

Description

@kashish2508

Summary

Our service config sample is broken with the Playwright 1.61 release. Importing our base config into playwright.service.config now throws during module loading, so the sample no longer runs out of the box. This looks like a regression / contract break introduced in 1.61.

Impact

  • The sample's playwright.service.config fails to load → no tests run.
  • Affects customers using our sample as a starting point, since the base-config import pattern is what we ship.

Error

TypeError: context.conditions?.includes is not a function
    at resolve (.../playwright/lib/common/index.js)
    at ... playwright.service.config

Environment

  • @playwright/test: 1.61.0
  • OS: Windows (also reproduces on Linux CI)
  • Node: 22.15–22.18 (see boundary below)

Root cause (observed)

The 1.61 sync loader assumes context.conditions is an Array and calls .includes(...). On some Node versions it is a Set, which has no .includes, so resolving our imported base config throws. This is a behavior/contract change vs. 1.60.

Node context.conditions Result
22.15 / 22.17 / 22.18 Set breaks
22.19 / 22.20 / 26.x Array works

Workarounds

  1. Upgrade Node to >= 22.19 (or Node 24/26).
  2. Pin @playwright/test < 1.61 (e.g. 1.55.0).
  3. Merge the base config inline into playwright.service.config instead of importing it (avoids the failing resolve path)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions