Closed Fourthbus closed 6 months ago
I suspect there's something to do with the error output
Content-Security-Policy: The page's settings blocked the loading of a resource at inline ("default-src").
The page loads properly when I type the URL to the host computer (despite vscode UI isn't running there). However, the same page would not be accessible on a remote instance with ssh port forwarding.
CSP for viewer.html
has not been changed for two years. Please refer to the remote-ssh extension for possible changes that may lead to the issue, which I am not aware of.
https://github.com/James-Yu/LaTeX-Workshop/blame/master/viewer/viewer.html#L28
I downgraded the Remote - SSH extension from 0.108.0 to 0.107.1 and this error went away. Strangely, I can't find the changelog for the remote ssh extension.
I downgraded the Remote - SSH extension from 0.108.0 to 0.107.1 and this error went away. Strangely, I can't find the changelog for the remote ssh extension.
I agree with you. It seems to be related to Remote-SSH. When I manually do port forwarding ssh -L
to the exact same port it works without any problem.
There's seems to have similar issue https://github.com/microsoft/vscode-remote-release/issues/9594 with other peoples' web page.
Solution is here https://github.com/microsoft/vscode-remote-release/issues/9548
"remote.SSH.useExecServer": false
Pre-checks*
Environment*
The Issue*
I connected to a latex directory on a remote server via ssh, when I tried to view a pdf, the page failed to render (see attached photo):
Reproduction Steps
Expected Behavior
Logs
LaTeX Workshop Output*
Developer Tools Console
(anonymous) @ index.html:1003 setTimeout (async) onFrameLoaded @ index.html:1001 (anonymous) @ index.html:1032 127.0.0.1:40725/viewer.html?file=pdf..ZmlsZSUzQSUyRiUyRiUyRmhvbWUlMkZ6YzI4MiUyRmxhdGV4X2RvY3MlMkZjb29saW5nX2NmZCUyRmJ1aWxkJTJGY29uZmlndXJhdGlvbi5wZGY:35
127.0.0.1:40725/viewer.html?file=pdf..ZmlsZSUzQSUyRiUyRiUyRmhvbWUlMkZ6YzI4MiUyRmxhdGV4X2RvY3MlMkZjb29saW5nX2NmZCUyRmJ1aWxkJTJGY29uZmlndXJhdGlvbi5wZGY:38
Loading failed for the module with source “http://127.0.0.1:40725/out/viewer/latexworkshop.js”. viewer.html:38:59 Content-Security-Policy: The page's settings blocked the loading of a resource at inline ("default-src"). sandbox eval code:107:351 Source map error: Error: request failed with status 404 Resource URL: http://127.0.0.1:40725/build/pdf.mjs Source Map URL: pdf.mjs.map