#40

Slow Attachment and Frequent Disconnects

Openivalsarajopened 9mo ago

Issue: Playwriter Extension Slow Attachment and Frequent Disconnects

Description:

It has been observed since day one that attaching the Playwriter Chrome extension takes a noticeable amount of time. While the page being attached does contain many elements and dynamic states, the Playwriter extension appears to be particularly slow.

In contrast, the "open claw browser relay" Chrome extension, when attached to a similar page, functions without issue.

Problem:

The Playwriter extension is experiencing:

  • Slow attachment times.
  • Frequent disconnects.

Question:

Is it possible to compare the performance of Playwriter with other extensions like "open claw browser relay" to diagnose and resolve these issues?

I am not sure whether we can compare it with openclaw.

Activity

30
remorses9mo ago

What website was slow?

The extension will show as loading until you start using the cli/MCP and the extension can connect with the websocket relay

remorses9mo ago

What website was slow?

The extension will show as loading until you start using the cli/MCP and the extension can connect with the websocket relay

remorses9mo ago

What website was slow?

The extension will show as loading until you start using the cli/MCP and the extension can connect with the websocket relay

remorses9mo ago

What website was slow?

The extension will show as loading until you start using the cli/MCP and the extension can connect with the websocket relay

remorses9mo ago

What website was slow?

The extension will show as loading until you start using the cli/MCP and the extension can connect with the websocket relay

remorses9mo ago

What website was slow?

The extension will show as loading until you start using the cli/MCP and the extension can connect with the websocket relay

ivalsaraj8mo ago
  1. It's app.crisp.chat, it's chat handling app (like intercom)

  2. also sometimes it shows like this:

Additional Info:

ivalsaraj8mo ago
  1. It's app.crisp.chat, it's chat handling app (like intercom)

  2. also sometimes it shows like this:

Additional Info:

ivalsaraj8mo ago
  1. It's app.crisp.chat, it's chat handling app (like intercom)

  2. also sometimes it shows like this:

Additional Info:

ivalsaraj8mo ago
  1. It's app.crisp.chat, it's chat handling app (like intercom)

  2. also sometimes it shows like this:

Additional Info:

tyler-dot-earth8mo ago

@remorses Managed to get my first reliable session of the day with Playwriter.

I cloned the repo locally and built + installed unpacked extension, then had an agent debug.

Here's what it said fixes were:

  1. I fixed CDP child-session detach handling in the extension relay logic in extension/src/background.ts. Specifically, Target.detachFromTarget now resolves the child sessionId from params.sessionId (the shape Playwright actually sends), maps it to the parent tab via childSessions, and no-ops unknown child sessions instead of throwing.
  2. That removed the recurring relay error (No tab found for method Target.detachFromTarget ...) that was showing up right before your earlier Frame has been detached failures, and after this change page.goto(...) became stable.
  3. I rebuilt the unpacked extension from sourc, so generated output in extension/dist/background.js matches source (not hand-edited drift).
  4. I also added tab-group styling retries/paint nudges in extension/src/background.ts, but this appears cosmetic only; it did not correlate with command reliability.

Practical Bottom Line

The core reliability fix was the Target.detachFromTarget session routing change. The tab-group gray/unlabeled chip behavior is annoying UI paint behavior, but not what was breaking Playwriter execution.

tyler-dot-earth8mo ago

@remorses Managed to get my first reliable session of the day with Playwriter.

I cloned the repo locally and built + installed unpacked extension, then had an agent debug.

Here's what it said fixes were:

  1. I fixed CDP child-session detach handling in the extension relay logic in extension/src/background.ts. Specifically, Target.detachFromTarget now resolves the child sessionId from params.sessionId (the shape Playwright actually sends), maps it to the parent tab via childSessions, and no-ops unknown child sessions instead of throwing.
  2. That removed the recurring relay error (No tab found for method Target.detachFromTarget ...) that was showing up right before your earlier Frame has been detached failures, and after this change page.goto(...) became stable.
  3. I rebuilt the unpacked extension from sourc, so generated output in extension/dist/background.js matches source (not hand-edited drift).
  4. I also added tab-group styling retries/paint nudges in extension/src/background.ts, but this appears cosmetic only; it did not correlate with command reliability.

