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

Where is a certain version of the protocol? #233

Open
ygoe opened this issue Dec 14, 2020 · 4 comments
Open

Where is a certain version of the protocol? #233

ygoe opened this issue Dec 14, 2020 · 4 comments

Comments

@ygoe
Copy link

ygoe commented Dec 14, 2020

I'm using these definitions to generate a C# wrapper for all its defined API. The current master version does not work with the current Chrome stable version 87 because the PDL requires a member that isn't provided by the actual browser. That member was added on 4 Nov but the browser was released on 19 Nov. So it seems like the browser doesn't use the latest PDL when released. A really old version from 2 years ago works for me (and has worked the last 2 years), but I cannot tell its version, it was still fetched from another GitHub repository that no longer contains these PDL files. Google search brought me here instead.

I guess I'm better off using the stable version 1.3 that is described in the referenced protocol viewer. But I cannot find any version specifications in this repository. There are random branch names and version tags but nothing that looks like Chrome versions or 1.2 or 1.3. All I see is 6-digit numbers starting with 7 or 8 that have no meaning to me.

Where can I find the right commit in this repository?

@paulirish
Copy link
Member

First up, there is /json/protocol which provides the currently connected browser's version of the protocol: https://chromedevtools.github.io/devtools-protocol/#:~:text=GET%20/json/protocol


There are the 1.2 and 1.3 version tags... 1.2 is definitely static, though it is quite old; there's no PDL for it, but there is the JSON. Then the 1.3 is not as static as you'd think; it's basically just a branch of all the non-experimental and non-deprecated items in the ToT protocol.


Alternatively... yes you'll have to map chromium revision numbers to Chrome versions. Doable, but requires some work.

The commits are all Roll protocol to r836089 etc. and each protocol bump is also published to npm with a version like 0.0.836089. We call this 836089 number the chromium revision. It's a monotonic version number referring to the chromium master commit position.

The "Find Releases" box will help you go from chromium rev to Chrome version. And the "Version Information" will do the inverse (use the "Branch Base Position").

image image

good luck!

@ygoe
Copy link
Author

ygoe commented Dec 15, 2020

Hm, are we talking about this repository? It has these tags, according to GitHub:

  • v1.0
  • v0.8
  • v0.2
  • v0.1

And these are the branches:

  • master
  • gh-pages
  • paulirish-patch-1
  • changes
  • ghpagesbackup

No 1.2 or 1.3 anywhere.

@caseq
Copy link

caseq commented Dec 15, 2020

I think the source of confusion here is that the chrome is not released from the master branch. The field you're looking for was added on Nov 4, but m87 was released from branch 4280 that was spawned off commit ea420fb963f9658c9969b6513c56b8f47efa1a2a (as per https://omahaproxy.appspot.com/) on Oct 1st.

So to talk to chromium stable, you need the protocol definition that matches the stable version or older. This link would give you the version precisely matching the binary on the stable channel right now (please note the tag in the URL):

https://source.chromium.org/chromium/chromium/src/+/refs/tags/87.0.4280.66:third_party/blink/public/devtools_protocol/browser_protocol.pdl;bpv=1

(but anything older should work, too).

Please disregard browser_protocol-1.x.json files, these are there for the purpose of capturing the baseline for automated compatibility checking (tl/dr: mostly for internal scripts).

@paulirish
Copy link
Member

Hm, are we talking about this repository? It has these tags, according to GitHub:

FWIW I wasn't talking about git tags or branches, no.

I was referring to the 1-2.json and 1-3.json in the other repo: https://github.com/ChromeDevTools/debugger-protocol-viewer/tree/master/pages/_data

But like @caseq said, these protocol versions are unofficial and you should disregard them.


Using caseq's technique for getting a stable Chrome version's exact pdl file is a great way to go.

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

3 participants