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

Webviews don't render as of version 1.12.0 #9272

Closed
Jarthianur opened this issue Mar 29, 2021 · 6 comments
Closed

Webviews don't render as of version 1.12.0 #9272

Jarthianur opened this issue Mar 29, 2021 · 6 comments
Labels
🤔 needs more info issues that require more info from the author webviews issues related to webviews

Comments

@Jarthianur
Copy link

Jarthianur commented Mar 29, 2021

Bug Description:

Webviews don't show any content, just a blank editor panel. This happens for example when opening a markdown document using builtin extension (1.49.3+). Said behavior started with latest release 1.12.0. No errors are emitted in console or theia.

Steps to Reproduce:

  1. build a basic theia application as docker image
  2. run container and access via browser
  3. open any markdown document
  4. find a blank editor panel instead of the files content

Additional Information

I know of the breaking change regarding webviews and their unique origin. All resources are received properly (no DNS or proxy issues). It's just that the webview seems to "do nothing". I've tried with Firefox, Chrome, HTTPS and HTTP, with and without proxy, on localhost and remotely, and also different versions of builtin extensions. The behavior is always the same.

I would like to add some screenshots, but GH even tells me "something went wrong" for 5MiB jpegs.

These are the requested resources involved at opening the file.

http://1e6d5e59-0a98-44c9-b130-03dc61356e26.webview.localhost:3000/webview/main.js
http://1e6d5e59-0a98-44c9-b130-03dc61356e26.webview.localhost:3000/webview/host.js
http://1e6d5e59-0a98-44c9-b130-03dc61356e26.webview.localhost:3000/webview/service-worker.js
http://1e6d5e59-0a98-44c9-b130-03dc61356e26.webview.localhost:3000/webview/fake.html?id=1e6d5e59-0a98-44c9-b130-03dc61356e26
  • Operating System: Linux
  • Theia Version: 1.12.0
@vince-fugnitto vince-fugnitto added 🤔 needs more info issues that require more info from the author webviews issues related to webviews labels Mar 29, 2021
@vince-fugnitto
Copy link
Member

@Jarthianur can you confirm which version of vscode-builtin-markdown-language-features you are using?
Newer versions such as 1.49.3 do not work due to #8752:

Backend Log:

root ERROR [hosted-plugin: 20568] With stack trace: TypeError: i.Uri.joinPath is not a function
    at t.MarkdownContentProvider.extensionResourcePath (/home/evinfug/workspaces/theia-work/plugins/vscode-builtin-markdown-language-features/extension/dist/extension.js:1:64434)
    at t.MarkdownContentProvider.provideTextDocumentContent (/home/evinfug/workspaces/theia-work/plugins/vscode-builtin-markdown-language-features/extension/dist/extension.js:1:63727)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async g.updatePreview (/home/evinfug/workspaces/theia-work/plugins/vscode-builtin-markdown-language-features/extension/dist/extension.js:1:74049)
    ```

@Jarthianur
Copy link
Author

@vince-fugnitto Yes, I can confirm that. I'll try out an earlier version.
Interestingly with the previous theia release 1.11, even version 1.51.1 of all builtins ran fine.

@vince-fugnitto
Copy link
Member

@vince-fugnitto Yes, I can confirm that. I'll try out an earlier version.

You can try with the version we use as part of the examples:

  • "vscode-builtin-markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.2/file/vscode.markdown-language-features-1.39.2.vsix",

Interestingly with the previous theia release 1.11, even version 1.51.1 of all builtins ran fine.

I'm not sure, we always used an older version of markdown-language-features since it had issues.
You might have been using @theia/preview functionality.

@Jarthianur
Copy link
Author

Ok works again with 1.39.2.

Is there any reason for especially this extension to be not compatible in a newer version?

@vince-fugnitto
Copy link
Member

Is there any reason for especially this extension to be not compatible in a newer version?

@Jarthianur for one, there is the following issue #8752, which will likely require a bigger change for monaco-editor.

@vince-fugnitto
Copy link
Member

Ok works again with 1.39.2.

Closing as there is no regression for webviews in 1.12.0. The issue about uri.joinPath is already being tracked in #8752 which should allow newer versions of the builtin being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 needs more info issues that require more info from the author webviews issues related to webviews
Projects
None yet
Development

No branches or pull requests

2 participants