-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Webpages containing CSS.paintWorklet.addModule crashes lighthouse #15739
Comments
Thanks, I can repro this on CLI but not DevTools. |
I was able to create a repro with the following Puppeteer script import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({
headless: false,
});
const page = await browser.newPage();
const session = await page.createCDPSession();
session.on('sessionattached', async s => {
await s.send('Network.enable');
await s.send('Runtime.runIfWaitingForDebugger');
});
await session.send('Target.setAutoAttach', {
autoAttach: true,
flatten: true,
waitForDebuggerOnStart: true,
})
await page.goto('http://localhost:8080/css-paint.html');
await browser.close(); Looks like the paint worklet creates a new worker session but this worker session does not allow In the meantime, it might make sense to ignore the |
The upstream issue has been fixed but I still think we should land #15740 to prevent errors attaching to worker targets from being fatal errors. |
I'm still seeing this error in the 12.0.0 release. Should it be working? |
Yeah this is still happening although not in the exact same way.
|
Thanks @adamraine. Is there any possible workaround to use a paintWorklet? If not I may just find a way to use some SVG's instead. |
Checking on this! Using paint worklets to get a squircle effect on some divs, but may need to pause my usage there if it completely breaks lighthouse... |
@slimshreydy I believe this error was fixed for us 6 months ago. We also use a paintworklet to mask a squircle. But if you still get this error you can give the lighthouse browser a mark (user agent or a window variable) so that you can skip your paint worklets. |
FAQ
URL
https://jsbin.com/cayahawahi/edit?html,output
What happened?
We have a webpage that uses the CSS Painting API to paint a mask on a div and use
CSS.paintWorklet.addModule
to load the paint worklet.But when the
CSS.paintWorklet.addModule
function is executed lighthouse loses the connection to DevTools and closes the Chrome browser because of the errorUnhandled Rejection. Reason: ProtocolError: Protocol error (Network.enable): 'Network.enable' wasn't found
Webpage screenshot:
What did you expect?
Lighthouse should not crash when a paint worklet module is being loaded.
What have you tried?
I was able to successfully create a CDPSession in a puppeteer script without any crashes. This was without lighthouse.
This was the puppeteer script:
How were you running Lighthouse?
CLI, node
Lighthouse Version
11.4.0
Chrome Version
119.0.6045.105
Node Version
20.9.0
OS
Windows 11
Relevant log output
The text was updated successfully, but these errors were encountered: