Fix CookiePartitionKeyConverter to support string deserialization#3075
Merged
Fix CookiePartitionKeyConverter to support string deserialization#3075
Conversation
…erialization Co-authored-by: kblok <2198466+kblok@users.noreply.github.com>
Copilot
AI
changed the title
Fix deserialization issue in CookiePartitionKeyConverter
Fix CookiePartitionKeyConverter to support string deserialization
Jan 5, 2026
This was referenced Feb 2, 2026
This was referenced Feb 9, 2026
This was referenced Feb 16, 2026
This was referenced Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
CookiePartitionKeyConverteronly handled object format from CDP, preventing round-trip serialization when users save cookies to files and reload them.Changes
CookiePartitionKeyConverter.Read()JsonTokenType.String, otherwise extracttopLevelSitefrom object{"topLevelSite": "...", "hasCrossSiteAncestor": false}and string format"https://example.com"CookiePartitionKeyConverter.Write()Tests
CookiePartitionKeyConverterTests.cscovering round-trip serialization, both input formats, null handling, and arraysExample
Aligns with upstream puppeteer's
partitionKey?: CookiePartitionKey | stringtype.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.101/linux64/chrome-linux64.zip/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/PuppeteerSharp.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/PuppeteerSharp.Tests.deps.json /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/testhost.dll --port 40463 --endpoint 127.0.0.1:040463 --role client --parentprocessid 5724 --telemetryoptedin false xtTests.cs(http block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/PuppeteerSharp.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/PuppeteerSharp.Tests.deps.json /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/testhost.dll --port 36163 --endpoint 127.0.0.1:036163 --role client --parentprocessid 6440 --telemetryoptedin false Tests.cs(http block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/PuppeteerSharp.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/PuppeteerSharp.Tests.deps.json /home/REDACTED/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp.Tests/bin/Release/net8.0/testhost.dll --port 46605 --endpoint 127.0.0.1:046605 --role client --parentprocessid 7136 --telemetryoptedin false ests.cs(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.