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

Protocol version #102

Open
ziflex opened this issue Aug 23, 2019 · 5 comments
Open

Protocol version #102

ziflex opened this issue Aug 23, 2019 · 5 comments

Comments

@ziflex
Copy link

ziflex commented Aug 23, 2019

Hi!

I wonder what's the current version of the CDP protocol the library is using now?
Since the protocol is still in flux, I need the number to properly stick to a particular version of Chrome.

@mafredri
Copy link
Owner

Hi, they were pulled from the JSON in ChromeDevTools/devtools-protocol on Jul 10, so that should be r674637.

But on that note, unless you're using bleeding edge methods, there shouldn't be much difference when using the latest protocol definition and running a few versions old Chrome 😄.

I could add the protocol version somewhere, e.g. commit message, maybe Version() on the client or a comment in a file, etc. Would that be helpful, any preference?

@mafredri
Copy link
Owner

PS. For best compatibility, pulling the protocol from the running browser (http://localhost:9222/json/protocol) and generating the cdp protocol from that would be the best option. Unfortunately, at the time of writing, this is not very straight forward.

I've been planning on moving to Go modules, and making a few adjustments to the protocol generator (cdpgen) to accommodate for this.

@ziflex
Copy link
Author

ziflex commented Aug 25, 2019

Hi, they were pulled from the JSON in ChromeDevTools/devtools-protocol on Jul 10, so that should be r674637.

But on that note, unless you're using bleeding edge methods, there shouldn't be much difference when using the latest protocol definition and running a few versions old Chrome 😄.

I could add the protocol version somewhere, e.g. commit message, maybe Version() on the client or a comment in a file, etc. Would that be helpful, any preference?

I think version in README would be just fine.

The problem I'm facing is that the protocol works weird with new versions of Chrome. Not always, but its work is not consistently good or bad. Completely random issues appear here or there.

Therefore, I would like to know the version of the library in order to understand what range of browsers should be supported well. (if such exist at all)

@mafredri
Copy link
Owner

The problem I'm facing is that the protocol works weird with new versions of Chrome. Not always, but its work is not consistently good or bad. Completely random issues appear here or there.

That's weird, in my experience the protocol definition either works or it doesn't. So for example, if you're using a newer protocol definition and and older Chrome, and trying to run a command that's not supported on that version, you will get an error. It shouldn't cause any weird behavior.

From the cdp-packages perspective, there really is no difference between Chrome versions, the difference is only what commands are issued and with what parameters (i.e. the generated protocol definitions are really just a thin wrapper).

If you can give more specific examples of failures, and maybe point to example code that fails sporadically, I could look into it.

@ziflex
Copy link
Author

ziflex commented Aug 29, 2019

I can't say that there is a pattern. Same operations may fail just randomly.

I guess because of if puppeteer uses specific version of Chrome.

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