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

panic when use gin and rod, Failed to get the debug url,Opening in existing browser session. #664

Closed
passerbyo opened this issue Jul 22, 2022 · 9 comments
Labels
duplicate This issue or pull request already exists

Comments

@passerbyo
Copy link

passerbyo commented Jul 22, 2022

Rod Version: v0.108.1

The code to demonstrate your question

the following is my code,i use go run to run the code.

package main

import (
  "github.com/gin-gonic/gin"
  "github.com/rakyll/statik/fs"
  "github.com/go-rod/rod"
  "github.com/go-rod/rod/lib/launcher"
  "github.com/go-rod/stealth"
)

func TestLab(t *testing.T) {
     r := gin.Default()
     r.GET("/run",func(c *gin.Context){
           go rod.rodhandle()
      })
      r.Run()
}

func rodhandle() {
  u := launcher.New().
  Headless(false).
  MustLaunch()
  browser := rod.New().ControlURL(u).MustConnect().Trace(true).MustIncognito()
  defer browser.MustClose()
  page := stealth.MustPage(browser)
  defer page.MustClose()
  page.MustNavigate("https://google.com/")
  page.MustWaitLoad()
}

second time to access /run url will see and panic.

What you got

panic: [launcher] Failed to get the debug url: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) Opening in existing browser session. [0722/023228.007212:ERROR:nacl_helper_linux.cc(315)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly

@passerbyo passerbyo added the question Questions related to rod label Jul 22, 2022
@ysmood
Copy link
Member

ysmood commented Jul 22, 2022

#322

@ysmood ysmood closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2022
@ysmood
Copy link
Member

ysmood commented Jul 23, 2022

Please check the second rule of #322

@passerbyo
Copy link
Author

Please check the second rule of #322

my fix is down. please check. @ysmood @go-rod/everyone @tyron @codegoalie @rod-robot

@passerbyo passerbyo changed the title panic: [launcher] Failed to get the debug url: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) Opening in existing browser session. [0722/023228.007212:ERROR:nacl_helper_linux.cc(315)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly panic when use gin and rod, Failed to get the debug url,Opening in existing browser session. Jul 24, 2022
@passerbyo
Copy link
Author

passerbyo commented Jul 24, 2022

#665

#664 i try my best to follow #332 and follow the second rule of #332

If the long code block is not syntax highlighted with markdown

i dont know what the code block is not syntax highlighted with ... means, i just follow others issue template. and i try to use two * to surround my long code,but it has no effect.

@ysmood

@ysmood ysmood reopened this Jul 25, 2022
@ysmood
Copy link
Member

ysmood commented Jul 25, 2022

Please check the first rule of #322

@ysmood ysmood closed this as completed Jul 25, 2022
@ysmood ysmood reopened this Jul 25, 2022
@ysmood ysmood closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2022
@passerbyo
Copy link
Author

Please check the first rule of #322

my issue is edited. @ysmood @go-rod/everyone @tyron @codegoalie @rod-robot

@passerbyo
Copy link
Author

@ysmood ysmood added duplicate This issue or pull request already exists and removed question Questions related to rod labels Jul 25, 2022
@ysmood
Copy link
Member

ysmood commented Jul 25, 2022

Duplicated with #665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants