jupyterlab / jupyterlab-desktop

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

Jupyter server process terminated before the initialization completed #847

Open Hedge90 opened 1 month ago

Hedge90 commented 1 month ago

Description

When trying to create a new notebook, I get the error in the subject line. Clean installation on Windows 10, every path is set correctly.

Reproduce

Expected behavior

Context

Troubleshoot Output
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.
Browser Output (required for interface issues after loading)
Paste the output from the DevTools JavaScript console here, if applicable.

Logs (required for issues with loading, server and startup)
[2024-07-18 11:30:04.227] [info]  In production mode
[2024-07-18 11:30:04.228] [info]  Logging to file (C:\Users\Kristóf\AppData\Roaming\jupyterlab-desktop\logs\main.log) at 'verbose' level
[2024-07-18 11:30:05.493] [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:295:28)
    at ChildProcess.emit (node:events:514:28)
    at Process.onexit (node:internal/child_process:291:12)
[2024-07-18 11:30:29.176] [info]  In production mode
[2024-07-18 11:30:29.177] [info]  Logging to file (C:\Users\Kristóf\AppData\Roaming\jupyterlab-desktop\logs\main.log) at 'debug' level
[2024-07-18 11:30:30.359] [debug] Server launch script:

        CALL cd /d "C:\Users\Kristóf\AppData\Roaming\jupyterlab-desktop\jlab_server\condabin"
        CALL activate.bat

        CALL cd /d "C:\Users\Kristóf"
        CALL python -m jupyterlab --no-browser --expose-app-in-browser --ServerApp.port=53875 --ServerApp.password="" --ServerApp.token="jlab:srvr:84cac6a9e8d9d627a249cc75b9adcb825d73de" --LabApp.quit_button=False --JupyterApp.config_file_name="" --ContentsManager.allow_hidden=True
[2024-07-18 11:30:30.359] [debug] Server launch parameters:
  [script]: C:\Users\KRISTF~1\AppData\Local\Temp\jlab_desktopHt6zbG\launch.bat
  [options]: {"cwd":"C:\\Users\\Kristóf","shell":"cmd.exe","env":{"ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\Kristóf\\AppData\\Roaming","ChocolateyInstall":"C:\\ProgramData\\chocolatey","ChocolateyLastPathUpdate":"133607563385275124","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"DESKTOP-DQQ6PLQ","ComSpec":"C:\\Windows\\system32\\cmd.exe","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\Kristóf","IntelliJ IDEA":"C:\\Program Files\\JetBrains\\IntelliJ IDEA 2024.1.1\\bin;","IntelliJ IDEA Community Edition":"C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2024.1.1\\bin;","JAVA_HOME":"C:\\Program Files (x86)\\Java\\jre-1.8","LOCALAPPDATA":"C:\\Users\\Kristóf\\AppData\\Local","LOGONSERVER":"\\\\DESKTOP-DQQ6PLQ","NUMBER_OF_PROCESSORS":"16","OneDrive":"C:\\Users\\Kristóf\\OneDrive","OneDriveConsumer":"C:\\Users\\Kristóf\\OneDrive","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","Path":"C:\\Users\\Kristóf\\AppData\\Local\\Programs\\mongosh;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\Hostx64\\x64;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\nodejs\\;C:\\MinGW\\bin;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\JupyterLab;C:\\Program Files\\MongoDB\\Server\\7.0\\bin;C:\\Program Files\\Erlang OTP\\bin;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\Python\\Python312\\;C:\\Users\\Kristóf\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\JetBrains\\IntelliJ IDEA 2024.1.1\\bin;;C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2024.1.1\\bin;;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\Kristóf\\AppData\\Roaming\\npm;C:\\MinGW\\bin;C:\\Flutter\\flutter\\bin;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\mongosh\\;","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"AMD64 Family 25 Model 68 Stepping 1, AuthenticAMD","PROCESSOR_LEVEL":"25","PROCESSOR_REVISION":"4401","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PSModulePath":"C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\\Windows","TEMP":"C:\\Users\\KRISTF~1\\AppData\\Local\\Temp","TMP":"C:\\Users\\KRISTF~1\\AppData\\Local\\Temp","TWITTER_ACCESS_TOKEN":"-","TWITTER_ACCESS_TOKEN_SECRET":"-","TWITTER_API_KEY":"-","TWITTER_API_SECRET_KEY":"-","USERDOMAIN":"DESKTOP-DQQ6PLQ","USERDOMAIN_ROAMINGPROFILE":"DESKTOP-DQQ6PLQ","USERNAME":"Kristóf","USERPROFILE":"C:\\Users\\Kristóf","windir":"C:\\Windows","JUPYTER_CONFIG_DIR":"C:\\Users\\Kristóf\\AppData\\Roaming\\jupyterlab-desktop","JUPYTERLAB_WORKSPACES_DIR":"C:\\Users\\Kristóf\\.jupyter\\desktop-workspaces"}}
[2024-07-18 11:30:30.465] [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:295:28)
    at ChildProcess.emit (node:events:514:28)
    at Process.onexit (node:internal/child_process:291:12)
[2024-07-18 11:30:31.908] [debug] Server launch script:

        CALL cd /d "C:\Users\Kristóf\AppData\Roaming\jupyterlab-desktop\jlab_server\condabin"
        CALL activate.bat

        CALL cd /d "C:\Users\Kristóf"
        CALL python -m jupyterlab --no-browser --expose-app-in-browser --ServerApp.port=53882 --ServerApp.password="" --ServerApp.token="jlab:srvr:a1da528c01aeedb1873c0e31e4f6e07bc12efd" --LabApp.quit_button=False --JupyterApp.config_file_name="" --ContentsManager.allow_hidden=True
[2024-07-18 11:30:31.908] [debug] Server launch parameters:
  [script]: C:\Users\KRISTF~1\AppData\Local\Temp\jlab_desktop7BTQWc\launch.bat
  [options]: {"cwd":"C:\\Users\\Kristóf","shell":"cmd.exe","env":{"ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\Kristóf\\AppData\\Roaming","ChocolateyInstall":"C:\\ProgramData\\chocolatey","ChocolateyLastPathUpdate":"133607563385275124","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"DESKTOP-DQQ6PLQ","ComSpec":"C:\\Windows\\system32\\cmd.exe","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\Kristóf","IntelliJ IDEA":"C:\\Program Files\\JetBrains\\IntelliJ IDEA 2024.1.1\\bin;","IntelliJ IDEA Community Edition":"C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2024.1.1\\bin;","JAVA_HOME":"C:\\Program Files (x86)\\Java\\jre-1.8","LOCALAPPDATA":"C:\\Users\\Kristóf\\AppData\\Local","LOGONSERVER":"\\\\DESKTOP-DQQ6PLQ","NUMBER_OF_PROCESSORS":"16","OneDrive":"C:\\Users\\Kristóf\\OneDrive","OneDriveConsumer":"C:\\Users\\Kristóf\\OneDrive","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","Path":"C:\\Users\\Kristóf\\AppData\\Local\\Programs\\mongosh;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\Hostx64\\x64;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\nodejs\\;C:\\MinGW\\bin;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\JupyterLab;C:\\Program Files\\MongoDB\\Server\\7.0\\bin;C:\\Program Files\\Erlang OTP\\bin;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\Python\\Python312\\;C:\\Users\\Kristóf\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\JetBrains\\IntelliJ IDEA 2024.1.1\\bin;;C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2024.1.1\\bin;;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\Kristóf\\AppData\\Roaming\\npm;C:\\MinGW\\bin;C:\\Flutter\\flutter\\bin;C:\\Users\\Kristóf\\AppData\\Local\\Programs\\mongosh\\;","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"AMD64 Family 25 Model 68 Stepping 1, AuthenticAMD","PROCESSOR_LEVEL":"25","PROCESSOR_REVISION":"4401","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PSModulePath":"C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\\Windows","TEMP":"C:\\Users\\KRISTF~1\\AppData\\Local\\Temp","TMP":"C:\\Users\\KRISTF~1\\AppData\\Local\\Temp","TWITTER_ACCESS_TOKEN":"-","TWITTER_ACCESS_TOKEN_SECRET":"-","TWITTER_API_KEY":"-","TWITTER_API_SECRET_KEY":"-","USERDOMAIN":"DESKTOP-DQQ6PLQ","USERDOMAIN_ROAMINGPROFILE":"DESKTOP-DQQ6PLQ","USERNAME":"Kristóf","USERPROFILE":"C:\\Users\\Kristóf","windir":"C:\\Windows","JUPYTER_CONFIG_DIR":"C:\\Users\\Kristóf\\AppData\\Roaming\\jupyterlab-desktop","JUPYTERLAB_WORKSPACES_DIR":"C:\\Users\\Kristóf\\.jupyter\\desktop-workspaces"}}
[2024-07-18 11:30:31.982] [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:295:28)
    at ChildProcess.emit (node:events:514:28)
    at Process.onexit (node:internal/child_process:291:12)
[2024-07-18 11:30:31.984] [error] (node:18020) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'protocol')
    at new LabView (C:\JupyterLab\resources\app.asar\build\out\main\labview\labview.js:46:50)
    at SessionWindow._loadLabView (C:\JupyterLab\resources\app.asar\build\out\main\sessionwindow\sessionwindow.js:275:25)
    at SessionWindow._updateContentView (C:\JupyterLab\resources\app.asar\build\out\main\sessionwindow\sessionwindow.js:873:18)
    at IpcMainImpl. (C:\JupyterLab\resources\app.asar\build\out\main\sessionwindow\sessionwindow.js:438:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `JupyterLab --trace-warnings ...` to show where the warning was created)
[2024-07-18 11:30:31.985] [error] (node:18020) 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)

JasonWeill commented 1 month ago

@mbektas It looks like this is an error specific to JupyterLab Desktop, not JupyterLab. Anything that @Hedge90 should check?

JasonWeill commented 1 month ago

@Hedge90 Which version(s) of JupyterLab Desktop do you see this error on? Thanks!