Skip to content

Chrome browser does not start, in cron. (Ubuntu) #346

Description

@lunst97

I have a code that downloads a file from a website, it only works with the setting (headless: false) otherwise it just doesn't download anything.
I add the task of running the script to cron and I get this error (home/peeper/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ferrum-0.13/lib/ferrum/browser/process.rb:157: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::Process Timeout Error)
)

And this error is present only if you run the code from under cron, everything works in a normal console.

Cron:
eval "$(~/.rbenv/bin/rbenv init - bash)"
DISPLAY=:0
cd /home/peeper/xxx && /home/peeper/.rbenv/versions/2.7.2/bin/ruby main.rb

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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