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

Jupyter Server process terminated before the initialization completed #653

Closed
samuelvw01 opened this issue May 4, 2023 · 7 comments
Closed
Labels

Comments

@samuelvw01
Copy link

samuelvw01 commented May 4, 2023

Description

When I click on New session it shows error "Failed to create session! Jupyter Server process terminated before the initialization completed."
Reinstalling didnt help. Clicking on "Install / update Python environment using the bundled installer" hangs at "Installing".

Reproduce

  1. Click on 'New session.'
  2. See error ' Failed to create session! Jupyter Server process terminated before the initialization completed'

Expected behavior

New session should start

Context

  • Operating System and version: Windows 10
  • JupyterLab-Desktop version: 3.6.3-1
  • Installer: .exe
Logs (required for issues with loading, server and startup)
[2023-05-04 14:44:54.534] [error] Failed to start server Error: Jupyter Server process terminated before the initialization completed
    at ChildProcess. (C:\JupyterLab\resources\app.asar\build\out\main\server.js:282:28)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
[2023-05-04 14:44:58.883] [error] Failed to start server Error: Jupyter Server process terminated before the initialization completed
    at ChildProcess. (C:\JupyterLab\resources\app.asar\build\out\main\server.js:282:28)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
[2023-05-04 14:44:58.915] [error] (node:6972) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'protocol')
    at new LabView (C:\JupyterLab\resources\app.asar\build\out\main\labview\labview.js:45:50)
    at SessionWindow._loadLabView (C:\JupyterLab\resources\app.asar\build\out\main\sessionwindow\sessionwindow.js:274:25)
    at SessionWindow._updateContentView (C:\JupyterLab\resources\app.asar\build\out\main\sessionwindow\sessionwindow.js:680:18)
    at IpcMainImpl. (C:\JupyterLab\resources\app.asar\build\out\main\sessionwindow\sessionwindow.js:421:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `JupyterLab --trace-warnings ...` to show where the warning was created)
[2023-05-04 14:44:58.941] [error] (node:6972) 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: 2)
@welcome
Copy link

welcome bot commented May 4, 2023

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

@mbektas
Copy link
Member

mbektas commented May 4, 2023

@samuelvw01 looks like your server launch is failing but logs are not showing enough details. can you try these:

  1. Launch server manually using Windows Terminal and check terminal logs. Instructions here.
  2. When JupyterLab Desktop is closed, install the Python environment directly by using the installer in C:\JupyterLab\resources\env_installer
  3. If there are still errors, set log level to debug, retry launch and check and share main.log file by following these instructions.

@samuelvw01
Copy link
Author

Launching server manually works without any errors. Installed Python environment (it says I had to delete jlab_server folder), but I got same error as above. Set log level to debug, here is my main.log
main.log

@mbektas
Copy link
Member

mbektas commented May 5, 2023

Interesting, it was expected to error out in the same way when you tried manually. Did you activate the environment before launching the server manually? you can do so using:

  • cd %APPDATA%\jupyterlab-desktop\jlab_server
  • condabin\activate.bat

@samuelvw01
Copy link
Author

samuelvw01 commented May 5, 2023

Tried to run those commands, but still got that error. What is more interesting, I build jupyterlab-desktop from source and when I ran npm run start, it works normally. See the picture, the left one is installed from exe and the right one is when I ran npm run start
Untitled

@mbektas
Copy link
Member

mbektas commented May 17, 2023

@samuelvw01 now that you are able to run locally, can you try building it completely and installing using your own installer? Instructions are here.

@samuelvw01
Copy link
Author

Thanks, that worked! (There were some conflicts during conda constructor phase, but I have resolved them). Now it runs as expected.

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