* Puppeteer: Bug fix * Disable MacOS until a proper solution in #25386
@@ -58,8 +58,8 @@ jobs:
strategy:
fail-fast: false
matrix:
+ os: [ windows-latest, ubuntu-latest ]
CI: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
- os: [ windows-latest, ubuntu-latest, macos-latest ]
env:
CI: ${{ matrix.CI }}
FORCE_COLOR: 1
@@ -248,7 +248,15 @@ async function preparePage( page, injection, build, errorMessages ) {
}
- let text = ( await Promise.all( msg.args().map( arg => arg.executionContext().evaluate( arg => arg instanceof Error ? arg.message : arg, arg ) ) ) ).join( ' ' ); // https://github.com/puppeteer/puppeteer/issues/3397#issuecomment-434970058
+ const args = await Promise.all( msg.args().map( async arg => {
+ try {
+ return await arg.executionContext().evaluate( arg => arg instanceof Error ? arg.message : arg, arg );
+ } catch (e) { // Execution context might have been already destroyed
+ return arg;
+ }
+ } ) );
+
+ let text = args.join( ' ' ); // https://github.com/puppeteer/puppeteer/issues/3397#issuecomment-434970058
text = text.trim();
if ( text === '' ) return;