wirepair / gcd

Unofficial implementation of the Google Chrome Remote Debugger in Go
MIT License
186 stars 31 forks source link

Hangs when calling NewTab #1

Closed eblanchette closed 10 years ago

eblanchette commented 10 years ago

I've tried running the screen capture example and it hangs when calling NewTab. Do I have to enable something in chrome?

targets[i] = debugger.NewTab()

Linux: Chrome Version 36.0.1985.143

wirepair commented 10 years ago

I've made a few fixes, can you confirm the hang is still happening? I just re-tested the example and it works fine for me in windows, i'll see about testing in my linux VM when i get some time.

wirepair commented 10 years ago

OK i just tested, it works, but i had to add in a time.Sleep delay from starting the process and running NewTab because apparently in linux it's slow to bind the debugger port.

        debugger = gcd.NewChromeDebugger()
    debugger.StartProcess("/opt/google/chrome/google-chrome", "/home/wirepair/chromegcd/", "9222")
    time.Sleep(1 * time.Second) // added this.
    defer debugger.ExitProcess()
    targets := make([]*gcd.ChromeTarget, numTabs)

Of course this sounds nothing like your problem... So Could you elaborate on how you know it's hanging at that particular line?

eblanchette commented 10 years ago

It was hanging on the debugger.NewTab() but now it's working after the update. Thanks!