Skip to content

Electron 15: TypeError: performance.getEntriesByType is not a function or its return value is not iterable #137366

@bpasero

Description

@bpasero

Steps to Reproduce:

  1. git co electron-16.x.y
  2. yarn && yarn watch
  3. scripts/code.sh
[main 2021-11-17T12:35:07.230Z] TypeError: performance.getEntriesByType is not a function or its return value is not iterable
    at getMarks (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/base/common/performance.js:65:39)
    at WindowsMainService.openInBrowserWindow (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/platform/windows/electron-main/windowsMainService.js:956:55)
    at WindowsMainService.doOpenFolderOrWorkspace (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/platform/windows/electron-main/windowsMainService.js:424:25)
    at /Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/platform/windows/electron-main/windowsMainService.js:349:40
    at Array.forEach (<anonymous>)
    at WindowsMainService.doOpen (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/platform/windows/electron-main/windowsMainService.js:342:34)
    at WindowsMainService.open (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/platform/windows/electron-main/windowsMainService.js:152:72)
    at CodeApplication.openFirstWindow (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/code/electron-main/app.js:588:39)
    at /Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/code/electron-main/app.js:256:85
    at InstantiationService.invokeFunction (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/platform/instantiation/common/instantiationService.js:44:24)
    at CodeApplication.startup (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/code/electron-main/app.js:256:53)
    at async CodeMain.startup (/Users/bpasero/Development/Microsoft/vscode-electron-15.x/out/vs/code/electron-main/main.js:43:17)

The underlying issue seems to be that starting with node.js 16 there is a global performance defined and our checks in performance.js confuse that with the DOM performance type.

//cc @deepak1556

Metadata

Metadata

Assignees

Labels

electron-16-updateIssues related to electron 16 updatemitigatedIssue has workaround in place

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions