ferrum
ferrum copied to clipboard
Browser error
test.rb:
require "ferrum"
browser = Ferrum::Browser.new
browser.go_to("https://google.com")
browser.screenshot(path: "google.png")
browser.quit
bundle exec ruby test.rb
Traceback (most recent call last):
7: from test.rb:2:in `<main>'
6: from test.rb:2:in `new'
5: from /var/lib/gems/2.7.0/gems/ferrum-0.11/lib/ferrum/browser.rb:63:in `initialize'
4: from /var/lib/gems/2.7.0/gems/ferrum-0.11/lib/ferrum/browser.rb:125:in `start'
3: from /var/lib/gems/2.7.0/gems/ferrum-0.11/lib/ferrum/browser/process.rb:30:in `start'
2: from /var/lib/gems/2.7.0/gems/ferrum-0.11/lib/ferrum/browser/process.rb:30:in `tap'
1: from /var/lib/gems/2.7.0/gems/ferrum-0.11/lib/ferrum/browser/process.rb:95:in `start'
/var/lib/gems/2.7.0/gems/ferrum-0.11/lib/ferrum/browser/process.rb:149:in `parse_ws_url': Browser did not produce websocket url within 10 seconds, try to increase `:process_timeout`. See https://github.com/rubycdp/ferrum#customization (Ferrum::ProcessTimeoutError)
google-chrome-stable -version
Google Chrome 103.0.5060.114
chrome needs --crash-dumps-dir=/tmp or its refuse to run
google-chrome-stable --headless --disable-gpu http://www.google.com/
[0714/203210.595511:ERROR:filesystem_posix.cc(63)] mkdir /tmp/Crashpad/new: Permission denied (13)
google-chrome-stable --headless --disable-gpu --print-to-pdf https://gf.dev/ --crash-dumps-dir=/tmp
[0714/202835.431239:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[0714/202835.466131:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
[0714/202837.153174:ERROR:ssl_client_socket_impl.cc(996)] handshake failed; returned -1, SSL error code 1, net_error -101
[0714/202837.240905:ERROR:ssl_client_socket_impl.cc(996)] handshake failed; returned -1, SSL error code 1, net_error -101
[0714/202837.486064:ERROR:ssl_client_socket_impl.cc(996)] handshake failed; returned -1, SSL error code 1, net_error -101
[0714/202837.570332:ERROR:ssl_client_socket_impl.cc(996)] handshake failed; returned -1, SSL error code 1, net_error -101
[0714/202837.807346:INFO:headless_shell.cc(660)] Written to file output.pdf.
also in examples no
require "ferrum"