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

prop:bug ? browser.SetDownloadBehavior vs. old page.SetDownloadBehavior #627

Closed
remotejob opened this issue May 18, 2020 · 4 comments
Closed

Comments

@remotejob
Copy link

What versions are you running?

github.com/chromedp/chromedp v0.5.3
Version 80.0.3987.87 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)
go version go1.14.3 linux/amd64

What did you do? Include clear steps.

I change old:
page.SetDownloadBehavior(page.SetDownloadBehaviorBehaviorAllow).WithDownloadPath(FileDir + "/download")

on:
browser.SetDownloadBehavior(browser.SetDownloadBehaviorBehaviorAllow).WithDownloadPath(FileDir + "/download")

What did you expect to see?

download file

What did you see instead?

'Browser.setDownloadBehavior' wasn't found (-32601)

but code compiled successfully.
error during program execution

What is wrong ?

@mvdan
Copy link
Contributor

mvdan commented May 18, 2020

Your cdproto dependency is too new for your Chrome version. Use an older cdproto and the page API.

Recent versions of the protocol definition have moved this API, but I think the change on the Chrome browser itself won't come until a future release like v82 or v83.

@remotejob
Copy link
Author

Ok I rollback
go get github.com/chromedp/cdproto@v0.0.0-20200209033844-7e00b02ea7d2
it resolve problem.

@mvdan
Copy link
Contributor

mvdan commented Jun 8, 2020

I'll look into temporarily re-adding the deprecated API to cdproto, since Chrome left a void for a few releases where the old API is deprecated, but the new API isn't available yet.

Until that happens, you should be able to use a slightly older version of cdproto.

mpl added a commit to mpl/gphotos-cdp that referenced this issue Jun 30, 2020
Also update chromedp to 0.5.4, so we can benefit from conveniences such
as RunResponse (which is relied upon for this fix).
Consequently, that means a recent enough Chrome version (v83) is needed
as per this commit.
See chromedp/chromedp#627

Fixes perkeep#17
mpl added a commit to mpl/gphotos-cdp that referenced this issue Jun 30, 2020
Also update chromedp to 0.5.4, so we can benefit from conveniences such
as RunResponse (which is relied upon for this fix).
Consequently, that means a recent enough Chrome version (v83) is needed
as per this commit.
See chromedp/chromedp#627

Fixes perkeep#17
@mvdan
Copy link
Contributor

mvdan commented Jul 9, 2020

The cdproto commit is chromedp/cdproto@d1f6fc5, if any of you want to pull it. The simplest way will be go get -d github.com/chromedp/cdproto@master.

mpl added a commit to mpl/gphotos-cdp that referenced this issue Jul 11, 2020
Also update chromedp to 0.5.4, so we can benefit from conveniences such
as RunResponse (which is relied upon for this fix).
Consequently, that means a recent enough Chrome version (v83) is needed
as per this commit.
See chromedp/chromedp#627

Fixes perkeep#17
mpl added a commit to perkeep/gphotos-cdp that referenced this issue Nov 11, 2020
Also update chromedp to 0.5.4, so we can benefit from conveniences such
as RunResponse (which is relied upon for this fix).
Consequently, that means a recent enough Chrome version (v83) is needed
as per this commit.
See chromedp/chromedp#627

Fixes #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants