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

On linux chrome launch failing #116

Closed
rajender opened this issue Jul 15, 2020 · 2 comments
Closed

On linux chrome launch failing #116

rajender opened this issue Jul 15, 2020 · 2 comments
Labels
question Questions related to rod

Comments

@rajender
Copy link
Contributor

rajender commented Jul 15, 2020

Rod Version: v0.45.1

panic: [launcher] Failed to get the debug url: [0715/074020.195948:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.

@rajender rajender added the bug When you are sure about it's a bug label Jul 15, 2020
@ysmood
Copy link
Member

ysmood commented Jul 15, 2020

rod/examples_test.go

Lines 202 to 229 in a0664b4

// Example_customize_browser_launch will show how we can further customise the
// browser with the launcher library. The launcher lib comes with many default
// flags (switches), this example adds and removes a few.
func Example_customize_browser_launch() {
// Documentation for default switches can be found at the source of the
// launcher.New function, as well as at
// https://peter.sh/experiments/chromium-command-line-switches/.
url := launcher.New().
// Set a flag- Adding the HTTP proxy server.
Set("proxy-server", "127.0.0.1:8080").
// Delete a flag- remove the mock-keychain flag
Delete("use-mock-keychain").
Launch()
browser := rod.New().ControlURL(url).Connect()
defer browser.Close()
// Adding authentication to the proxy, for the next auth request.
// We use CLI tool "mitmproxy --proxyauth user:pass" as an example.
browser.HandleAuth("user", "pass")
// mitmproxy needs a cert config to support https. We use http here instead,
// for example
fmt.Println(browser.Page("http://example.com/").Element("title").Text())
// Skip
// Output: Example Domain
}

Actually, the error info is quite enough for you to solve it by yourself.

Add flag no-sandbox should solve your issue.

@ysmood ysmood added question Questions related to rod and removed bug When you are sure about it's a bug labels Jul 15, 2020
@rajender
Copy link
Contributor Author

It's working fine with no-sandbox option.

@ysmood ysmood closed this as completed Jul 15, 2020
ysmood added a commit that referenced this issue Aug 4, 2020
resolve #116
ysmood added a commit that referenced this issue Aug 13, 2020
resolve #116
ysmood added a commit that referenced this issue Aug 20, 2020
resolve #116
ysmood added a commit that referenced this issue Aug 20, 2020
ysmood added a commit that referenced this issue Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants