lighthouse: "Ni.connect is not a function" when testing in DevTools
Developer’s Note
The fix for this should be released on all Chrome channels:
Stable - 116.0.5845.140 Beta - 117.0.5938.35 Dev - 118.0.5951.0 Canary - 118.0.5939.0
If you are still experiencing this issue, please verify that your Chrome is up to date before reporting.
FAQ
- Yes, my issue is not about variability or throttling.
- Yes, my issue is not about a specific accessibility audit (file with axe-core instead).
URL
https://mini-project-lighthouse.herokuapp.com/
What happened?
When trying to run an audit, received an error and was unable produce an audit. Sometimes and audit would work, but only the PWA audit report was displayed/created.
What did you expect?
Expected to generate a full audit report. All audit settings selected. Only the PWA section was generated sometimes. Issues replicated in incognito.
What have you tried?
Using latest chrome browser, restarted browser, removed/re-installed extension, and allowed incognito extension use.
How were you running Lighthouse?
WebPageTest
Lighthouse Version
100.0.0
Chrome Version
115.0.5790.102
Node Version
No response
OS
Windows 10
Relevant log output
Ni.connect is not a function
Channel: DevTools
Initial URL: https://mini-project-lighthouse.herokuapp.com/
Chrome Version: 115.0.0.0
Stack Trace: TypeError: Ni.connect is not a function
at devtools://devtools/bundled/devtools-frontend/front_end/third_party/lighthouse/lighthouse-dt-bundle.js:618:972
at Runner.gather (devtools://devtools/bundled/devtools-frontend/front_end/third_party/lighthouse/lighthouse-dt-bundle.js:524:349)
at navigationGather (devtools://devtools/bundled/devtools-frontend/front_end/third_party/lighthouse/lighthouse-dt-bundle.js:618:858)
at async navigation (devtools://devtools/bundled/devtools-frontend/front_end/third_party/lighthouse/lighthouse-dt-bundle.js:620:940)
at async i (devtools://devtools/bundled/devtools-frontend/front_end/entrypoints/lighthouse_worker/lighthouse_worker.js?remoteBase=https%3A%2F%2Fchrome-devtools-frontend.appspot.com%2Fserve_file%2F%4090efd4b0ad6aa15eeafcdabd5817ae939f7ba059%2F:1:2668)
at async self.onmessage (devtools://devtools/bundled/devtools-frontend/front_end/entrypoints/lighthouse_worker/lighthouse_worker.js?remoteBase=https%3A%2F%2Fchrome-devtools-frontend.appspot.com%2Fserve_file%2F%4090efd4b0ad6aa15eeafcdabd5817ae939f7ba059%2F:1:3056)
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 21
- Comments: 33 (7 by maintainers)
Commits related to this issue
- [Lighthouse] Throw if the page handle is null It is possible for the page handle to be null. Lighthouse will still throw an error but it does not reference the actual problem: https://github.com/Goo... — committed to ChromeDevTools/devtools-frontend by adamraine a year ago
- [Lighthouse] Use target ID instead of frame ID for target filter Lighthouse bug: https://github.com/GoogleChrome/lighthouse/issues/15300 Bug: None Change-Id: I218372aa27699b2e744813a3ab228f9db3464c2... — committed to ChromeDevTools/devtools-frontend by adamraine a year ago
- [M117][Lighthouse] Use target ID instead of frame ID for target filter Lighthouse bug: https://github.com/GoogleChrome/lighthouse/issues/15300 Bug: None Change-Id: I218372aa27699b2e744813a3ab228f9db... — committed to ChromeDevTools/devtools-frontend by adamraine a year ago
- [M116][Lighthouse] Use target ID instead of frame ID for target filter Lighthouse bug: https://github.com/GoogleChrome/lighthouse/issues/15300 Bug: 1472050 Change-Id: I218372aa27699b2e744813a3ab228f... — committed to ChromeDevTools/devtools-frontend by adamraine a year ago
I am on Vivaldi, and the error persists.
To avoid other Vivaldi users repeating my work, I have filed a report relating to this issue with Vivaldi: VB-99984
This started occurring for me after updating to Version 115.0.5790.102 (Official Build) (x86_64), MacOS 13.4, all Lighthouse modes unavailable.
When mode = Navigation:
Ni.connect is not a function
When mode = Timespan, notification of timespan started and you can interact with the page, however on stopping the following is thrown:
Cannot end a timespan before starting one
When mode = Snapshot
Cannot read properties of null (reading ‘target’)
SOLVED (for me) - by restarting Chrome.
Good to know
Hi. Dev here.
We’re having trouble reproducing this so… if you want to poke around… we’d appreciate some more debugging details.
Unfortunately since we run lighthouse in a webworker… this is not trivial debugging.
puppeteer.js
, go to the very bottom and place a breakpoint on the return statement:e
l.pages().then(pages => console.warn(pages.length))
A
e.mainFrameId
that’s undefined/null would be a problem And… a length of 0 would also be very surprising. But… both might indicate the problem.Thanks
I’m running into the same error on 115.0.5790.114
metoo,MacOs 12.5 ,Chrome version 116.0.5845.96
The same error (incognito or not - doesn’t matter)
Mi.connect is not a function
MacOS, Version 116.0.5845.96 (Official Build) (arm64)