We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not sure if it is an issue of Remote-SSH or VSCode. So I already raised an issue there: microsoft/vscode#102449 which originates from REditorSupport/vscode-R#380.
To summarize, the following extension code is used to create the WebView.
function showBrowser(url: string, title: string, viewer: string | boolean) { console.info(`[showBrowser] uri: ${url}, viewer: ${viewer}`); if (viewer === false) { env.openExternal(Uri.parse(url)); } else { const port = parseInt(new URL(url).port); const panel = window.createWebviewPanel( 'browser', title, { preserveFocus: true, viewColumn: ViewColumn[String(viewer)], }, { enableScripts: true, retainContextWhenHidden: true, portMapping: [ { extensionHostPort: port, webviewPort: port, }, ], }); panel.webview.html = getBrowserHtml(url); } console.info('[showBrowser] Done'); } function getBrowserHtml(url: string) { return ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> html, body { height: 100%; padding: 0; overflow: hidden; } </style> </head> <body> <iframe src="${url}" width="100%" height="100%" frameborder="0" /> </body> </html> `; }
showBrowser("http://127.0.0.1:22784/library/base/html/get.html", "title", "Active")
showBrowser("http://127.0.0.1:22784/library/base/html/get.html", "title", false)
It looks like the WebView port mapping is not enabled upon creation even though I specify portMapping.
portMapping
Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No
The text was updated successfully, but these errors were encountered:
//cc: @mjbvz
Sorry, something went wrong.
Any updates on this? It looks like extensions that rely on WebView port mapping are completely broken.
@rpodcast confirms that the same problem also occurs in development container. Then it seems that the port mapping problem is not only limited to SSH.
@Chuxel @mjbvz
@mjbvz Should this be closed in favor of the VS Code issue? (microsoft/vscode#102449)
duplicate of microsoft/vscode#102449
No branches or pull requests
Not sure if it is an issue of Remote-SSH or VSCode. So I already raised an issue there: microsoft/vscode#102449 which originates from REditorSupport/vscode-R#380.
To summarize, the following extension code is used to create the WebView.
showBrowser("http://127.0.0.1:22784/library/base/html/get.html", "title", "Active")
shows blank WebView.showBrowser("http://127.0.0.1:22784/library/base/html/get.html", "title", false)
opens a local web browser page which shows correctly.showBrowser("http://127.0.0.1:22784/library/base/html/get.html", "title", "Active")
again and the WebView shows correctly too.It looks like the WebView port mapping is not enabled upon creation even though I specify
portMapping
.Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
The text was updated successfully, but these errors were encountered: