question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnknownMethodError Page.setInterceptFileChooserDialog

See original GitHub issue

Steps to reproduce

Just tried puppeteer for the first time, with Firefox and got this error…

Tell us about your environment:

  • Puppeteer version: 2.1.0
  • Platform / OS version: Windows 10
  • Node.js version: v12.9.1
  • Firefox Version: 72.0.2 (64-bits)

What steps will reproduce the problem?

process.env.DEBUG = "puppeteer:protocol";

const puppeteer = require('puppeteer');

(async function main(){
  
  const browser = await puppeteer.launch({
    product: "firefox",
    executablePath: "C:\\Program Files\\Mozilla Firefox\\firefox.exe"
  });

  try {
    await browser.newPage();
  } catch (err) {
    console.error('Error while opening page', err);
  }

  await browser.close();
})()

What happens instead?

Got an error.

C:\dev\node-v12.9.1-win-x64\node.exe --inspect-brk=30808 test.js 
Debugger listening on ws://127.0.0.1:30808/29af9084-6348-471f-a963-af4272a75801

For help, see: https://nodejs.org/en/docs/inspector

Debugger attached.

2020-01-28T22:29:43.970Z puppeteer:protocol SEND ► {"method":"Target.setDiscoverTargets","params":{"discover":true},"id":1}
2020-01-28T22:29:43.976Z puppeteer:protocol ◀ RECV {"method":"Target.targetCreated","params":{"targetInfo":{"browserContextId":null,"targetId":10,"type":"page","url":"about:blank"}}}
2020-01-28T22:29:43.978Z puppeteer:protocol ◀ RECV {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"8b3bcb2a-7238-437a-bbdf-8bf45efb96a3","type":"browser"}}}
2020-01-28T22:29:43.979Z puppeteer:protocol ◀ RECV {"id":1}
2020-01-28T22:29:43.980Z puppeteer:protocol SEND ► {"method":"Target.createTarget","params":{"url":"about:blank"},"id":2}
2020-01-28T22:29:43.989Z puppeteer:protocol ◀ RECV {"method":"Target.targetCreated","params":{"targetInfo":{"browserContextId":null,"targetId":12,"type":"page","url":"about:blank"}}}
2020-01-28T22:29:44.007Z puppeteer:protocol ◀ RECV {"id":2,"result":{"targetId":12}}
2020-01-28T22:29:44.011Z puppeteer:protocol SEND ► {"method":"Target.attachToTarget","params":{"targetId":12,"flatten":true},"id":3}
2020-01-28T22:29:44.026Z puppeteer:protocol ◀ RECV {"method":"Target.attachedToTarget","params":{"targetInfo":{"type":"page"},"sessionId":1}}
2020-01-28T22:29:44.027Z puppeteer:protocol ◀ RECV {"id":3,"result":{"sessionId":1}}
2020-01-28T22:29:44.029Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Page.enable","params":{},"id":4}
2020-01-28T22:29:44.029Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Page.getFrameTree","params":{},"id":5}
2020-01-28T22:29:44.030Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":false,"flatten":true},"id":6}
2020-01-28T22:29:44.031Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Performance.enable","params":{},"id":7}
2020-01-28T22:29:44.031Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Log.enable","params":{},"id":8}
2020-01-28T22:29:44.032Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Page.setInterceptFileChooserDialog","params":{"enabled":true},"id":9}
2020-01-28T22:29:44.033Z puppeteer:protocol ◀ RECV {"sessionId":1,"id":6}
2020-01-28T22:29:44.036Z puppeteer:protocol ◀ RECV {"sessionId":1,"id":4}
2020-01-28T22:29:44.036Z puppeteer:protocol ◀ RECV {"sessionId":1,"id":5,"result":{"frameTree":{"frame":{"id":25,"url":"about:blank","loaderId":null,"securityOrigin":null,"mimeType":null},"childFrames":[]}}}
2020-01-28T22:29:44.038Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Page.setLifecycleEventsEnabled","params":{"enabled":true},"id":10}
2020-01-28T22:29:44.038Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Runtime.enable","params":{},"id":11}
2020-01-28T22:29:44.039Z puppeteer:protocol SEND ► {"sessionId":1,"method":"Network.enable","params":{},"id":12}
2020-01-28T22:29:44.040Z puppeteer:protocol ◀ RECV {"sessionId":1,"id":7}
2020-01-28T22:29:44.045Z puppeteer:protocol ◀ RECV {"sessionId":1,"id":12}
2020-01-28T22:29:44.046Z puppeteer:protocol ◀ RECV {"sessionId":1,"id":8}
2020-01-28T22:29:44.046Z puppeteer:protocol ◀ RECV {"id":9,"sessionId":1,"error":{"message":"Page.setInterceptFileChooserDialog","data":"RemoteAgentError@chrome://remote/content/Error.jsm:25:5\nUnknownMethodError@chrome://remote/content/Error.jsm:108:7\nexecute@chrome://remote/content/domains/Domains.jsm:96:13\nreceiveMessage@chrome://remote/content/sessions/ContentProcessSession.jsm:69:45\n"}}
2020-01-28T22:29:44.046Z puppeteer:protocol ◀ RECV {"sessionId":1,"id":10}

null: Error while opening page
null: Error: Protocol error (Page.setInterceptFileChooserDialog): Page.setInterceptFileChooserDialog RemoteAgentError@chrome://remote/content/Error.jsm:25:5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mikhasdcommented, Jan 29, 2020

It looks like you’re using Firefox 72. The experimental support for Firefox works best with Firefox Nightly (currently 74).

cc @mjzffr who’s the expert here

I haven’t found any indication of what FF version should be used. But that should be the root cause.

0reactions
mjzffrcommented, Feb 4, 2020

It looks like you’re using Firefox 72. The experimental support for Firefox works best with Firefox Nightly (currently 74). cc @mjzffr who’s the expert here

I haven’t found any indication of what FF version should be used. But that should be the root cause.

Yes, that error should go away if you use Firefox Nightly (74).

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebDriver/RemoteProtocol/Meetings/2019/11/15 - MozillaWiki
setInterceptFileChooserDialog is a low hanging fruit. ... I've put the details in the agenda for this meeting; maja_zf: Page.type is Puppeteer method.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found