lighthouse: Extension Error: Failed to construct 'URL': Invalid URL
Lighthouse Version: 1.3.1 Chrome Version: 55.0.2883.95 Error Message: Failed to construct ‘URL’: Invalid URL Stack Trace:
at artifacts.DateNowUse.usage.filter.err (chrome-extension://blipmdconlkpinefehnmjammfjpmpbjk/scripts/lighthouse-background.js:1047:39)
at Array.filter (native)
at Function.audit (chrome-extension://blipmdconlkpinefehnmjammfjpmpbjk/scripts/lighthouse-background.js:1046:48)
at Promise.resolve.then._ (chrome-extension://blipmdconlkpinefehnmjammfjpmpbjk/scripts/lighthouse-background.js:11388:20)```
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20 (8 by maintainers)
Commits related to this issue
- Fixes #1282 — committed to GoogleChrome/lighthouse by ebidel 8 years ago
- Fixes #1282 (#1288) * Fixes #1282 * Use getEvalOrigin and filter out crx usage * feedback — committed to andrewrota/lighthouse by ebidel 7 years ago
@elodszopos Can also confirm that disabling “Redux DevTools” extension resolve the issue.
@zalmoxisus, yea we’ll have to protect against this in LH. Other popular extensions that inject content scripts will eventually hit the same issues.
Redux DevTools Extension creator here.
@ebidel, is there anything we can do from our side to solve these issues? As you noticed the script is injected as one string here into the
script
tag. When injected it as a separate file it has no issues with lighthouse. The reason for the first approach is that we need to load the extension’s script before the client script (otherwise he wouldn’t be able to apply Redux DevTools enhancer to the store).Date.now()
comes from here and from lodash.I can reproduce the issue by just using:
UPDATE: Tried the build from #1288 and it fixes the issue.