jupyterlab-desktop icon indicating copy to clipboard operation
jupyterlab-desktop copied to clipboard

electron-28 fails to start jupyterlab-desktop

Open PF4Public opened this issue 1 year ago • 8 comments

Starting jupyterlab-desktop with electron-28 fails with the following error:

16:37:22.419 › TypeError: Cannot read properties of undefined (reading 'filename')
    at Object.isDevMode (***/jupyterlab-desktop/build/out/main/utils.js:43:25)
    at ***/jupyterlab-desktop/build/out/main/main.js:192:55
    at new Promise (<anonymous>)
    at processArgs (***/jupyterlab-desktop/build/out/main/main.js:191:12)
    at App.<anonymous> (***/jupyterlab-desktop/build/out/main/main.js:169:15)
    at App.emit (node:events:517:28)
16:37:22.423 › null
16:37:22.424 › TypeError: Cannot read properties of undefined (reading 'filename')
    at Object.isDevMode (***/jupyterlab-desktop/build/out/main/utils.js:43:25)
    at getLogLevel (***/jupyterlab-desktop/build/out/main/main.js:55:17)
    at redirectConsoleToLog (***/jupyterlab-desktop/build/out/main/main.js:71:22)
    at App.<anonymous> (***/jupyterlab-desktop/build/out/main/main.js:178:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This does not happen if starting with electron-27. I've hardcoded isDevMode() to always return false, which solved this issue for me.

I could not find the exact braking change which might've occured between those electron/node versions, it could very well be something on my system. Would you be able to verify whether you can also reproduce this issue?

PF4Public avatar Mar 02 '24 14:03 PF4Public

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

welcome[bot] avatar Mar 02 '24 14:03 welcome[bot]

@PF4Public Where are you seeing this issue? Are you trying to build JupyterLab Desktop locally or are you running a version that you downloaded and installed as a release? Thanks!

JasonWeill avatar Mar 05 '24 17:03 JasonWeill

I'm building it locally. It builds, but does not start with electron-28.

PS: Sorry, I should've mentioned that from the start.

PF4Public avatar Mar 05 '24 18:03 PF4Public

@PF4Public is there any particular reason you are trying to upgrade to electron 28? we are currently at electron 27.

mbektas avatar Mar 06 '24 15:03 mbektas

It is probably failing due to ESM module support added to electron 28.

mbektas avatar Mar 06 '24 15:03 mbektas

@PF4Public is there any particular reason you are trying to upgrade to electron 28? we are currently at electron 27.

I'm trying to keep a single electron binary in the system and build every application I use against that, not using the shipped electron binaries. I haven't yet tested electron-29 as I expect many breakages. But 28 looks solid amongst others.

It is probably failing due to ESM module support added to electron 28.

Sounds plausible, could it be fixed? As far as I understand, require.main became no longer accesible for whatever reason.

PF4Public avatar Mar 06 '24 21:03 PF4Public

we will take a more detailed look at this, once we upgrade to a higher electron version.

mbektas avatar Mar 09 '24 17:03 mbektas

Same with electron-29 (just a FYI)

PF4Public avatar Mar 10 '24 16:03 PF4Public