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

PDF webview breaks with LaTeX Workshop extension using modified THEIA_WEBVIEW_EXTERNAL_ENDPOINT #14287

Open
dannaf opened this issue Oct 10, 2024 · 0 comments

Comments

@dannaf
Copy link

dannaf commented Oct 10, 2024

Bug Description:

Upon installing the LaTeX Workshop extension in Theia, PDF webview breaks. (I have a modified environment variable as THEIA_WEBVIEW_EXTERNAL_ENDPOINT={{hostname}} — this may be a duplicate of #8857 or at least related to it.)

Steps to Reproduce:

  1. Host theia with THEIA_WEBVIEW_EXTERNAL_ENDPOINT={{hostname}}
  2. Place a pdf file in a folder accessible to theia. Click on it to verify that it opens in a webview tab within theia. (I.e., can view it inside theia, without opening a separate browser tab.) Close the pdf webview to prepare for Step 3.
  3. Install the LaTeX Workshop extension. (Wait for installation to finish.)
  4. Click on the same pdf file; observe the webview fail to load the pdf file:

image

Just to clarify, although in this issue I am installing the LaTeX Workshop, I am not interacting with any LaTeX file here, nor am I even accessing the PDF webview via the viewing button provided by the LaTeX Workshop extension: I am simply clicking on a pdf file from the Explorer to open it in a webview the same as was working before installing the extension, and now it doesn't work after installing the extension.

Additional Information

Upon installing the LaTeX Workshop extension (at the end of Step 2, even before reopening the PDF file in Step 3) there are already error messages about webviews:

theia-1  | 2024-10-10T13:12:32.755Z root ERROR [hosted-plugin: 55] Promise rejection not handled in one second: Error: Unknown Webview: efaa3554-c90d-4923-b4d6-93531a945a44 , reason: Error: Unknown Webview: efaa3554-c90d-4923-b4d6-93531a945a44
theia-1  | 2024-10-10T13:12:32.755Z root ERROR [hosted-plugin: 55] With stack trace: getWebview@https://my.hostname.com/vendors-node_modules_theia_plugin-ext_lib_hosted_browser_hosted-plugin_js.js:15407:19
theia-1  | 2024-10-10T13:12:33.737Z root ERROR [hosted-plugin: 55] Promise rejection not handled in one second: Error: Unknown Webview: efaa3554-c90d-4923-b4d6-93531a945a44 , reason: Error: Unknown Webview: efaa3554-c90d-4923-b4d6-93531a945a44
theia-1  | With stack trace: getWebview@https://my.hostname.com/vendors-node_modules_theia_plugin-ext_lib_hosted_browser_hosted-plugin_js.js:15407:19

During Step 3 I did not see any log or error messages, simply the webview failed to open.

Comment

Unlike in #8857 where that user changed the THEIA_WEBVIEW_EXTERNAL_ENDPOINT variable because it was "useful when running Theia over HTTPS and relying upon a wildcard SSL certificate" (here), I changed that environment variable because I found it useful for avoiding the use of wildcard SSL certificates altogether when serving over https. (With other security measures, namely basic auth.)

Version info

  • Operating System: Oracle Linux 2022 hosting, Windows 11 accessing via browser
  • Theia Version: 1.54.0 (via Firefox 131.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant