[GH-ISSUE #2446] App does not start on Win 10 with with Error> Error occurred in handler for 'async': TypeError: Cannot read properties of undefined (reading 'setMenu') #1568

Closed
opened 2026-02-27 00:04:03 +03:00 by kerem · 2 comments
Owner

Originally created by @akod1ng on GitHub (Apr 12, 2022).
Original GitHub issue: https://github.com/electerm/electerm/issues/2446

Electerm Version(Electerm版本)

1.21.18

Platform detail (平台详情)

Microsoft Windows NT 10.0.19044.0 x64

What steps will reproduce the bug?(重新问题的详细步骤)

Starting the app shows this error when executed via CMD>
Error occurred in handler for 'async': TypeError: Cannot read properties of undefined (reading 'setMenu')
at initApp (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\init-app.js:34:19)
at Object.init (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\ipc.js:83:5)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async node:electron/js2c/browser_init:193:563

What should have happened?(期望的结果)

App should start.

Would this happen in other terminal app(是否能够在其他同类软件重现这个问题)

No. Previous version (1.20.6) worked.

Additional information(其他任何相关信息)

Error occurred in handler for 'async': TypeError: Cannot read properties of undefined (reading 'setMenu')
at initApp (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\init-app.js:34:19)
at Object.init (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\ipc.js:83:5)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async node:electron/js2c/browser_init:193:563

Originally created by @akod1ng on GitHub (Apr 12, 2022). Original GitHub issue: https://github.com/electerm/electerm/issues/2446 ### Electerm Version(Electerm版本) 1.21.18 ### Platform detail (平台详情) Microsoft Windows NT 10.0.19044.0 x64 ### What steps will reproduce the bug?(重新问题的详细步骤) Starting the app shows this error when executed via CMD> Error occurred in handler for 'async': TypeError: Cannot read properties of undefined (reading 'setMenu') at initApp (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\init-app.js:34:19) at Object.init (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\ipc.js:83:5) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async node:electron/js2c/browser_init:193:563 ### What should have happened?(期望的结果) App should start. ### Would this happen in other terminal app(是否能够在其他同类软件重现这个问题) No. Previous version (1.20.6) worked. ### Additional information(其他任何相关信息) Error occurred in handler for 'async': TypeError: Cannot read properties of undefined (reading 'setMenu') at initApp (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\init-app.js:34:19) at Object.init (C:\Users\ggg\AppData\Local\Programs\electerm\resources\app.asar\lib\ipc.js:83:5) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async node:electron/js2c/browser_init:193:563
kerem closed this issue 2026-02-27 00:04:03 +03:00
Author
Owner

@quintindunn commented on GitHub (Apr 13, 2022):

Same thing happening to me. Also upon closing the program (Could be caused by the way I closed it by right clicking on the icon on the taskbar and hitting close since there's no close button on the screen it leaves me on) I get the error

(node:30324) UnhandledPromiseRejectionWarning: Error: kill ESRCH
at process.kill (node:internal/process/per_thread:215:13)
at BrowserWindow.exports.onClose (C:\Users\T1ps\AppData\Local\Programs\electerm\resources\app.asar\lib\on-close.js:17:30)
at BrowserWindow.emit (node:events:390:28)
at BrowserWindow.exports.onClose (C:\Users\T1ps\AppData\Local\Programs\electerm\resources\app.asar\lib\on-close.js:42:14)
at BrowserWindow.emit (node:events:390:28)
(Use electerm --trace-warnings ... to show where the warning was created)
(node:30324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

<!-- gh-comment-id:1097458553 --> @quintindunn commented on GitHub (Apr 13, 2022): Same thing happening to me. Also upon closing the program (Could be caused by the way I closed it by right clicking on the icon on the taskbar and hitting close since there's no close button on the screen it leaves me on) I get the error > (node:30324) UnhandledPromiseRejectionWarning: Error: kill ESRCH at process.kill (node:internal/process/per_thread:215:13) at BrowserWindow.exports.onClose (C:\Users\T1ps\AppData\Local\Programs\electerm\resources\app.asar\lib\on-close.js:17:30) at BrowserWindow.emit (node:events:390:28) at BrowserWindow.exports.onClose (C:\Users\T1ps\AppData\Local\Programs\electerm\resources\app.asar\lib\on-close.js:42:14) at BrowserWindow.emit (node:events:390:28) (Use `electerm --trace-warnings ...` to show where the warning was created) (node:30324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Author
Owner

@zxdong262 commented on GitHub (Apr 13, 2022):

fixed in 1.21.20

<!-- gh-comment-id:1097905225 --> @zxdong262 commented on GitHub (Apr 13, 2022): fixed in 1.21.20
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#1568
No description provided.