$ go list -m github.com/chromedp/chromedp master branch $ google-chrome --version Google Chrome 77.0.3865.120 -- on Debian 10 Google Chrome 77.0.3865.120 -- on macOS 10.14.6 $ go version go version go1.13 linux/amd64 go version go1.13.1 darwin/amd64
I was trying the example to take a screenshot from here.
It works perfect for google.com, for example but it fails if it's an insecure certificate or self-signed one.
I expect a screenshot also if the site is not secure
A blank screenshot, without content.
Working URL: https://facebook.com
Non-working URL: https://self-signed.badssl.com
(It's just a blank image)
While the expect result should be:
Okay I figured out checking past issues:
opts := append(chromedp.DefaultExecAllocatorOptions[:],
chromedp.Flag("ignore-certificate-errors", "1"),
)
allocCtx, cancel := chromedp.NewExecAllocator(context.Background(), opts...)
defer cancel()
ctx, cancel := chromedp.NewContext(allocCtx, chromedp.WithLogf(log.Printf))
defer cancel()
err = chromedp.Run(ctx, fullScreenshot(url, 10, &buf))
Most helpful comment
Okay I figured out checking past issues: