Skip to content

Conversation

Manny651
Copy link
Contributor

Calling GoToAsync without specifying a ReferrerPolicy option now raises an exception when used with the latest Chromium builds for Linux:

PuppeteerSharp.MessageException: Protocol error (Page.navigate): Invalid referrerPolicy
at Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in Helpers/TaskHelper.cs:line 188
at Cdp.CdpCDPSession.SendAsync(String method, Object args, Boolean waitForCallback, CommandOptions options) in Cdp/CdpCDPSession.cs:line 113
at PuppeteerSharp.CDPSession.SendAsync[T](String method, Object args, CommandOptions options) in PuppeteerSharp/CDPSession.cs:line 48
at PuppeteerSharp.Cdp.CdpFrame.<>c__DisplayClass15_0.<g__NavigateAsync|0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpFrame.cs:line 113
at Cdp.CdpFrame.GoToAsync(String url, NavigationOptions options) in Cdp/CdpFrame.cs:line 95
at Cdp.CdpFrame.GoToAsync(String url, NavigationOptions options) in Cdp/CdpFrame.cs:line 106

After researching the Chromium codebase, my understanding is that CDP does not accept empty strings for the ReferrerPolicy parameter. This specific validation message seems to originate from chromium/chromium@57103b9

@kblok
Copy link
Member

kblok commented Jun 18, 2025

Thank you!

@kblok
Copy link
Member

kblok commented Jun 18, 2025

@Manny651 Don't you think we should implement this https://github.com/puppeteer/puppeteer/pull/13954/files ?

@Manny651
Copy link
Contributor Author

@kblok Yes, I added that same logic.

@kblok kblok merged commit 459b57d into hardkoded:master Jul 4, 2025
20 of 22 checks passed
@joelgriffith
Copy link

Seeing this issue on Chrome 139 -- has this fix been deployed to a version yet or does 139 re-introduce this?

@kblok
Copy link
Member

kblok commented Jul 15, 2025

@joelgriffith I just shipped it. Did you try v20.2.1?

@joelgriffith
Copy link

Not yet, will give it a shot and report back -- thanks!

@carkcib1
Copy link

Thank you @Manny651

gord5500 added a commit to Brightspace/bmx that referenced this pull request Aug 21, 2025
### Why

We are seeing passwordless auth failing and likely is related to this
change here hardkoded/puppeteer-sharp#2924 .
Bumping the version that includes this change should be enough

### Ticket

VUL-3643
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

Successfully merging this pull request may close these issues.

4 participants