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

fetch developer version protocol need a fix #40

Closed
c0b opened this issue Aug 1, 2016 · 4 comments
Closed

fetch developer version protocol need a fix #40

c0b opened this issue Aug 1, 2016 · 4 comments
Labels

Comments

@c0b
Copy link
Contributor

c0b commented Aug 1, 2016

recently I found fetching protocol failed with this; so the protocol.json has divided into 2 parts, maybe here just need to switch to the browser_protocol.json ?

➸ curl -s 'https://chromium.googlesource.com/chromium/src/+/84cc4cdf21633b6209f2561e78fea87d40e84329/third_party/WebKit/Source/devtools/protocol.json?format=TEXT'
VGhlIHByb3RvY29sLmpzb24gaGFzIHNwbGl0IGludG8gc2VwYXJhdGUgZmlsZXMuIGh0dHBzOi8vY3JidWcuY29tLzU4MDMzNwoKT25lIGZvciB0aGUgYnJvd3Nlciwgb25lIGZvciBhIFY4IGphdmFzY3JpcHQgZW52aXJvbm1lbnQ6CiAgICBzcmMvdGhpcmRfcGFydHkvV2ViS2l0L1NvdXJjZS9jb3JlL2luc3BlY3Rvci9icm93c2VyX3Byb3RvY29sLmpzb24KICAgIHNyYy90aGlyZF9wYXJ0eS9XZWJLaXQvU291cmNlL3BsYXRmb3JtL3Y4X2luc3BlY3Rvci9qc19wcm90b2NvbC5qc29uCgpCcm93c2FibGUgaGVyZToKICAgIGh0dHBzOi8vY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMvKy9tYXN0ZXIvdGhpcmRfcGFydHkvV2ViS2l0L1NvdXJjZS9jb3JlL2luc3BlY3Rvci9icm93c2VyX3Byb3RvY29sLmpzb24KICAgIGh0dHBzOi8vY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMvKy9tYXN0ZXIvdGhpcmRfcGFydHkvV2ViS2l0L1NvdXJjZS9wbGF0Zm9ybS92OF9pbnNwZWN0b3IvanNfcHJvdG9jb2wuanNvbgoKTW9yZSBkZXRhaWxzIG9uIHRoZSBwcm90b2NvbDoKICAgIGh0dHBzOi8vZGV2ZWxvcGVyLmNocm9tZS5jb20vZGV2dG9vbHMvZG9jcy9kZWJ1Z2dlci1wcm90b2NvbAo=

➸ node -p 'Buffer.from("VGhlIHByb3RvY29sLmpzb24gaGFzIHNwbGl0IGludG8gc2VwYXJhdGUgZmlsZXMuIGh0dHBzOi8vY3JidWcuY29tLzU4MDMzNwoKT25lIGZvciB0aGUgYnJvd3Nlciwgb25lIGZvciBhIFY4IGphdmFzY3JpcHQgZW52aXJvbm1lbnQ6CiAgICBzcmMvdGhpcmRfcGFydHkvV2ViS2l0L1NvdXJjZS9jb3JlL2luc3BlY3Rvci9icm93c2VyX3Byb3RvY29sLmpzb24KICAgIHNyYy90aGlyZF9wYXJ0eS9XZWJLaXQvU291cmNlL3BsYXRmb3JtL3Y4X2luc3BlY3Rvci9qc19wcm90b2NvbC5qc29uCgpCcm93c2FibGUgaGVyZToKICAgIGh0dHBzOi8vY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMvKy9tYXN0ZXIvdGhpcmRfcGFydHkvV2ViS2l0L1NvdXJjZS9jb3JlL2luc3BlY3Rvci9icm93c2VyX3Byb3RvY29sLmpzb24KICAgIGh0dHBzOi8vY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMvKy9tYXN0ZXIvdGhpcmRfcGFydHkvV2ViS2l0L1NvdXJjZS9wbGF0Zm9ybS92OF9pbnNwZWN0b3IvanNfcHJvdG9jb2wuanNvbgoKTW9yZSBkZXRhaWxzIG9uIHRoZSBwcm90b2NvbDoKICAgIGh0dHBzOi8vZGV2ZWxvcGVyLmNocm9tZS5jb20vZGV2dG9vbHMvZG9jcy9kZWJ1Z2dlci1wcm90b2NvbAo=", "base64").toString()'
The protocol.json has split into separate files. https://crbug.com/580337

One for the browser, one for a V8 javascript environment:
    src/third_party/WebKit/Source/core/inspector/browser_protocol.json
    src/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json

Browsable here:
    https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/core/inspector/browser_protocol.json
    https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json

More details on the protocol:
    https://developer.chrome.com/devtools/docs/debugger-protocol
@cyrus-and
Copy link
Owner

I was about to push the fix when I realized that we actually need both... the Runtime domain for example belongs to js_protocol.json.

@cyrus-and
Copy link
Owner

I've pushed a candidate fix in a new branch it would be great if you could give it a try.

@cyrus-and
Copy link
Owner

I've pushed also a new script to update the hardcoded protocol.json; if you can confirm that everything works I'll merge test-40 branch into master. Unfortunately my Chrome version is not new enough to proper test this.

@c0b
Copy link
Contributor Author

c0b commented Aug 9, 2016

I've tested with Chrome 54 it seems working.

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

No branches or pull requests

2 participants