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

webview.html not work in new version in remote-ssh mode #178191

Closed
TianQinS2 opened this issue Mar 24, 2023 · 10 comments
Closed

webview.html not work in new version in remote-ssh mode #178191

TianQinS2 opened this issue Mar 24, 2023 · 10 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@TianQinS2
Copy link

TianQinS2 commented Mar 24, 2023

workPanel = vscode.window.createWebviewPanel(
            'workNormal',
            'work',
            vscode.ViewColumn.Beside,
            {
                enableScripts: true, 
                retainContextWhenHidden: true,
                localResourceRoots: [context.extensionUri]
            }
        );

        workPanel.webview.html = `<!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <meta http-equiv="Content-Security-Policy" content="default-src 'none';">
            <title>Cat Coding</title>
        </head>
        <body>
            <img src="https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy.gif" width="300" />
        </body>
        </html>`;
        console.log(workPanel.webview.html);
  1. workPanel.webview.html =''' is right in local mode, but not work in remote-ssh mode.
  2. This problem occurred in recent versions, previous version is normal.
  3. It likes an empty webview, not load html content, and small probability normal.
@TianQinS2
Copy link
Author

TianQinS2 commented Mar 24, 2023

NetWork
Right:
index.html?id=xxxx
fake.html?id=xxxx
// js css

Now:
Only
index.html?id=xxxx

@TianQinS2
Copy link
Author

TianQinS2 commented Mar 24, 2023

Basically unable to load, occasionally normal in remote-ssh mode.
Always normal in local mode.

@Kcalb35
Copy link

Kcalb35 commented Mar 24, 2023

I have almost the same issure which vscode cannot render *.jpg file or *.ipynb in remote-ssh.

@TianQinS2
Copy link
Author

https://github.com/eightHundreds/vscode-drawio
I install this extension, it has the same problem in remote-ssh in lastest version.

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 24, 2023

What version of VS Code are you using?

/needsMoreInfo

@vscodenpa vscodenpa added the ~info-needed Issue requires more information from poster (with bot comment) label Mar 24, 2023
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@vscodenpa vscodenpa added info-needed Issue requires more information from poster and removed ~info-needed Issue requires more information from poster (with bot comment) labels Mar 24, 2023
@Kcalb35
Copy link

Kcalb35 commented Mar 25, 2023

What version of VS Code are you using?

/needsMoreInfo

vscode version: 1.76.2
remote-ssh extension version: 0.98.0

When I SSH into one of my servers, VSCode is unable to display any Jupyter Notebook or JPG files. The image below shows a snapshot of the developer tool for this issue.
image

In contrast, when I use SSH-Remote to connect to my WSL, Jupyter Notebooks work fine. The image below shows a comparison snapshot of the developer tool.
image

Do you have any clues or need any additional information? as I rely heavily upon Jupyter Notebook for conducting data analysis in my research endeavor

@Kcalb35
Copy link

Kcalb35 commented Mar 25, 2023

And I try to give you more descriptions of this bug.

  1. When my cursor hovers atop the notebook, two buttons, two buttons appeared
    image
  2. When I right-click any location within this notebook, the drop-down menu behaved quite normal as if I had clicked an invisible jupyter cell
    image

@Kcalb35
Copy link

Kcalb35 commented Mar 25, 2023

In this issue, the author proposes that the issue has been resolved in the preview version. I have attempted to replicate this remedy. microsoft/vscode-jupyter#13148 So this issure can be seen as solved.

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 27, 2023

Duplicate of #166860

@mjbvz mjbvz marked this as a duplicate of #166860 Mar 27, 2023
@mjbvz mjbvz closed this as completed Mar 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants