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

fix cuprite error when using root user in docker #7

Merged

Conversation

mqzhang
Copy link

@mqzhang mqzhang commented Nov 28, 2023

When using cuprite engine in Docker using root user, got an error:

Ferrum::ProcessTimeoutError: Browser did not produce websocket url within 10 seconds, try to increase `:process_timeout`. See https://github.com/rubycdp/ferrum#customization (Ferrum::ProcessTimeoutError)

Fixed this by adding browser_options: { 'no-sandbox': nil } for root user based on Ferrum document: https://github.com/rubycdp/ferrum#docker .

@glaucocustodio
Copy link
Owner

thanks for the change @mqzhang, do you think it's possible adding a test covering the scenario?

@mqzhang
Copy link
Author

mqzhang commented Nov 28, 2023

thanks for the change @mqzhang, do you think it's possible adding a test covering the scenario?

@glaucocustodio Thank you for your response, but I can't think of how to add test cases for this particular scenario. The modification is relatively simple, only one line, and I have successfully tested it in my own Docker environment.

@glaucocustodio
Copy link
Owner

if you create an instance of Tanakai::BrowserBuilder::CupriteBuilder and call the method build you should be able to inspect the driver options in the returned @browser, you can use ls from pry to check all the methods it responds to..

@glaucocustodio glaucocustodio merged commit ab4239c into glaucocustodio:master Dec 14, 2023
@glaucocustodio
Copy link
Owner

1.7.3 has just been released

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

Successfully merging this pull request may close these issues.

2 participants