jupyterlab / jupyterlab-desktop

JupyterLab desktop application, based on Electron.
BSD 3-Clause "New" or "Revised" License
3.76k stars 367 forks source link

An error pops up: `A javaScript error occured in the main process` #431

Open hellojinwoo opened 2 years ago

hellojinwoo commented 2 years ago

Description

uncaught Exception: Error: connect ECONNERFUSED 127.0.0.1:64279 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1142:16)


![image](https://user-images.githubusercontent.com/34431729/160287652-54eb7b53-a986-4e6d-9854-af12d0e44dc0.png)
- I have installed `Jupyterlab-desktop`, and 2 jupyter extensions, which are `darcula theme`(https://github.com/telamonian/theme-darcula) and `github extension`(https://github.com/telamonian/theme-darcula)
- Do not know how to reproduce this error because I don't know how come I got to have this error as well. 

<!--Describe the bug clearly and concisely. Include screenshots if possible-->

## Expected behavior
- Can execute the jupyterlab-desktop with the error pop-up screen
<!--Describe what you expected to happen-->

## Context

<!--Complete the following for context, and add any other relevant context-->

- Operating System and version: <!-- e.g. Linux Ubuntu 21.04 --> Windows 11
- JupyterLab-Desktop version: <!-- e.g. 3.1.7-2 -->v.3.3.2-1
- Installer: <!-- .exe, .deb, .pkg, .rpm, .snap, .flatpak -->.exe

<!--The more content you provide, the more we can help!-->

<details><summary>Troubleshoot Output</summary>
<pre>
Paste the output from running `jupyter troubleshoot` from the terminal inside of JupyterLab-Desktop here.
You may want to sanitize the paths in the output.
</pre>
</details>

<details><summary>Browser Output (required for interface issues after loading)</summary>
<!--Go to `Help` menu -> `Open Developer Console` to access the JavaScript console-->
<!--If you do not see such a menu entry, please try Ctrl + Shift + I, after focusing on JupyterLab file browser-->
<pre>
Paste the output from the DevTools JavaScript console here, if applicable.

</pre>
</details>

<details><summary>Logs (required for issues with loading, server and startup)</summary>
<!--Start application from command line as `jlab --verbose 4`, wait until it settles-->
<!--Copy-paste the logs from the following location:-->
<!--on Linux: ~/.config/jupyterlab-desktop/logs/main.log-->
<!--on macOS: ~/Library/Logs/jupyterlab-desktop/main.log-->
<!--on Windows: %USERPROFILE%\AppData\Roaming\jupyterlab-desktop\logs\main.log-->
<pre>
Paste the logs from the `main.log` file here (optionally also from `renderer.log`).

</pre>
</details>
hellojinwoo commented 2 years ago
mbektas commented 2 years ago

@hellojinwoo thanks for reporting this issue. Other folks had reported this issue but we couldn't find the exact source of the problem. Server seems to sometimes crash on Windows, during launch. so as a remedy we are restarting the server as mentioned here https://github.com/jupyterlab/jupyterlab-desktop/issues/388#issuecomment-1053643642. Restart is limited to up to 3 times.

Are you consistently getting this error message every time you launch JupyterLab Desktop?

hellojinwoo commented 2 years ago

@mbektas Thank you for the feedback. Yes, I have constantly received the error message whenever I execute the jupyterlab. To solve the problem, I have deleted the jupyterlab-desktop as instructed in the installation page. And then I have reinstalled jupyterlab desktop. But the error keeps showing up.

Now it seems like the only solution would be formatting my laptop, which I wouldn't like to do for real.

mbektas commented 1 year ago

@hellojinwoo is this still a problem for you? have you tried the latest version 3.6.1-1?

litodemesa commented 1 year ago

How can I fix this please help

A JavaScript error occurred in the main process

Uncaught Exception: SyntaxError: Unexpected token'

image

this is what happened when I start up Jupyterlab

mbektas commented 1 year ago

@litodemesa can you provide logs. instructions here.

Tigger36 commented 1 year ago

I am experiencing this issue right now. Was a resolution identified?

mbektas commented 1 year ago

@Tigger36 can you try with the latest version and provide logs if issue persists?

xiaoxiang01a commented 1 year ago

I also experienced this issue. But I found nothing from 'C:\Users\XXX\AppData\Roaming\jupyterlab-desktop\logs\main.log'. There were only records of previous successes there.

Finally,I solved this problem by uninstalling the jupyterlab-desktop, deleting the folder 'C:\Users\XXX\AppData\Roaming\jupyterlab-desktop\' and reinstalling the latest version v4.0.7-1.

my device is win10.

mbektas commented 11 months ago

@0915xiaoxiang thanks for sharing your solution. @Tigger36 and @litodemesa could you also try the same?

martinagreen commented 6 months ago

I have a similar issue installing JLD on MacOS 13.6 Intel. I need help. The message is as follows:

A JavaScript error occurred in the main process Uncaught Exception: TypeError: Cannot read properties of undefined (reading 'uiMode') at IpcMainImpl. (/ Applications/JupyterLab.app/Contents/ Resources/app.asar/build/out/main/ sessionwindow/sessionwindow.is:631:47) at IpcMainImpl.emit (node:events:514:28) at WebContents. (node:electron/is2c/ browser_init:2:88262) at WebContents.emit (node:events:514:28)

scurrita commented 4 months ago

I have a similar issue installing JLD on MacOS 13.6 Intel. I need help. The message is as follows:

A JavaScript error occurred in the main process Uncaught Exception: TypeError: Cannot read properties of undefined (reading 'uiMode') at IpcMainImpl. (/ Applications/JupyterLab.app/Contents/ Resources/app.asar/build/out/main/ sessionwindow/sessionwindow.is:631:47) at IpcMainImpl.emit (node:events:514:28) at WebContents. (node:electron/is2c/ browser_init:2:88262) at WebContents.emit (node:events:514:28)

I got almost the same error on Ubuntu 24. Any ideas on how to sort it out?

"A JavaScript error occurred in the main process Uncaught Exception: TypeError: Cannot read properties of undefined (reading 'uiMode') at IpcMainImpl. (/ snap/JupyterLab-desktop/30/ Resources/app.asar/build/out/main/ sessionwindow/sessionwindow.is:631:47) at IpcMainImpl.emit (node:events:514:28) at WebContents. (node:electron/js2c/ browser_init:2:88262) at WebContents.emit (node:events:514:28)"