James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.42k stars 519 forks source link

No PDF refresh on code-server after update 10.0.0 #4306

Closed wasalm closed 1 week ago

wasalm commented 1 week ago

After the update of 10.0.0, the build in pdf viewer does not refresh after building, when running LaTeX-Workshop in code-server.

The issue originates from the the viewer/components/refresh.ts line 79. Namely, this file retrieves the new path and updates the viewer. As you may see it uses an absolute path for the pdf. This interferes with the proxy system of code-server, which prefixes different ports by /proxy/{RANDOM_PORT_NUMBER}. Hence, the pdf cannot be loaded as it receives an 404 error.

When removing the leading slash in line 79, the issue would be fixed.