0

Hey guys I have been trying to automate a task on my browser's machine using chromedp.

I tried examples on the repo however they always fail:

unexpected fault address 0x7f7a36461000 fatal error: fault [signal SIGBUS: bus error code=0x2 addr=0x7f7a36461000 pc=0x53a9d5]

Example's source code am running can be found here.

As I understand chromedp comes with headless pre-compiled version of chrome. I have browsed the API documentation to see if it possible to pass a port on which the dev tools is listening, no success.

However when I tried mafredri/cdp it worked. I came to understand that chromedp is failing to start its embedded chrome. Although, I am not really sure. Why is this happening?

My env:

Google Chrome 85.0.4183.102

Ubuntu 18.04.4 LTS

go version go1.13.5 linux/amd64

Any help would be truly appreciated.

4

1 回答 1

1

So, long story short I went to run tests on the chromedp locally installed library through go test, it failed. I opened an issue on the Github repo. While it was not indicated that it requires Go 1.14+ but it does.

If you encountered this issue, please proceed to first run the tests on the master branch locally installed library. If it is fails with the following log:

github.com/chromedp/chromedp [github.com/chromedp/chromedp.test] ./chromedp_test.go:862:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup) ./chromedp_test.go:948:5: t.Cleanup undefined (type *testing.T has no field or method Cleanup) ./chromedp_test.go:950:5: t.Cleanup undefined (type *testing.T has no field or method Cleanup) FAIL github.com/chromedp/chromedp [build failed]

You need to know that t.Cleanup was added on Go 1.14 (credits to Oiyoo).

I hope this helps you if you are having the same problem.

于 2020-09-11T16:22:35.380 回答