Skip to content

Commit a630555

Browse files
authored
test-browser: work around weird webkit behaviour (#8802)
1 parent 26e3396 commit a630555

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bin/test-browser.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ async function startTest() {
161161
const page = await browser.newPage();
162162

163163
page.on('pageerror', err => {
164+
if (browserName === 'webkit' && err.toString()
165+
.match(/^Fetch API cannot load http.* due to access control checks.$/)) {
166+
// This is an _uncatchable_, error seen in playwright v1.36.1 webkit. If
167+
// it is ignored, fetch() will also throw a _catchable_:
168+
// `TypeError: Load failed`
169+
console.log('Ignoring error:', err);
170+
return;
171+
}
172+
164173
console.log('Unhandled error in test page:', err);
165174
process.exit(1);
166175
});

0 commit comments

Comments
 (0)