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

Error 404 with GetBrowserProtocolForChromeVersion and etc. #13

Open
SmolinsCo opened this issue Oct 31, 2018 · 3 comments · May be fixed by #17
Open

Error 404 with GetBrowserProtocolForChromeVersion and etc. #13

SmolinsCo opened this issue Oct 31, 2018 · 3 comments · May be fixed by #17

Comments

@SmolinsCo
Copy link

SmolinsCo commented Oct 31, 2018

Let's look at GetBrowserProtocolForChromeVersion:
https://github.com/BaristaLabs/chrome-dev-tools-generator/blob/master/src/BaristaLabs.ChromeDevTools.Core/Chrome.cs#L148
It uses following URL:
$"https://chromium.googlesource.com/chromium/src/+/{chromeVersion.WebKitVersionHash}/third_party/blink/renderer/core/inspector/browser_protocol.pdl?format=TEXT"
I have Chrome 66.0.3359.139.
{chromeVersion.WebKitVersionHash} is a020eddf0d85fe84d4a6787b304f50aafb670969 in this case.
It is really exist such tree:
https://chromium.googlesource.com/chromium/src/+/a020eddf0d85fe84d4a6787b304f50aafb670969/
Also it has "/thirdparty", "/thirdparty/blink"... but hasn't "/thirdparty/blink/renderer" and next folders.

Conclusion: not each googlesource tree has all required files. Some another way should be used.

Possible work-around:
Open root tree URL. Remember parent tree URL. If current tree hasn't such file - open parent tree URL. And so until file found. But I am hasn't tried it and it is obviously it could take many time.

P.S. I could contribute if you will merge :)

@Oceanswave
Copy link
Member

Oceanswave commented Nov 10, 2018

Yeah, so I don’t have insight into how the chromium source tree is maintained, however, what did happen around chrome 68 is that the chromium source tree changed where and how the protocol definition is stored.

Prior to chrome 68, a simple JSON document was kept in source, however after 68, a different format (PDL) is used that requires a small script to run to expand it back into JSON.

Thus, if you’re using the latest version of the generator to generate the definition prior to 68, the PDL file doesn’t exist in the chromium source tree and you’ll need to get a prior version of this generator as well.

You can see the prior method of retrieving the definition here: aec80f9#diff-a25901bacf09831febf2d106fb72a783

(Note that in the checkin comment where it says 38.x it really means 68.x)

HTH,

@SmolinsCo
Copy link
Author

SmolinsCo commented Nov 10, 2018

@Oceanswave Thanks, but why not combine both ways in last generator version?
Or at least describe it in README.md (how to "get a prior version of this generator")

@Oceanswave
Copy link
Member

No reason - that’s a good idea. Guess I never expected someone to want to generate the code Chrome version that was not latest and not rely on a previous version of the nuget runtime. I’ll make a note in the readme as you suggest/make the conditional. There’s actual a 3rd condition where the location changed once before (58 perhaps? Need to research)

@amaitland amaitland linked a pull request Sep 12, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants