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

Persistent "Jupyter API" message with remote SSH (but not local)... #15255

Closed
ColinConwell opened this issue Feb 28, 2024 · 13 comments · Fixed by #15293
Closed

Persistent "Jupyter API" message with remote SSH (but not local)... #15255

ColinConwell opened this issue Feb 28, 2024 · 13 comments · Fixed by #15293
Assignees
Labels
api-proposal author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@ColinConwell
Copy link

The following message appears incessantly when running Jupyter Notebooks in VSCode via RemoteSSH:

Thank you for trying the Jupyter API. Please file an issue on our repo to allow the extension unknown to use this API in production. This would prevent us from breaking your extension when updating the API (as it is still a work in progress).

The notification cannot be silenced, even when turning off notifications from the Jupyter Extension.

The notebook seems to be running correctly, and there are seemingly no other issues. I realize the message is likely thrown by the use of an extension, but I have dozens of extensions and systemtically isolating the extension that is causing the notification should likely not be the expected resolution. At minimum, it would be nice to be able to silence this message, since everything else appears to be working correctly. (The absence of the message on the local machine also suggests that the error is potentially not with any particular extension).

Environment data

  • VS Code version: 1.86.2 (Universal)
  • Jupyter Extension version (available under the Extensions sidebar): v2024.1.2024012502 (pre-release)
  • Python Extension version (available under the Extensions sidebar): v2024.0.1
  • OS (Windows | Mac | Linux distro) and version: MacOS 14.3.1 (23D60) [Local] | Ubuntu 20.22 [Remote]
  • Jupyter server running: Local | Remote

Expected Behavior

Messaging should be the same for the local and remote machine. If the use of the remote is causing the issue, but the notebook is functioning, we should be able to silence the message, no?

@ColinConwell ColinConwell added the bug Issue identified by VS Code Team member as probable bug label Feb 28, 2024
@ColinConwell
Copy link
Author

ColinConwell commented Feb 28, 2024

Note: After some testing, it appears this may be related to the new Data Wranglers Extension. When I disable this extension, the error still appears, but only on initially opening the notebook.

@DonJayamanne
Copy link
Contributor

Thank for you filing this issue and sorry you are running into this.
Please could you share the following verbose logs to help us identify where this is coming from.
The logs should contain some trace level informatio that will help us, thanks

Please could you enable logging as follows:

  • Open settings & go into Jupyter->Logging
  • Change the value to verbose
  • Reload VS Code,
  • Attempt to repro the issue & then copy the output from the Jupyter output panel.

@ColinConwell
Copy link
Author

ColinConwell commented Feb 28, 2024

Logs are copied below. I can confirm that at least the final four calls of:

[warn] Publisher is allowed to access the Kernel API with a message.

occur only after activating the DataWrangler Extension, and cease to repeat again once I disable it.

Visual Studio Code (1.86.2, ssh-remote, desktop)
Jupyter Extension Version: 2024.1.1.
Python Extension Version: 2024.0.1.
Pylance Extension Version: 2024.2.2.
Platform: linux (x64).
--------(EDIT: LOGS NOW REMOVED)------------
> 23:35:12.581 [warn] Publisher is allowed to access the Kernel API with a message.
23:35:14.873 [warn] Publisher is allowed to access the Kernel API with a message.
23:35:16.931 [warn] Publisher is allowed to access the Kernel API with a message.
23:35:18.095 [warn] Publisher is allowed to access the Kernel API with a message.

EDIT 03/04/2024: I have removed some of the logs above to prevent security risks.

@ColinConwell
Copy link
Author

Again, I am able to prevent all but the first instance of the message by disabling DataWrangler.

I think, depending on how you interpret this, that a viable action item would still be the ability to silence the error notification with an optional user setting.

Thanks for your rapid response!

@DonJayamanne
Copy link
Contributor

@ColinConwell
Please can you install the latest version of Jpuyter extension.
Let me know if you are still running into this.

@DonJayamanne
Copy link
Contributor

Please could you

  • Update to the latest version of VS Code 1.87
  • Download the attached file
  • Extract this file
  • Open VS Code and select the command Install from VSIX
  • Select the above extracted VSIX
  • When prompted to reload VS Code, please do so
  • Try to replicate the issue once again
  • Then please provide the logs

The new logs should contain an entry Unable to determine the caller of the extension API for trace stack
Please share the logs with that line along with the lines after that
ms-toolsai-jupyter-insiders.vsix (1).zip

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Mar 4, 2024
@ColinConwell
Copy link
Author

This is the log output you requested, I think. I triggered this again with the DataWranglers extension.

00:48:49.034 [error] Unable to determine the caller of the extension API for trace stack. Error:
at Pg.determineExtensionFromCallStack (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:203:3695)
at SI.getService (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:408:21206)
at O9 (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:198:24858)
at Object.getKernelService (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:198:26331)
at Fi.getKernelSession (/storage//.vscode-insiders/extensions/ms-toolsai.datawrangler-0.29.0/out/extension.js:2:1985473)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Ii.getCellStatusBarItemForCell (/storage//.vscode-insiders/extensions/ms-toolsai.datawrangler-0.29.0/out/extension.js:2:1981744)
at h.$provideNotebookCellStatusBarItems (/storage//.vscode-insiders/cli/servers/Insiders-bb171489789c9a49e985a4a2c8694138d70d42c1/server/out/vs/workbench/api/node/extensionHostProcess.js:155:3705)

Note that this error does not occur locally, only on Remote SSH. Also note that this is with a VS-Code-Insiders installation I have (I cannot currently mess with my main VSCode stable setup). Let me know if that's an issue and I can potentially do this same operation on a Stable install sometime soon.

@ColinConwell
Copy link
Author

It seems I can also trigger it just with Jupyter PowerToys:

01:00:15.561 [error] Unable to determine the caller of the extension API for trace stack. Error:
at Pg.determineExtensionFromCallStack (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:203:3695)
at O9 (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:198:24761)
at Object.getKernelService (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:198:26331)
at activateFeature (/storage//.vscode-insiders/extensions/ms-toolsai.vscode-jupyter-powertoys-0.1.0/out/main.js:335:56)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async activate (/storage//.vscode-insiders/extensions/ms-toolsai.vscode-jupyter-powertoys-0.1.0/out/main.js:343:9)
at async activate (/storage//.vscode-insiders/extensions/ms-toolsai.vscode-jupyter-powertoys-0.1.0/out/main.js:13995:5)
at async u.n (/storage//.vscode-insiders/cli/servers/Insiders-bb171489789c9a49e985a4a2c8694138d70d42c1/server/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
at async u.m (/storage//.vscode-insiders/cli/servers/Insiders-bb171489789c9a49e985a4a2c8694138d70d42c1/server/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
at async u.l (/storage//.vscode-insiders/cli/servers/Insiders-bb171489789c9a49e985a4a2c8694138d70d42c1/server/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)
01:00:15.566 [error] Unable to determine the caller of the extension API for trace stack. Error:
at Pg.determineExtensionFromCallStack (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:203:3695)
at SI.getService (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:408:21206)
at O9 (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:198:24858)
at Object.getKernelService (/storage//.vscode-insiders/extensions/ms-toolsai.jupyter-2024.3.0/dist/extension.node.js:198:26331)
at activateFeature (/storage//.vscode-insiders/extensions/ms-toolsai.vscode-jupyter-powertoys-0.1.0/out/main.js:335:56)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async activate (/storage//.vscode-insiders/extensions/ms-toolsai.vscode-jupyter-powertoys-0.1.0/out/main.js:343:9)
at async activate (/storage//.vscode-insiders/extensions/ms-toolsai.vscode-jupyter-powertoys-0.1.0/out/main.js:13995:5)
at async u.n (/storage//.vscode-insiders/cli/servers/Insiders-bb171489789c9a49e985a4a2c8694138d70d42c1/server/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
at async u.m (/storage//.vscode-insiders/cli/servers/Insiders-bb171489789c9a49e985a4a2c8694138d70d42c1/server/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
at async u.l (/storage//.vscode-insiders/cli/servers/Insiders-bb171489789c9a49e985a4a2c8694138d70d42c1/server/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)

@DonJayamanne
Copy link
Contributor

Thanks for the logs. Will try to get a fix

@DonJayamanne
Copy link
Contributor

I'm going to share another VSIX, please can you try this again and share the logs
I should be able to get this resolved.

You might have logs with the following lines

  • Regex failed to parse stack frame
  • Parsed file name in stack
  • Unable to parse file name in stack
  • Unable to determine the caller of the extension API for trace stack
  • Frames.
  • Jupyter Extension Root.

Please share all of the above logs in the same order,
Once again, thanks for your patience and help.

Here's the new VSIX
ms-toolsai-jupyter-insiders.vsix.zip

@ColinConwell
Copy link
Author

Attached are all logs (unabridged) with the new VSIX install in Insiders:

jupyter_vsix_logs.txt

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Mar 5, 2024

Please try this vsix, I believe this will fix the issue.

ms-toolsai-jupyter-insiders.vsix.zip

@DonJayamanne DonJayamanne added the author-verification-requested Issues potentially verifiable by issue author label Mar 21, 2024
@DonJayamanne
Copy link
Contributor

Steps to repro

  • Install data wrangler extension
  • Open a Jupyter notebook
  • Run a cell
    Verify you do not see a prompt with the message similar to the following Thank you for trying the Jupyter API. Please file an issue on our repo to allow the extension unknown to use this API in production. This would prevent us from breaking your extension when updating the API (as it is still a work in progress).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-proposal author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants