Skip to content

Commit 349b1ee

Browse files
committed
playwright workaround
1 parent 34203d6 commit 349b1ee

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/config/extensions/playwright.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,32 @@ The extension sets the following environment variables during the build:
9191
- `PLAYWRIGHT_SKIP_BROWSER_VALIDATION`: Set to `1` to skip browser validation at runtime
9292
- `DISPLAY`: Set to `:99` if `headless: false` (for Xvfb)
9393

94+
## Troubleshooting
95+
96+
### Browser download failures
97+
98+
If you encounter errors during the build process related to browser downloads (e.g., "failed to solve: process did not complete successfully: exit code: 9"), this is a known issue with certain Playwright versions.
99+
100+
**Workaround:** Revert Playwright to version `1.40.0` in your project dependencies. You can specify this version explicitly in your config:
101+
102+
```ts
103+
import { defineConfig } from "@trigger.dev/sdk";
104+
import { playwright } from "@trigger.dev/build/extensions/playwright";
105+
106+
export default defineConfig({
107+
project: "<project ref>",
108+
build: {
109+
extensions: [
110+
playwright({
111+
version: "1.40.0",
112+
}),
113+
],
114+
},
115+
});
116+
```
117+
118+
For more details, see [GitHub issue #2440](https://github.com/triggerdotdev/trigger.dev/issues/2440#issuecomment-3815104376).
119+
94120
## Managing browser instances
95121

96122
To prevent issues with waits and resumes, you can use middleware and locals to manage the browser instance. This will ensure the browser is available for the whole run, and is properly cleaned up on waits, resumes, and after the run completes.

0 commit comments

Comments
 (0)