-
Notifications
You must be signed in to change notification settings - Fork 5.9k
PDF content blocked over /proxy/<port>/ #2413
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
Comments
I tried to replicate this but in my case the PDF server keeps giving me
a 500 so I'll need to look more into that.
As for the JS files not running, this is just a guess but maybe they're
requesting against the root (`/viewer.js`) instead of against the proxy
path (`/proxy/<port>/viewer.js`).
|
Related: #1862 |
If you used the latest version of https://github.com/c0ppelius/latex_code-server, then that might be a problem. I ended going back using subdomains instead of subpaths in the current version. The original still has subpaths. I should emphasize that subdomains works out of the box (from https://github.com/lukas-hetzenecker/LaTeX-Workshop) so subpaths isn't a pressing issue. I would guess that somewhere in there the /proxy/port/ is messing up formatting of a query of the url but I haven't found it yet. |
Root viewer.js vs proxy path viewer.js is a problem. It previously could not locate it and other scripts. But, it doesn't seem to solve the issue. In fact, the behavior seems the same. The tool bar renders but not the pdf inside the main container. |
@c0ppelius any news on getting the pdf viewer working? I think this could be a really a nice piece to push code-server even more. |
95% all the issues lie in how the latex-workshop is written (the url for pdf viewer server in particular) so this isn't a code-server problem. It is only a problem if you want to use the built in pdf viewer with the latex-workshop extension (say because you like the synctex integration and don't want to write) while using code-server. If you specifically want a working pdf viewer in the latex-workshop extension, you can modify the source code as shown here and compile the vsix yourself. I did this and have been using it without issue for months. |
Hi c0ppelius. Could you push the latest compiled VSIX to GitHub? I guess many people like me would also need it! |
It was too much to keep up this updated. A few months ago when an old VSIX didn't work properly I threw in the towel and moved to vim. Hopefully with recent news there will be a push from MSFT to get all extensions working properly in a remote environment. Best of luck. |
I have created the extension working in 9.2.2 |
Thanks for that @modaresimr -- unfortunately, that build doesn't work for me (code-server 4.5.1, from the |
I have merged it with the latest code of latex workshop James-Yu/LaTeX-Workshop#3639 |
It is already merged to the code and in the next version of latex workshop you can see it :) |
First, let me thank you for a great product. My general workflow involves a lot of drawing and frequent use of latex. An iPad makes a perfect travel companion once it comes with a functional latex IDE. Code-server makes that happen. The only issue is the built-in pdf viewer. (Other pdf viewer extensions can be substituted but do not have built in synctex nor behave as smoothly.) In Latex Workshop extension currently, the pdf viewer listens on localhost: which is not accessible.
The best VS Code extension for latex is currently Latex Workshop. Unfortunately, the developers there have chosen to not support code-server. As such, one needs to hack in a solution to point their pdf server at code-server.
Of the two methods, available subpaths or subdomains, I chose subpaths. I modified the source to include a code-server flag and url (
https://code.example.com
below) in the extension settings. The result defaults to the existing setup if the code-server flag is not enabled. Otherwise, it directs the pdf server to serve the pdf file athttps://code.example.com/proxy/<port>/
Here is a complete example URL generated:The behavior in code-server is shown here and if I try to open directly in Firefox I see the toolbox for the pdf viewer but no content. The pdf server is poking through but the pdf itself is not.
My approach is very similar to that of @lukas-hetzenecker taken at #James-Yu/LaTeX-Workshop#2341 except that subdomains are implemented there.
code-server --version
: 3.7.4When adding the extension to your code-server install, I have found it loaded incompletely (even with multiple versions of the official release) unless one rigorously follows the following steps:
You can find the modified vsix here.
The text was updated successfully, but these errors were encountered: