[SOLVED] Upgrade to Meteor 3.0, failing tests in chromium

I have a few hundred client tests (--full-app and non---full-app) that all run without problem via meteortesting:browser-tests@1.7.0 in Meteor 2.16, both on two different chromium instances:

  • Chromium 137.0.7151.68 (local dev)
  • Chromium 112.0.5614.0 (CI, installed by puppeteer@19.11.1)

When switching to Meteor 3.0, some of them fail, but only on Chromium 112.0.5614.0. At first I thought it was timing issues (async?), but I am now able to reproduce exactly the same failures locally by running that exact same chromium version.

I am going to investigate further, to see what the root cause is for those failures. But maybe someone already knows what could be going on here (@storyteller @jkuester)? Is it because Meteor 3.0 has dropped compatibility with old browsers?

I have two paths to solve the issue without code changes: either force meteortesting:browser-tests to use a more recent version of puppeteer that would embed a more recent chromium, or force puppeteer to run a more recent chromium in CI directly (@puppeteer/browsers?).

1 Like

Without looking at the details of the failing tests themselves, here are some intermediate results. Solution is to either use a more recent version of Chrome/Chromium (either puppeteer@22.15.0 or Chrome/127.0.6533.88) or use the old headless mode (headless: true).

puppeteer <version> headless <mode> <browser version> Failures <client>/<client `--full-app`>
puppeteer 19.11.1 headless new Chromium 112.0.5614.0 Failures all/all
puppeteer 19.11.1 headless true Chromium 112.0.5614.0 Failures 0/0
puppeteer 19.11.1 headless new Chromium 137.0.7151.68 Failures 0/0

puppeteer 20.9.0 headless new Google Chrome for Testing 115.0.5790.98 Failures crashes at first/all

W20250614-21:09:48.196(2)? (STDERR) ./node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:138
W20250614-21:09:48.196(2)? (STDERR)             this._reject(callback, new Errors_js_1.TargetCloseError('Target closed'));
W20250614-21:09:48.196(2)? (STDERR)                                    ^
W20250614-21:09:48.196(2)? (STDERR) 
W20250614-21:09:48.197(2)? (STDERR) TargetCloseError: Protocol error (Runtime.callFunctionOn): Target closed
W20250614-21:09:48.197(2)? (STDERR)     at CallbackRegistry.clear (./node_modules/puppeteer-core/src/common/Connection.ts:186:30)
W20250614-21:09:48.197(2)? (STDERR)     at CDPSessionImpl._onClosed (./node_modules/puppeteer-core/src/common/Connection.ts:586:21)
W20250614-21:09:48.197(2)? (STDERR)     at Connection.#onClose (./node_modules/puppeteer-core/src/common/Connection.ts:362:15)
W20250614-21:09:48.197(2)? (STDERR)     at WebSocket.<anonymous> (./node_modules/puppeteer-core/src/common/NodeWebSocketTransport.ts:60:22)
W20250614-21:09:48.198(2)? (STDERR)     at callListener (./node_modules/ws/lib/event-target.js:290:14)
W20250614-21:09:48.198(2)? (STDERR)     at WebSocket.onClose (./node_modules/ws/lib/event-target.js:220:9)
W20250614-21:09:48.198(2)? (STDERR)     at WebSocket.emit (node:events:519:28)
W20250614-21:09:48.198(2)? (STDERR)     at WebSocket.emit (node:domain:488:12)
W20250614-21:09:48.198(2)? (STDERR)     at WebSocket.emitClose (./node_modules/ws/lib/websocket.js:258:10)
W20250614-21:09:48.198(2)? (STDERR)     at Socket.socketOnClose (./node_modules/ws/lib/websocket.js:1264:15)
W20250614-21:09:48.198(2)? (STDERR)     at Socket.emit (node:events:519:28)
W20250614-21:09:48.198(2)? (STDERR)     at Socket.emit (node:domain:488:12)
W20250614-21:09:48.199(2)? (STDERR)     at TCP.<anonymous> (node:net:338:12)
W20250614-21:09:48.199(2)? (STDERR)     at TCP.callbackTrampoline (node:internal/async_hooks:130:17)
W20250614-21:09:48.199(2)? (STDERR) 
W20250614-21:09:48.199(2)? (STDERR) Node.js v20.15.1

puppeteer 20.9.0 headless true Google Chrome for Testing 115.0.5790.98 Failures 0/0

puppeteer 21.9.0 headless true Google Chrome for Testing 121.0.6167.85 Failures 0/0
puppeteer 21.9.0 headless new Google Chrome for Testing 121.0.6167.85 Failures all/all

puppeteer 22.15.0 headless new Google Chrome/127.0.6533.88 Failures 0/0
1 Like