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

Missing decoder for embedded PageState object #29

Open
JBetz opened this issue Jan 4, 2025 · 2 comments
Open

Missing decoder for embedded PageState object #29

JBetz opened this issue Jan 4, 2025 · 2 comments

Comments

@JBetz
Copy link

JBetz commented Jan 4, 2025

The original blogpost for this toolkit explains how the PageState is encoded in UpdateTabNavigation commands. However, I've been unable to successfully decode a session file as specified, so the encoding rules seems to have changed since then.

Does anyone know if the new encoding format is documented anywhere, or of any projects that have successfully implemented a decoder for PageState?

@JBetz
Copy link
Author

JBetz commented Jan 5, 2025

One observation is that the original URL seems to start around byte 213 of the particular PageState I'm trying to decode, and not at the very beginning as I would expect based on the definition of the PageState in Chromium source.

So maybe MojoPageState serializes with a header that contains more than just the PageObject's size. Or I'm working with the entirely wrong slice of the SessionCommand, though everything I parsed before and after PageState looks correct.

@AlexC-CCL
Copy link
Contributor

Hi Joe, the new format is indeed completely different to the one in that (now very old) blog post. It looks to be using the Mojo/Mojam format which from continued poking around the Chromium source may well be customized per-platform. You can skip past it in the Commands because it is given a length, but I haven't been able to reliably decode it yet.

It is on the list of things I'd like to get implemented when time allows though - there are other, lower-hanging fruit that might take precedence though.

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