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

Extension host terminated uexpectedly when using ipywidgets.Fileupload #4525

Closed
beralves opened this issue Jan 27, 2021 · 6 comments
Closed

Comments

@beralves
Copy link

Environment data

  • VS Code version: 1.52.1
  • Jupyter Extension version (available under the Extensions sidebar): v2020.12.414227025
  • Python Extension version (available under the Extensions sidebar): v2021.1.502429796
  • OS (Windows | Mac | Linux distro) and version: Windows 10
  • Python and/or Anaconda version: 3.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Jupyter server running: Local

Expected behaviour

ipywidgets.Fileupload should work on vscode while running the notebook. Fileupload works if I launch "jupyter notebook" in the command and run my notebook there. It would be helpful to run it inside vscode, to avoid context switching and use debug features.

Actual behaviour

ipywidgets.Fileupload crashes extension host on vscode while running the notebook. I get the message "Extension host terminated uexpectedly."

Steps to reproduce:

  1. Create a notebook and include an ipywidgets.Fileupload. Run the cell, it displays fine. Click "upload", select the file you would like to upload. When you click "OK" to close the file browser dialog you get the error message.

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

@beralves beralves added the bug Issue identified by VS Code Team member as probable bug label Jan 27, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Jan 27, 2021

Thanks for the bug. We haven't tried using FileUpload before, but we'll see if we can repro with it.

@rchiodo
Copy link
Contributor

rchiodo commented Jan 27, 2021

Yep crashes the host for me too. Just do this:

widgets.FileUpload(accept='', multiple = False)

Then click on the Upload button and pick a text file. Extension host will die

@rchiodo
Copy link
Contributor

rchiodo commented Jan 27, 2021

Looks to me like a message buffer being to big. Callstack for crash is here:

postToSocket (d:\Source\vscode-jupyter\src\client\datascience\raw-kernel\rawSocket.ts:230)
(anonymous function) (d:\Source\vscode-jupyter\src\client\datascience\raw-kernel\rawSocket.ts:222)
VM_Unknown (undefined:97)
[ Promise.then ]
sendMessage (d:\Source\vscode-jupyter\src\client\datascience\raw-kernel\rawSocket.ts:221)
sendToRealKernel (d:\Source\vscode-jupyter\src\client\datascience\raw-kernel\rawSocket.ts:104)
sendPendingMessages (d:\Source\vscode-jupyter\src\client\datascience\ipywidgets\ipyWidgetMessageDispatcher.ts:354)
sendRawPayloadToKernelSocket (d:\Source\vscode-jupyter\src\client\datascience\ipywidgets\ipyWidgetMessageDispatcher.ts:142)
receiveMessage (d:\Source\vscode-jupyter\src\client\datascience\ipywidgets\ipyWidgetMessageDispatcher.ts:109)
receiveMessage (d:\Source\vscode-jupyter\src\client\datascience\ipywidgets\ipyWidgetMessageDispatcherFactory.ts:42)
onMessage (d:\Source\vscode-jupyter\src\client\datascience\ipywidgets\commonMessageCoordinator.ts:106)
(anonymous function) (d:\Source\vscode-jupyter\src\client\datascience\ipywidgets\notebookIPyWidgetCoordinator.ts:88)
fire (event.ts:623)
onDidReceiveMessage (extHostNotebook.ts:44)
$onDidReceiveMessage (extHostNotebook.ts:612)
_doInvokeHandler (rpcProtocol.ts:409)
_invokeHandler (rpcProtocol.ts:394)
_receiveRequest (rpcProtocol.ts:310)
_receiveOneMessage (rpcProtocol.ts:246)
(anonymous function) (rpcProtocol.ts:105)

@rchiodo
Copy link
Contributor

rchiodo commented Jan 27, 2021

The ZMQ library is crashing trying to send the data to kernel.

@beralves
Copy link
Author

Hi, any plans for this issue? I'm happy to test if needed.

@rchiodo
Copy link
Contributor

rchiodo commented Mar 11, 2021

There are no plans to fix this at the moment. We generally wait for more feedback before prioritizing.

A workaround might be to start your own jupyter server and set it as the 'remote' URI to connect to. That should use a different communication mechanism to send the data to the kernel then. I haven't tried it though.

@beralves beralves closed this as completed Jul 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
@DonJayamanne DonJayamanne removed the bug Issue identified by VS Code Team member as probable bug label Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants