Skip to content

[Bug]: _sessions is undefined in lib/server/frames.js:437 - this._page._delegate._sessions #112

Closed

Description

@kaporzhu

Version
1.52.0

Steps to reproduce
launch the test server in the docker container
npx rebrowser-playwright-core launch-server --browser firefox
connect to server with playwright.firefox.connect and try to download page.

Actual behavior
server in the docker is broken. but if I switch to chromium, it's ok. here's the log.

/node_modules/rebrowser-playwright-core/lib/server/frames.js:437

const crSession = (this._page._delegate._sessions.get(this._id) || this._page._delegate._mainFrameSession)._client;

^

TypeError: Cannot read properties of undefined (reading 'get')

at Frame._onClearLifecycle (/node_modules/rebrowser-playwright-core/lib/server/frames.js:437:55)

at FrameManager.frameCommittedNewDocumentNavigation (/node_modules/rebrowser-playwright-core/lib/server/frames.js:175:11)

at FFPage._onNavigationCommitted (/node_modules/rebrowser-playwright-core/lib/server/firefox/ffPage.js:175:30)

at FFSession.emit (node:events:518:28)

at /node_modules/rebrowser-playwright-core/lib/server/firefox/ffConnection.js:127:41

Environment
System:
OS: macOS 15.5
CPU: (12) arm64 Apple M4 Pro
Binaries:
Docker desktop: 4.40.0
Node: 22.14.0
npm: 10.9.2
Languages:
Bash: 3.2.57 - /bin/bash

Activity

  1. lee3164 commented on Aug 8, 2025

    @lee3164

    This patch only supports chrome based browser

  2. asafe199 commented on Nov 7, 2025

    @asafe199

    @lee3164 Is there a way to use Firefox / Webkit even the patches are no applicable for them?
    I have a couple of cases that I must to use all 3 browsers.

  3. rebrowsernet commented on Oct 18, 2026

    @rebrowsernet
    Collaborator

    Fixed in v1.1.0. On Firefox and WebKit, rebrowser-playwright 1.64.1 skips the Chromium-specific context handling instead of crashing with _sessions is undefined, so launch-server --browser firefox works again. The Runtime.enable fix and the other Chromium-specific changes don't apply to those browsers, though. #132 adds a CI check that launches Firefox and WebKit through the patched build on every change. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions