dfindexeddb.errors.ParserError: Unsupported header from "Version16" blink from Chrome v149
- Dominant language
- Python
- Stars
- 55
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
```
/lnk/tools/python-venvs/common-venv/bin/dfindexeddb blink --source blink_file --output json
Traceback (most recent call last):
File "/lnk/tools/python-venvs/common-venv/bin/dfindexeddb", line 8, in
sys.exit(App())
^^^^^
File "/home/nas-user/tools/python-venvs/common-venv/lib/python3.11/site-packages/dfindexeddb/indexeddb/cli.py", line 413, in App
args.func(args)
File "/home/nas-user/tools/python-venvs/common-venv/lib/python3.11/site-packages/dfindexeddb/indexeddb/cli.py", line 90, in BlinkCommand
blink_value = blink.V8ScriptValueDecoder.FromBytes(buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nas-user/tools/python-venvs/common-venv/lib/python3.11/site-packages/dfindexeddb/indexeddb/chromium/blink.py", line 1060, in FromBytes
return cls(data).Deserialize()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nas-user/tools/python-venvs/common-venv/lib/python3.11/site-packages/dfindexeddb/indexeddb/chromium/blink.py", line 1041, in Deserialize
raise errors.ParserError("Unsupported header")
dfindexeddb.errors.ParserError: Unsupported header
```
`blink_file` was generated by Chrome "Version 149.0.7827.103 (Official Build) (64-bit)"
`dfindexeddb -h` reports `Version 20260205`.
A bit of debugging leads to [chromium/v8.py:L93](https://github.com/google/dfindexeddb/blob/a8e6dcf67f05d7d543528198dc3d4a5a2826cf09/dfindexeddb/indexeddb/chromium/v8.py#L93) where the blink file contains Version 16, but `LATEST_VERSION` is 15.
As a workaround, I've set `LATEST_VERSION` ([L65](https://github.com/google/dfindexeddb/blob/a8e6dcf67f05d7d543528198dc3d4a5a2826cf09/dfindexeddb/indexeddb/chromium/v8.py#L65)) to 16 and it generates plausible looking json once again, instead of the `ParserError`.
My blink file comes from an old Chrome extension, so I'm assuming it isn't using any of the new features(?) from "blink version 16", but I'm guessing a proper fix will need to see what's new in v16 and be handled appropriately, not just changing `LATEST_VERSION`...
Contributor guide
Assessment
This issue has not been assessed yet.