Practical Bottom Line

The core reliability fix was the Target.detachFromTarget session routing change. The tab-group gray/unlabeled chip behavior is annoying UI paint behavior, but not what was breaking Playwriter execution.

tyler-dot-earth8mo ago

@remorses Managed to get my first reliable session of the day with Playwriter.

I cloned the repo locally and built + installed unpacked extension, then had an agent debug.

Here's what it said fixes were:

  1. I fixed CDP child-session detach handling in the extension relay logic in extension/src/background.ts. Specifically, Target.detachFromTarget now resolves the child sessionId from params.sessionId (the shape Playwright actually sends), maps it to the parent tab via childSessions, and no-ops unknown child sessions instead of throwing.
  2. That removed the recurring relay error (No tab found for method Target.detachFromTarget ...) that was showing up right before your earlier Frame has been detached failures, and after this change page.goto(...) became stable.
  3. I rebuilt the unpacked extension from sourc, so generated output in extension/dist/background.js matches source (not hand-edited drift).
  4. I also added tab-group styling retries/paint nudges in extension/src/background.ts, but this appears cosmetic only; it did not correlate with command reliability.

Practical Bottom Line

The core reliability fix was the Target.detachFromTarget session routing change. The tab-group gray/unlabeled chip behavior is annoying UI paint behavior, but not what was breaking Playwriter execution.

tyler-dot-earth8mo ago

@remorses Managed to get my first reliable session of the day with Playwriter.

I cloned the repo locally and built + installed unpacked extension, then had an agent debug.

Here's what it said fixes were:

  1. I fixed CDP child-session detach handling in the extension relay logic in extension/src/background.ts. Specifically, Target.detachFromTarget now resolves the child sessionId from params.sessionId (the shape Playwright actually sends), maps it to the parent tab via childSessions, and no-ops unknown child sessions instead of throwing.
  2. That removed the recurring relay error (No tab found for method Target.detachFromTarget ...) that was showing up right before your earlier Frame has been detached failures, and after this change page.goto(...) became stable.
  3. I rebuilt the unpacked extension from sourc, so generated output in extension/dist/background.js matches source (not hand-edited drift).
  4. I also added tab-group styling retries/paint nudges in extension/src/background.ts, but this appears cosmetic only; it did not correlate with command reliability.

Practical Bottom Line

The core reliability fix was the Target.detachFromTarget session routing change. The tab-group gray/unlabeled chip behavior is annoying UI paint behavior, but not what was breaking Playwriter execution.

remorses8mo ago

@tyler-dot-earth thank you for diving deeper into the issue, can you open a PR with the changes the agent made so I can take a look? You can ask your agent to use the gh cli to do so

remorses8mo ago

@tyler-dot-earth thank you for diving deeper into the issue, can you open a PR with the changes the agent made so I can take a look? You can ask your agent to use the gh cli to do so

remorses8mo ago

@tyler-dot-earth thank you for diving deeper into the issue, can you open a PR with the changes the agent made so I can take a look? You can ask your agent to use the gh cli to do so

remorses8mo ago

@tyler-dot-earth thank you for diving deeper into the issue, can you open a PR with the changes the agent made so I can take a look? You can ask your agent to use the gh cli to do so

tyler-dot-earth8mo ago

@tyler-dot-earth thank you for diving deeper into the issue, can you open a PR with the changes the agent made so I can take a look? You can ask your agent to use the gh cli to do so

here's what it changed - https://github.com/remorses/playwriter/pull/59

tyler-dot-earth8mo ago

@tyler-dot-earth thank you for diving deeper into the issue, can you open a PR with the changes the agent made so I can take a look? You can ask your agent to use the gh cli to do so

here's what it changed - https://github.com/remorses/playwriter/pull/59