Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browser.disconnect caused IOError #337

Open
dexterouschen opened this issue Oct 9, 2024 · 0 comments
Open

browser.disconnect caused IOError #337

dexterouschen opened this issue Oct 9, 2024 · 0 comments

Comments

@dexterouschen
Copy link

Step To Reproduce / Observed behavior

browser_ws_endpoint = 'ws://127.0.0.1:9222/devtools/browser/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
browser = Puppeteer.connect(
  browser_ws_endpoint:,
  default_viewport: Puppeteer::Viewport.new(width: 1280, height: 800)
)
page = browser.new_page
page.close
browser.disconnect
#<Thread:0x00000001633b1d70 /Users/username/.rvm/gems/ruby-3.3.4/gems/puppeteer-ruby-0.45.6/lib/puppeteer/web_socket.rb:67 run> terminated with exception (report_on_exception is true):
/Users/username/.rvm/gems/ruby-3.3.4/gems/puppeteer-ruby-0.45.6/lib/puppeteer/web_socket.rb:44:in `readpartial': stream closed in another thread (IOError)
        from /Users/username/.rvm/gems/ruby-3.3.4/gems/puppeteer-ruby-0.45.6/lib/puppeteer/web_socket.rb:44:in `readpartial'
        from /Users/username/.rvm/gems/ruby-3.3.4/gems/puppeteer-ruby-0.45.6/lib/puppeteer/web_socket.rb:101:in `wait_for_data'
        from /Users/username/.rvm/gems/ruby-3.3.4/gems/puppeteer-ruby-0.45.6/lib/puppeteer/web_socket.rb:68:in `block in initialize'

Expected behavior

No errors

Environment

Ruby 3.3.4
Chrome for Testing Mac ARM 127.0.6533.119
MacBook Pro Apple M2 Pro
MacOS Sonoma 14.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant