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

Enter doesn't work in "Enter the URL of the running jupyter server" #16374

Open
1 of 2 tasks
hroskes opened this issue Jan 13, 2025 · 7 comments
Open
1 of 2 tasks

Enter doesn't work in "Enter the URL of the running jupyter server" #16374

hroskes opened this issue Jan 13, 2025 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-remote Applies to remote Jupyter Servers

Comments

@hroskes
Copy link

hroskes commented Jan 13, 2025

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

I opened an .ipynb file, clicked Select Kernel --> Existing Jupyter Server. Then I entered https://localhost:8888 and pressed Enter. The Enter didn't register.

This is similar to microsoft/vscode#110528

I enabled trace logging, and this is the output. Note that the enter keypress doesn't show up.

2025-01-13 12:46:58.896 [trace] CommandService#executeCommand _notebook.selectKernel
2025-01-13 12:47:02.688 [trace] CommandService#executeCommand __vsc0e025cfd-9e43-4d95-87d5-de2c32851579
2025-01-13 12:47:02.693 [trace] [mainThreadSecretState] Getting password for ms-toolsai.jupyter extension:  ms-toolsai.jupyter.user-jupyter-server-uri-list-version2
2025-01-13 12:47:02.693 [trace] [secrets] getting secret for key: secret://{"extensionId":"ms-toolsai.jupyter","key":"ms-toolsai.jupyter.user-jupyter-server-uri-list-version2"}
2025-01-13 12:47:02.694 [trace] [secrets] no secret found for key: secret://{"extensionId":"ms-toolsai.jupyter","key":"ms-toolsai.jupyter.user-jupyter-server-uri-list-version2"}
2025-01-13 12:47:02.695 [trace] [mainThreadSecretState] No password found for:  ms-toolsai.jupyter ms-toolsai.jupyter.user-jupyter-server-uri-list-version2
2025-01-13 12:47:10.419 [trace] KeybindingService#dispatch H [ No matching keybinding ]
2025-01-13 12:47:10.865 [trace] KeybindingService#dispatch T [ No matching keybinding ]
2025-01-13 12:47:11.434 [trace] KeybindingService#dispatch T [ No matching keybinding ]
2025-01-13 12:47:11.856 [trace] KeybindingService#dispatch P [ No matching keybinding ]
2025-01-13 12:47:12.274 [trace] KeybindingService#dispatch S [ No matching keybinding ]
2025-01-13 12:47:12.775 [trace] KeybindingService#dispatch Shift+; [ No matching keybinding ]
2025-01-13 12:47:13.243 [trace] KeybindingService#dispatch / [ No matching keybinding ]
2025-01-13 12:47:13.417 [trace] KeybindingService#dispatch / [ No matching keybinding ]
2025-01-13 12:47:15.097 [trace] KeybindingService#dispatch L [ No matching keybinding ]
2025-01-13 12:47:15.259 [trace] KeybindingService#dispatch O [ No matching keybinding ]
2025-01-13 12:47:15.737 [trace] KeybindingService#dispatch C [ No matching keybinding ]
2025-01-13 12:47:15.915 [trace] KeybindingService#dispatch A [ No matching keybinding ]
2025-01-13 12:47:16.056 [trace] KeybindingService#dispatch L [ No matching keybinding ]
2025-01-13 12:47:16.441 [trace] KeybindingService#dispatch H [ No matching keybinding ]
2025-01-13 12:47:16.538 [trace] KeybindingService#dispatch O [ No matching keybinding ]
2025-01-13 12:47:16.658 [trace] KeybindingService#dispatch S [ No matching keybinding ]
2025-01-13 12:47:16.777 [trace] KeybindingService#dispatch T [ No matching keybinding ]
2025-01-13 12:47:17.272 [trace] KeybindingService#dispatch Shift+; [ No matching keybinding ]
2025-01-13 12:47:18.136 [trace] KeybindingService#dispatch 8 [ No matching keybinding ]
2025-01-13 12:47:18.320 [trace] KeybindingService#dispatch 8 [ No matching keybinding ]
2025-01-13 12:47:18.522 [trace] KeybindingService#dispatch 8 [ No matching keybinding ]
2025-01-13 12:47:18.714 [trace] KeybindingService#dispatch 8 [ No matching keybinding ]
2025-01-13 12:47:21.578 [debug] Comments: URIs of continue on comments to add to storage .
2025-01-13 12:47:25.715 [debug] User data changed

Other things I tried:

  • If I write https://localhost:888 and press enter, nothing happens either. A valid or invalid port is equivalent
  • If I write localhost:8888 without the https, I get a pink box with a message "Invalid protocol in URL specificed, only HTTP and HTTPS are supported." Apparently in this case my Enter does register. I don't get anything in the Jupyter output, though (see below).
  • Similarly if I just write localhost, I get a pink box "Invalid URL specified". In this case I do get Jupyter output.
  • I restarted my computer. No change.
  • I tried reinstalling VSCode. No change.
  • I tried uninstalling and reinstalling the Jupyter extension. No change.
  • I tried hitting the enter key more forcefully. No change. I didn't even feel better.

VS Code Version

Version: 1.96.3 (user setup) Commit: 91fbdddc47bc9c09064bf7acf133d22631cbf083 Date: 2025-01-09T18:14:09.060Z Electron: 32.2.6 ElectronBuildId: 10629634 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0 OS: Windows_NT x64 10.0.22631

Jupyter Extension Version

2024.11.0

Jupyter logs

Visual Studio Code (1.96.3, undefined, desktop)
Jupyter Extension Version: 2024.11.0.
Python Extension Version: 2024.22.2.
Pylance Extension Version: 2024.12.1.
Platform: win32 (x64).
Temp Storage folder ~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2024.11.0
Workspace folder ~\jupyter\NaroNet, Home = c:\Users\heshy
13:38:38.628 [warn] Disposing old controller startUsingPythonInterpreter:'.jvsc74a57bd044970de4bc3752c1a34b064bc89a040ded33e5e98a376a98f732adc0837bd11d.c:\Users\~\miniconda3\envs\py27\python.exe.c:\Users\~\miniconda3\envs\py27\python.exe.-m#ipykernel_launcher' for view = 'jupyter-notebook'
13:38:38.649 [warn] Disposing old controller startUsingPythonInterpreter:'.jvsc74a57bd044970de4bc3752c1a34b064bc89a040ded33e5e98a376a98f732adc0837bd11d.c:\Users\~\miniconda3\envs\py27\python.exe.c:\Users\~\miniconda3\envs\py27\python.exe.-m#ipykernel_launcher (Interactive)' for view = 'interactive'
13:38:57.013 [error] Failed to parse URI localhost TypeError: Invalid URL
    at new URL (node:internal/url:806:29)
    at CF (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.11.0-win32-x64\dist\extension.node.js:424:20072)
    at Yw.parseUserUriAndGetValidationError (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.11.0-win32-x64\dist\extension.node.js:424:17611)
    at kh.value (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.11.0-win32-x64\dist\extension.node.js:424:17366)
    at P.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:746)
    at P.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:964)
    at h._fireDidAccept (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:156:38059)
    at s.$onDidAccept (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:156:35862)
    at Dy.S (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:32:115275)
    at Dy.Q (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:32:115055)
    at Dy.M (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:32:114144)
    at Dy.L (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:32:113249)
    at kh.value (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:32:112046)
    at P.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:746)
    at P.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:964)
    at Vn.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:32:9457)
    at kh.value (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:175:13296)
    at P.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:746)
    at P.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:964)
    at Vn.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:32:9457)
    at MessagePortMain.<anonymous> (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:175:11588)
    at MessagePortMain.emit (node:events:518:28)
    at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949) {
  code: 'ERR_INVALID_URL',
  input: 'localhost'
}

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

conda 24.7.1

Running Jupyter locally or remotely?

Remote

@hroskes hroskes added the bug Issue identified by VS Code Team member as probable bug label Jan 13, 2025
@hroskes
Copy link
Author

hroskes commented Jan 13, 2025

Okay, an update:

After pressing enter, I tested whether running cells in the notebook works. It doesn't. It goes back to the "Type to choose a kernel source" interface.

However, if I press Ctrl+C in the terminal where I have jupyter running, a pink box appears:

Image

Connection failure. Verify the server is running and reachable. (request to https://localhost:8888/ failed, reason: ).

Prior to that, there is no indication that it was even trying to connect.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jan 14, 2025

Is your jupyter server running on https://localhost:8888?

@hroskes
Copy link
Author

hroskes commented Jan 14, 2025

It is. I can access it from the browser. (host, not hsot, I assume that was a typo)

@DonJayamanne
Copy link
Contributor

Please can you open the developer tools using the command Toggle Developer Tools and go into the network tab.
Try to replicate the issue and see if there are any failed http requests or errors in the console window.
If any, please can you share the details.

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster notebook-remote Applies to remote Jupyter Servers labels Jan 15, 2025
@hroskes
Copy link
Author

hroskes commented Jan 15, 2025

I'm not seeing anything there. I also redid the experiment from my second post here, where I close jupyter after pressing enter and get the error message "Connection failure...". I still see nothing on the developer tools.
Image

@roykim98
Copy link

I'm also seeing this issue recently where I was not previously. I am able to access the jupyter server through any web browser or other client, but the extension specifically is failing to connect. All extensions and VS Code are up to date, running on Mac OS.

@DonJayamanne
Copy link
Contributor

@hroskes looks like there are errors in the console tab, please can you check that

Nothing changed in Jupyter extension in this space for a few months, hence not sure

@roykim98 please can you also check the logs
See previous messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-remote Applies to remote Jupyter Servers
Projects
None yet
Development

No branches or pull requests

3 participants