Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Network.getAllCookies returns empty array #181

Open
1 of 3 tasks
seifti opened this issue May 25, 2022 · 0 comments
Open
1 of 3 tasks

Network.getAllCookies returns empty array #181

seifti opened this issue May 25, 2022 · 0 comments

Comments

@seifti
Copy link

seifti commented May 25, 2022

Describe the bug

I'm using this library https://packagist.org/packages/nesk/puphpeteer to get cookies from specific sites.

I've run some tests, and in some cases, I actually get some cookies, but I have no clue why for https://lanzadera.es/ I'm getting no cookies?

If I check my chrome browser, I can see the following cookies being dropped even before the cookie message is accepted:

  • _ga
  • _gid
  • _uetsid
  • _uetvid

However, I get none of them when running the below:

$this->puppeteer = new Puppeteer();
$this->browser = $this->puppeteer->launch(['args' => ['--no-sandbox', '--disable-setuid-sandbox']]);
$this->page = $this->browser->newPage();
$this->page->goto($href, ['waitUntil' => 'networkidle2']);
$this->page->_client->send('Network.getAllCookies');

Generated logs
No logs are generatedç

Environment (please complete the following information):

  • Ubuntu 22.04
  • Node version: v16.2.0
  • PHP version: 8.0.19

My Node package manager is:

  • NPM (specify the version)
  • Yarn (specify the version)
  • Other (specify the name and version)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant