Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron-28 fails to start jupyterlab-desktop #786

Open
PF4Public opened this issue Mar 2, 2024 · 8 comments
Open

electron-28 fails to start jupyterlab-desktop #786

PF4Public opened this issue Mar 2, 2024 · 8 comments
Labels

Comments

@PF4Public
Copy link

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 PF4Public added the bug label Mar 2, 2024
Copy link

welcome bot commented Mar 2, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

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! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill
Copy link

@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!

@PF4Public
Copy link
Author

PF4Public commented Mar 5, 2024

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

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

@mbektas
Copy link
Member

mbektas commented Mar 6, 2024

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

@mbektas
Copy link
Member

mbektas commented Mar 6, 2024

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

@PF4Public
Copy link
Author

@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.

@mbektas mbektas removed the bug label Mar 9, 2024
@mbektas
Copy link
Member

mbektas commented Mar 9, 2024

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

@PF4Public
Copy link
Author

Same with electron-29 (just a FYI)

@JasonWeill JasonWeill added the bug label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants