Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evaluateOnNewDocument is broken on firefox #6163

Closed
elharrak-bouygues opened this issue Jul 5, 2020 · 10 comments
Closed

evaluateOnNewDocument is broken on firefox #6163

elharrak-bouygues opened this issue Jul 5, 2020 · 10 comments

Comments

@elharrak-bouygues
Copy link

elharrak-bouygues commented Jul 5, 2020

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 5.0.0 (and 3.3.0)
  • Platform / OS version: MacOS 10.15.5
  • Node.js version: v12.14.0

What steps will reproduce the problem?

  1. Run this code
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    product: 'firefox',
  });
  const page = await browser.newPage();
  await page.evaluateOnNewDocument(() => {
    window.addEventListener('DOMContentLoaded', () => console.log('Loaded!'));
  });
  page.on('console', (msg) => console.log(msg.text()));
  await page.goto('http://example.com');

  await browser.close();
})();

What is the expected result?
Print Loaded!on console.

What happens instead?
It doesn’t print Loaded!

Note:
It works on chrome.

@elharrak-bouygues
Copy link
Author

Here is my console outputs when running with dumpio: true:

*** You are running in headless mode.
DevTools listening on ws://localhost:59266/devtools/browser/803e566d-14bb-074a-92df-37b0f55a82fa
[GFX1-]: Receive IPC close with reason=AbnormalShutdown
Exiting due to channel error.
[GFX1-]: Receive IPC close with reason=AbnormalShutdown
[GFX1-]: Receive IPC close with reason=AbnormalShutdown
Exiting due to channel error.
Exiting due to channel error.

@jackfranklin
Copy link
Collaborator

@mjzffr @whimboo might be one for you :)

@mjzffr
Copy link
Contributor

mjzffr commented Jul 7, 2020

The corresponding protocol-level work in Firefox is tracked at https://bugzilla.mozilla.org/show_bug.cgi?id=1601695

@mjzffr
Copy link
Contributor

mjzffr commented Jul 7, 2020

@jackfranklin @mathiasbynens It would be helpful to have issue labels to distinguish client versus server browser-specific issues, e.g. firefox-client for an issue at the Puppeteer level, e.g. with launch/install and just firefox for protocol implementation such as this issue.

@elharrak-bouygues
Copy link
Author

@mjzffr Thank you for the tracking link.
If I understand correctly, it is not a bug, it is just not implemented yet!
Since all this ticket dependencies are resolved, Do you know when to expect an implementation? and if there is a temporary workaround/hack?

@mjzffr
Copy link
Contributor

mjzffr commented Jul 7, 2020

@elharrak-bouygues That's right, Firefox support is still experimental. I'm not aware of a specific timeline, but this part of the protocol has a higher priority than other features.

@dev-point-team
Copy link

i hop this get high priority

@HMaker
Copy link

HMaker commented Sep 25, 2021

It's broken in Firefox Nightly r94.0a1 which is used by puppeteer 10.4.0 too. From what I saw in mozilla's bug tracker that bug was not assigned to anyone.

@stale
Copy link

stale bot commented Jun 23, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 23, 2022
@whimboo
Copy link
Collaborator

whimboo commented Jun 24, 2022

Sorry but we don't have the bandwidth to actually implemement this requested feature in Firefox. As such closing the issue.

Note that we also track in on our side via https://bugzilla.mozilla.org/show_bug.cgi?id=1601695.

@whimboo whimboo closed this as completed Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants