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

Exception at reading 'uiMode' when clicked from settings on the home page #857

Open
Taha-249 opened this issue Aug 19, 2024 · 6 comments
Open
Labels

Comments

@Taha-249
Copy link

Description

When there is no python environment found, jupyter labs cannot create new session. However, by changing on start up to create a new session generates this exception. There is the following blank screen.

image

on clicking the hamburger button, it generates the following exception.

image

Reinstalling program does not seem to fix the issue.

  • Operating System and version: Windows 10 22H2
  • JupyterLab-Desktop version: latest
@JasonWeill
Copy link

@Taha-249 Thank you for opening this issue! Do you see any information in the logs when you start JupyterLab Desktop? You can find info about logs here: https://github.com/jupyterlab/jupyterlab-desktop/blob/master/troubleshoot.md#Logs

@JasonWeill
Copy link

@Taha-249 To follow up, can you please check for any info in the logs on startup and add it as a comment to this issue? Thanks!

@JasonWeill
Copy link

Without info from the logs, or any other reports, I'm going to close this issue. Please reopen or open a new issue if you continue to see problems in JupyterLab. Thanks!

@krassowski
Copy link
Member

I encountered this on a fresh installation on Ubuntu 24.04 with pyenv installed. When I run jlab . --no-sandbox I saw no contents

image

Upon pressing the hamburger icon I saw:

image

The logs are:

[2024-09-20 11:08:03.055] [error] Python path "/home/krassowski/.config/jupyterlab-desktop/jlab_server/bin/python" does not exist.
[2024-09-20 11:08:05.243] [error] Failed to create free server Error: No default environment found!
    at /snap/jupyterlab-desktop/31/resources/app.asar/build/out/main/registry.js:282:32
[2024-10-01 12:45:16.909] [error] Python path "/home/krassowski/.config/jupyterlab-desktop/jlab_server/bin/python" does not exist.
[2024-10-01 12:45:19.902] [error] Failed to get environment info at path '/home/krassowski/.pyenv/shims/python'. Error: Command failed: /home/krassowski/.pyenv/shims/python -c import os, sys, json, platform, importlib

env_type = 'system'
env_name = 'python'
python_version = platform.python_version()
default_kernel = 'python3'

requirements = [
  'jupyterlab'
]

versions = {
  "python": python_version
}

for requirement in requirements:
  try:
    module = importlib.import_module(requirement)
    versions[requirement] = module.__version__
  except:
    versions[requirement] = 'NOT-FOUND'

if (getattr(sys, "base_prefix", None) or getattr(sys, "real_prefix", None) or sys.prefix) != sys.prefix:
  env_type = 'venv'

if env_type != 'venv' and os.path.exists(os.path.join(sys.prefix, "conda-meta")):
  is_root = os.path.exists(os.path.join(sys.prefix, "condabin"))
  env_type = 'conda-root' if is_root else 'conda-env'

if env_type != 'system':
  env_name = os.path.basename(sys.prefix)

try:
  import jupyter_client
  mkm = jupyter_client.multikernelmanager.MultiKernelManager()
  default_kernel = mkm.default_kernel_name
except:
  pass

print(json.dumps({"type" : env_type, "name": env_name, "versions" : versions, "defaultKernel": default_kernel}))

pyenv: python: command not found

The `python' command exists in these Python versions:
  3.9.11
  3.9.20

Note: See 'pyenv help global' for tips on allowing both
      python2 and python3 to be found.

    at ChildProcess.exithandler (node:child_process:430:12)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:514:28)
    at Pipe.<anonymous> (node:net:323:12)
[2024-10-01 12:45:20.402] [error] Failed to create free server Error: No default environment found!
    at /snap/jupyterlab-desktop/31/resources/app.asar/build/out/main/registry.js:282:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I think that the robustness of the UI could be improved. It could also display a helpful message rather than crash.

@krassowski krassowski reopened this Oct 1, 2024
@krassowski
Copy link
Member

krassowski commented Oct 1, 2024

The pyenv version errors appear unrelated, I still get the error after solving them (but the window is no longer blank)

@Nagidrop
Copy link

Nagidrop commented Oct 4, 2024

I can reproduce this error consistently: whenever I launch JupyterLab Desktop (normally) and quickly click on the hamburger menu icon (while window is still blank), the error dialog shows up. Then, the windows is still blank until you close the dialog. After closing, the app starts without further errors and functions normally.

I use custom Python environment (miniconda3) on latest version of JupyterLab (4.2.5) and JupyterLab Desktop (4.2.5-1) on Windows 11.

I have recorded a video for showcasing:

2024-10-04.20-04-16.mp4

The logs show 2 warnings and 1 error but they appear only after JupyterLab Desktop has successfully launched. I attached them anyway:

[2024-10-04 20:04:14.770] [info]  In production mode
[2024-10-04 20:04:14.772] [info]  Logging to file (C:\Users\Nagi\AppData\Roaming\jupyterlab-desktop\logs\main.log) at 'info' level
[2024-10-04 20:04:24.355] [warn]  Unsatisfied version 2.3.2 from @jupyterlab/application-top of shared singleton module @lumino/widgets (required ^1.37.2)
[2024-10-04 20:04:25.256] [warn]  Language pack 'English_United States' not valid!
[2024-10-04 20:04:25.291] [verbose] Starting application in workspace: "default"
[2024-10-04 20:04:26.336] [error] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'type')
[2024-10-04 20:04:26.615] [verbose] Starting WebSocket: ws://localhost:53679/api/kernels/a148d065-b663-42de-af19-4a3bd95d9c08

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

4 participants