twinkle-tray icon indicating copy to clipboard operation
twinkle-tray copied to clipboard

a javascript error occurred in the main process

Open yangchris4 opened this issue 4 years ago • 26 comments

a javascript error occurred in the main process

Uncaught Exception: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:705:16) at C:\Users\Administrator\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:1032:20 at new Promise () at refreshMonitorsJob (C:\Users\Administrator\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:1031:16) at refreshMonitors (C:\Users\Administrator\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:1091:25) at IpcMainImpl. (C:\Users\Administrator\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:1374:3) at IpcMainImpl.emit (events.js:315:20) at Object. (electron/js2c/browser_init.js:161:9692) at Object.emit (events.js:315:20)

Snipaste_2021-09-26_09-28-08

yangchris4 avatar Sep 26 '21 01:09 yangchris4

The same fault,and the solution from the Internet can not work.

menghu1994 avatar Oct 12 '21 10:10 menghu1994

This popup keeps appearing, even if I restart the app, same problem. I am on Windows 11.

[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
    at ChildProcess.target.send (internal/child_process.js:705:16)
    at C:\Users\$USER\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:1032:20
    at new Promise (<anonymous>)
    at refreshMonitorsJob (C:\Users\$USER\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:1031:16)
    at refreshMonitors (C:\Users\$USER\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:1091:25)
    at Timeout._onTimeout (C:\Users\$USER\AppData\Local\Programs\twinkle-tray\resources\app.asar\src\electron.js:2382:7)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)

[OK]

tech189 avatar Oct 22 '21 12:10 tech189

Same problem on Windows 11 Started getting this error after updating to 22483.1000

zur4ik avatar Oct 24 '21 09:10 zur4ik

Same issue here. Windows 11 22499.1000

Peter-Maguire avatar Nov 10 '21 11:11 Peter-Maguire

Yep, same issue here as well. I'm currently on 22494.1000

LPFchan avatar Nov 11 '21 21:11 LPFchan

same, 22499.1000

CeoOfFry avatar Nov 14 '21 05:11 CeoOfFry

Same

Abysmax avatar Nov 16 '21 10:11 Abysmax

It seems to primarily be a Windows 11 Insider issue, though some Windows 10 users are having it as well. I'll be looking into the issue this weekend. For now, I'm going to pin this Issue and point similar ones here. I may post an test version to this Issue for people to try if they'd like to help.

xanderfrangos avatar Nov 16 '21 14:11 xanderfrangos

Good news, I've found the source of the problem on Windows 11 Insider builds: https://winaero.com/microsoft-removed-the-wmic-tool-from-windows-11-dev-builds/

Bad news, I don't currently have an alternative. I might need to find a new way to access WMI via Node...

xanderfrangos avatar Nov 17 '21 21:11 xanderfrangos

I don't yet have a fix for WMIC being unavailable in newer Windows 11 Insider builds, but I have improved error handling relating to the error message. The following build of Twinkle Tray should work fine for DDC/CI displays on any version of Windows 11:

https://1drv.ms/u/s!AiWKFpjcSKRQhskFgapyA5bewKf4IQ?e=4qYD3G

Your laptop's internal display will NOT be listed in Twinkle Tray on this build if you are in the Windows 11 Insider program. However, if you guys can let me know if external monitors are working (and the UI in general) in the above version of Twinkle Tray, it would be greatly appreciated.

xanderfrangos avatar Nov 17 '21 23:11 xanderfrangos

Can confirm on Windows 11 22499 with that version all of my external displays are listed. Thanks!

Peter-Maguire avatar Nov 17 '21 23:11 Peter-Maguire

It's working as stated on my Windows 11 22499 too.

anhtuan23 avatar Nov 18 '21 02:11 anhtuan23

On the latest version of the Windows Insider Preview for Windows 11, I receive the same error whenever I try to access the tray icon, or use the interface in any way. The build number is 22504.1000 and I think this might be the case thanks to Microsoft's removal of WMIC as listed above. Your idea for this project is amazing, and I do hope you find a workaround soon.

TheSiZaGaming avatar Nov 18 '21 04:11 TheSiZaGaming

I don't yet have a fix for WMIC being unavailable in newer Windows 11 Insider builds, but I have improved error handling relating to the error message. The following build of Twinkle Tray should work fine for DDC/CI displays on any version of Windows 11:

https://1drv.ms/u/s!AiWKFpjcSKRQhskFgapyA5bewKf4IQ?e=4qYD3G

Your laptop's internal display will NOT be listed in Twinkle Tray on this build if you are in the Windows 11 Insider program. However, if you guys can let me know if external monitors are working (and the UI in general) in the above version of Twinkle Tray, it would be greatly appreciated.

This version runs normally on my Windows 11 Insider Preview 22499.1010 system, all functions are normal

yan1019 avatar Nov 18 '21 05:11 yan1019

Great, thanks for confirming! I have one more test version for you all before I release an update. It'll probably be a little while before I can address the lack of WMIC, but I can at least get rid of the errors for now.

Anyway, let me know if this one is still OK on 22499+: https://1drv.ms/u/s!AiWKFpjcSKRQhskH-JyFYD1pq-8jbg?e=lj3mmJ

xanderfrangos avatar Nov 18 '21 05:11 xanderfrangos

Great, thanks for confirming! I have one more test version for you all before I release an update. It'll probably be a little while before I can address the lack of WMIC, but I can at least get rid of the errors for now.

Anyway, let me know if this one is still OK on 22499+: https://1drv.ms/u/s!AiWKFpjcSKRQhskH-JyFYD1pq-8jbg?e=lj3mmJ

Windows 11 Insider Preview 10.0.22499.1010 works good

dejwi avatar Nov 18 '21 20:11 dejwi

Same error occur on my win10. I solved the error by reinstall win10. Now my computer is win11. Everything is ok.

RgazHTale avatar Nov 23 '21 09:11 RgazHTale

Hi all,

I've released v1.13.11 with a full replacement for WMIC. This means the Twinkle Tray should work correctly on all builds of Windows 11 now. Let me know if you guys run into any issues.

I'm holding off on a Windows Store update for a day or two to see if anyone reports new bugs related to the WMIC replacement. So if you want to test and are using the Windows Store version, so you should uninstall that and use the EXE from GitHub.

xanderfrangos avatar Dec 01 '21 20:12 xanderfrangos

Any update on publishing it on Windows Store?

Rakambda avatar Dec 15 '21 22:12 Rakambda

Any update on publishing it on Windows Store?

Some users are having issues with the new C++ bindings, so I'm holding off on Windows Store updates until I can get this resolved. (https://github.com/xanderfrangos/twinkle-tray/issues/286)

xanderfrangos avatar Dec 19 '21 14:12 xanderfrangos

I also get this error. Not sure if this is the same Screenshot 2022-09-15 085724

gferreroferri avatar Sep 15 '22 07:09 gferreroferri

Windows 7 image

kwanghuee avatar Nov 30 '22 05:11 kwanghuee

@kwanghuee Only Windows 10 and 11 are supported operating systems.

xanderfrangos avatar Nov 30 '22 14:11 xanderfrangos