puppeteer-firefox: ERROR: failed to call method 'Browser.deleteCookies'
See original GitHub issueI receive the following error when I try to run the following example using puppeteer-firefox version 0.5.0:
const pptrFirefox = require('puppeteer-firefox');
(async () => {
const browser = await pptrFirefox.launch({headless: false});
const page = await browser.newPage();
await page.goto('https://www.google.com');
await page.setCookie({name: 'mycookie', value: 'myvalue'});
})();
$ node sample.js
(node:92226) UnhandledPromiseRejectionWarning: Error: Protocol error (Browser.deleteCookies): ERROR: failed to call method 'Browser.deleteCookies' with parameters {
"browserContextId": null,
"cookies": [
{
"url": "https://www.google.com/",
"name": "mycookie"
}
]
}
Expected "<root>.browserContextId" to be |string|; found |object| `null` instead. _dispatch@chrome://juggler/content/protocol/Dispatcher.js:100:15
at node_modules/puppeteer-firefox/lib/Connection.js:74:56
at new Promise (<anonymous>)
at Connection.send (node_modules/puppeteer-firefox/lib/Connection.js:73:12)
at Page.deleteCookie (node_modules/puppeteer-firefox/lib/Page.js:115:22)
at Page.<anonymous> (node_modules/puppeteer-firefox/lib/helper.js:32:23)
at Page.setCookie (node_modules/puppeteer-firefox/lib/Page.js:135:16)
at Page.<anonymous> (node_modules/puppeteer-firefox/lib/helper.js:32:23)
at sample.js:6:14
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Why does not work Puppeteer-firefox on servers?
I had the same problem (failed to Launch Firefox) on my VPS Windows. So i went to node_modules/puppeteer-firefox/.local-browser/.
Read more >Puppeteer | Puppeteer
Create an automated testing environment using the latest JavaScript and browser features. Capture a timeline trace of your site to help diagnose performance ......
Read more >mozilla-release: changeset 564654 ... - Mercurial
waitForSelector(selector[, options])](#pagewaitforselectorselector-options) +Puppeteer methods might throw errors if they are unable to fulfill a request.
Read more >Puppeteer documentation - DevDocs
Puppeteer methods might throw errors if they are unable to fulfill a request. ... After calling disconnect , the Browser object is considered...
Read more >How to Run Puppeteer with Firefox Instead of Chrome
You can use automation tool like Puppeteer to carry out automated testing on these browsers. What is Puppeteer. Puppeteer is a Node library...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m closing this issue since the experimental
puppeteer-firefox
package is no longer maintained. A replacement will be available later this year. You can learn more about Mozilla’s work on this at https://wiki.mozilla.org/RemoteSee also https://github.com/puppeteer/puppeteer/pull/5137
still getting ERROR: failed to call method ‘Browser.getCookies’ using: