Skip to content

BrowserError when calling browser.reset after initializing browser while using browserless v2 #540

@ericenns

Description

@ericenns

Describe the bug
A clear and concise description of what the bug is.

Ferrum v0.17 introduced a bug where calling browser.reset immediately after initializing a new Browser instance causes an Failed to find context with id 02B3B5EFF6A3105729C7F971F1B93E67 (Ferrum::BrowserError). Ferrum v0.16 does not have this issue, and I have been so far unable to identify which change from v0.16 has caused this.

To Reproduce
Steps to reproduce the behavior, a failing test or a debug log.

require 'ferrum'

browser = Ferrum::Browser.new(ws_url: "ws://browserless:3000")
browser.reset

Expected behavior
A clear and concise description of what you expected to happen.

browser.reset should work without errors, it appears the default browser context that ferrum is setting is invalid.

Screenshots
If applicable, add screenshots to help explain your problem.

note: in this example port is 3333 not 3000 as I was running browserless with that port.
Image

Image Image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: ghcr.io/browserless/chromium:latest
  • Version: Ruby 3.3.7 and Ferrum v0.17.1

Additional context
Add any other context about the problem here.

I encounter this issue as I am using Cuprite v0.17.1 with capybara and it calls browser.reset after each test.

Metadata

Metadata

Assignees

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