Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

keepAlive sessions go COMPLETED within 500ms of CDP connect (Starter plan)

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript, nodejs, playwright, typescript
Domain
api, backend

Research direction

Start by running the provided @browserbasehq/sdk session-create, sessions.retrieve, and Playwright connectOverCDP reproduction, comparing keepAlive and timeout behavior with and without a CDP connection. No repository files or tests are named; done means identifying whether the SDK or the remote session service causes premature completion and confirming sessions remain RUNNING until timeout or REQUEST_RELEASE.

Written by the indexing model from the issue text.

Description

Bug Report

Plan: Starter ($99/mo)
Project ID: e8975632-d34f-4ef5-b974-ea324e16c327
SDK: @browserbasehq/sdk 2.10.0
Region: us-west-2
Connect endpoint: connect-v2.usw2.browserbase.com

Problem

Sessions created with keepAlive: true and timeout: 900 go COMPLETED within 500ms-10s, regardless of whether a CDP connection is established.

Reproduction
const Browserbase = require('@browserbasehq/sdk');
const { chromium } = require('playwright');
const bb = new Browserbase({ apiKey: 'YOUR_KEY' });

const session = await bb.sessions.create({
  projectId: 'YOUR_PROJECT',
  keepAlive: true,
  timeout: 900,
});

// Session is RUNNING here
const browser = await chromium.connectOverCDP(session.connectUrl, { timeout: 10000 });
// Browser disconnects within 500ms

// Immediately after:
const retrieved = await bb.sessions.retrieve(session.id);
console.log(retrieved.status); // "COMPLETED" — should be "RUNNING"
Observed behavior
  1. Without CDP connect: Session goes from RUNNING → COMPLETED after ~10 seconds (polled every 1s)
  2. With immediate CDP connect: Browser disconnects within 500ms, session goes COMPLETED
  3. With active page navigation: Same — page.evaluate throws "Target page, context or browser has been closed"
  4. expiresAt is set correctly (15 minutes out), but session dies in seconds
  5. keepAlive shows true on the session object
  6. Project concurrency is 100 (confirming Starter plan is active)
Expected behavior

Session should remain RUNNING for timeout duration (900s) or until explicitly released via REQUEST_RELEASE. CDP connections should remain stable.

What I've ruled out
  • Docker/container issues: Same behavior on macOS host directly
  • NODE_TLS_REJECT_UNAUTHORIZED: Same behavior with and without
  • Playwright version: Tested with multiple versions
  • Race conditions: Session polled every 1s, consistently dies at ~10s mark without CDP
  • Session limits: Only 1 session at a time, concurrency limit is 100
  • connectUrl format: Using the signed connectUrl from session creation (wss://connect-v2.usw2.browserbase.com/?signingKey=...)
Environment
  • macOS Darwin 24.6.0
  • Node.js v25.2.1 (host) / v18.20.8 (Docker)
  • Playwright (latest)
  • @browserbasehq/sdk 2.10.0
  • Account created 2026-05-06

This is blocking production use. Appreciate a quick look!

Dominant language
TypeScript
Stars
64
Forks
17
Avg merge
13m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from browserbase/sdk-node

All issues in browserbase/sdk-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.