0

Hi I have a Puppeteer that launches the native chrome.exe and I tried to intercept a request and console.log it's headers.

As shown below in the Screenshot it does not show me all the headers.

enter image description here

On chrome's Network Tab, I'm able to see all the headers that are missing as indicated by the red arrow drawn. I suspect it has something to do with the prompt "Provisional headers are shown". I'm not really too sure what this means. Could anyone help me out please?

SunAwtCanvas
  • 1,261
  • 1
  • 13
  • 38

1 Answers1

1

There is an already answered question about how to handle "Provisional headers are shown" warnings. From here not the top answers but the one that suggests "Disable site isolation" chrome launch flag can help.

According to the peter.sh page it:

[d]isables site isolation. Note that the opt-in (to site-per-process, isolate-origins, etc.) via enterprise policy and/or cmdline takes precedence over the kDisableSiteIsolation switch (i.e. the opt-in takes effect despite potential presence of kDisableSiteIsolation switch). Note that for historic reasons the name of the switch misleadingly mentions "trials", but the switch also disables the default site isolation that ships on desktop since M67. The name of the switch is preserved for backcompatibility of chrome://flags.

It is most likely an HSTS or CORS-related phenomenon, and it is probably safe to disable the site isolation in your case.

Try to launch your puppeteer like this:

const browser = await puppeteer.launch({ args: ['--disable-site-isolation-trials'] })
theDavidBarton
  • 7,643
  • 4
  • 24
  • 51
  • 1
    Hi thanks for your reply. I have this flag already on my puppeteer launch arguments. It does not help in my case :( – SunAwtCanvas Oct 31 '21 at 20:43
  • I see. I suggest you update your question with your launch parameters (similar snippet to mine). you can avoid that you'll get suggestions that you are already using/tried. – theDavidBarton Oct 31 '21 at 21:09