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

cdp: cdpcli compatibility #285

Merged
merged 9 commits into from
Jan 13, 2025
Merged

cdp: cdpcli compatibility #285

merged 9 commits into from
Jan 13, 2025

Conversation

krichprollsch
Copy link
Member

Effort to accept the command cdpcli -verbose -cdp ws://127.0.0.1:9222/devtools/browser/main -runs=1 eval.

@krichprollsch
Copy link
Member Author

I have an issue with a command sent by chromedp having sessionId key before the method:

{"id":3,"sessionId":"65618675CB7D3585A95049E9DFE95EA9","method":"Runtime.enable"}

It breaks the do method read. It's easy to fix but the sessionId will then miss from the getMsg function, resulting potential issues into the cdp functions.

I don't really know actually how to fix this issue.

@krichprollsch
Copy link
Member Author

krichprollsch commented Oct 25, 2024

The sessionId returned by the inspector is invalid:

2024/10/25 18:20:30 -> {"id":3,"sessionId":"65618675CB7D3585A95049E9DFE95EA9","method":"Runtime.enable"}
2024/10/25 18:20:30 <- {"id":3,"result":{},"sessionId":"4FDC2CB760A23A220497A05C95417CF4"}

It returns the ContextSessionID instead of he BrowserContextID...

@krichprollsch krichprollsch merged commit 73bb14e into main Jan 13, 2025
9 checks passed
@krichprollsch krichprollsch deleted the cdp-cdpcli branch January 13, 2025 17:16
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CDP Chrome Debug Protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant