interactive icon indicating copy to clipboard operation
interactive copied to clipboard

text/html MIME type does not display in VSCode web editors

Open johnW-ret opened this issue 1 year ago • 2 comments

Describe the bug

Types registered with text/html MIME type do not display in vscode.dev or github.dev. This can be observed by running one of the HousingML sample notebooks in a Codespace in github.dev

I only got the sample working when I removed the version numbers for the referenced packages.

.NET Interactive Version:

Version: 1.0.462701+bc12bb7969ef019c58c96139668e4a9f2cf1ac2e

Library version: 1.0.0-beta.23627.1+bc12bb7969ef019c58c96139668e4a9f2cf1ac2e

Build date: 2023-12-29T21:18:39.3071645Z

Environments

Edge, Edge Mobile, Visual Studio Code for Web via github.dev and vscode.dev, Codespaces and VS Code dev tunnel.

Screenshots

You can observe that space is allocated or displaying the content, but none of it is displayed. This does not change when formatting only static images as output. Python Jupyter notebooks in the web do not have this problem. Screenshot_20231229-153008

johnW-ret avatar Dec 29 '23 21:12 johnW-ret

This issue is broader than that. Polyglot Notebooks depends on having a kernel running, and the github.dev experience uses only in-browser resources.

jonsequitur avatar Jan 02 '24 20:01 jonsequitur

My original post was poorly worded, and I needed to perform more tests. The issue is not as broad as I thought it was:

  • Opening any Polyglot Notebook file in github.dev without a Codespace shows that the Polyglot Notebooks extension isn't available for web, which has been the case for a while and is not unexpected behavior.
  • Opening dotnet/interactive in a Codespace results in container build errors, which is probably a separate issue of its own.

    Error: Command failed: docker inspect --type image mcr.microsoft.com/vscode/devcontainers/dotnet:0-8.0 Error code: 1302 (UnifiedContainersErrorFatalCreatingContainer)

  • Creating a new Codespace from the .NET template and running HousingML.ipynb works 100% as intended, with graphs rendered in the output properly.
  • Downloading the same notebook to my computer and running it in VS Code with the Polyglot Notebooks extension works 100% as intended.
  • When opening a VS Code tunnel on that computer via code tunnel, then accessing HousingML.ipynb via vscode.dev (Polyglot Notebooks automatically installed because it's on my computer), most outputs render but images and web views fail to render, though the space where they would be rendered is allocated and pushes the cell below down, as pictured above.

So the issue is not with github.dev at all actually, but code tunnel and vscode.dev. However, the same issue does not occur with Python Jupyter Notebooks via vscode.dev, so I'm not sure in which repo this issue belongs.


In the meantime, I'm glad I can create a new .NET Codespace, install the Polyglot Notebooks extension, and immediately get coding, or I can probably create a .devcontainer for a repo with a polyglot notebook, but I'd like to be able to leave my computer on and use my own compute for free via code tunnel.

johnW-ret avatar Jan 08 '24 22:01 johnW-ret