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 doesn't refresh nor sync in code-server (under JupyterHub) #4158

Closed
sylvaticus opened this issue Feb 8, 2024 · 5 comments
Closed

PDF doesn't refresh nor sync in code-server (under JupyterHub) #4158

sylvaticus opened this issue Feb 8, 2024 · 5 comments

Comments

@sylvaticus
Copy link

sylvaticus commented Feb 8, 2024

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [ x] The issue has not been reported in this repository.
  • [ x] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [ x] The FAQ cannot address the issue (well, it is written code-server is not supported, but perhaps it is something with an easy workaround, everything else works).
  • [ x] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: [e.g. Windows 10] Ubuntu 22.04
  • Visual Studio Code Version: [e.g. 1.41.0] 4.1.0
  • LaTeX Workshop Version: [e.g. 8.5.0] doesn't apply
  • TeX Distribution Version: [e.g. TeX Live 2019 / MiKTeX 2.9.7250] doesn't apply

Please list the environment and version number if you are using VSCodium, Snap or Flatpack versions of Visual Studio Code, and/or Visual Studio Code Remote Containers/SSH/WSL.

  • I am using code-server: v4.20.1; Code: v1.85.2 (in JupyterHub v4.1.0)
  • I have installed VSCode on top of JupyterHub with :
curl -fsSL https://code-server.dev/install.sh | sh
pip3 install jupyter-server-proxy
pip3 install jupyter-vscode-proxy

The Issue*

Please briefly describe the issue you come across.

The extension works great but PDF preview is not refreshed and sync (both way) doesn't work.

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

  1. code-server --install-extension latex-workshop
  2. Make a basic latex file and save it
  3. Click "View Latex PDF" in the "command section"
  4. Edit the tex and save
  5. Click again "View Latex PDF"

Expected Behavior

What were you expecting to see? Include any relevant examples or documentation links.

  • PDF refreshed :-)

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered.

[14:49:01.214][Cacher][Watcher] "change" emitted on %WS1%/test.tex.
[14:49:01.215][Cacher] Caching %WS1%/test.tex .
[14:49:01.216][Cacher] Updated inputs of %WS1%/test.tex .
[14:49:01.216][Cacher] Parse LaTeX AST: %WS1%/test.tex .
[14:49:01.216][Build] Auto build starteddetecting the change of a file: %WS1%/test.tex .
[14:49:01.216][Event] AUTO_BUILD_INITIATED: {"type":"onFileChange","file":"%WS1%/test.tex"}
[14:49:01.216][Build] The document of the active editor: file://%WS1%/test.tex
[14:49:01.216][Build] The languageId of the document: latex
[14:49:01.216][Build] Building root file: %WS1%/test.tex
[14:49:01.217][Build][Recipe] Build root file %WS1%/test.tex
[14:49:01.217][Event] FILE_CHANGED: "%WS1%/test.tex"
[14:49:01.232][Cacher] Parsed LaTeX AST: %WS1%/test.tex .
[14:49:01.232][File] Calling kpsewhich to resolve article.cls .
[14:49:01.288][Cacher] Updated elements in 55.72 ms: %WS1%/test.tex .
[14:49:01.288][Event] FILE_PARSED: "%WS1%/test.tex"
[14:49:01.289][Structure] Structure force updated with 2 root sections for %WS1%/test.tex .
[14:49:01.289][Event] STRUCTURE_UPDATED
[14:49:01.290][Extension] onDidSaveTextDocument triggered: file://%WS1%/test.tex
[14:49:01.683][Extension] onDidSaveTextDocument triggered: file://%WS1%/test.tex
[14:49:01.684][Build][Recipe] Preparing to run recipe: latexmk.
[14:49:01.684][Build][Recipe] Prepared 1 tools.
[14:49:01.685][Build][Recipe] outDir: %WS1% .
[14:49:01.685][Build] Recipe step 1 The command is latexmk:["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=%WS1%","%WS1%/test"].
[14:49:01.685][Build] env: {}
[14:49:01.685][Build] root: %WS1%/test.tex
[14:49:01.686][Build] cwd: %WS1%
[14:49:01.693][Build] LaTeX build process spawned with PID 50033.
[14:49:01.704][Cacher][Watcher] "change" emitted on %WS1%/test.tex.
[14:49:01.706][Cacher] Caching %WS1%/test.tex .
[14:49:01.706][Cacher] Updated inputs of %WS1%/test.tex .
[14:49:01.706][Cacher] Parse LaTeX AST: %WS1%/test.tex .
[14:49:01.706][Build] Auto build starteddetecting the change of a file: %WS1%/test.tex .
[14:49:01.707][Event] AUTO_BUILD_INITIATED: {"type":"onFileChange","file":"%WS1%/test.tex"}
[14:49:01.707][Build] Autobuild temporarily disabled.
[14:49:01.707][Event] FILE_CHANGED: "%WS1%/test.tex"
[14:49:01.724][Cacher] Parsed LaTeX AST: %WS1%/test.tex .
[14:49:01.724][File] Calling kpsewhich to resolve article.cls .
[14:49:01.780][Cacher] Updated elements in 55.81 ms: %WS1%/test.tex .
[14:49:01.780][Event] FILE_PARSED: "%WS1%/test.tex"
[14:49:01.781][Structure] Structure force updated with 2 root sections for %WS1%/test.tex .
[14:49:01.781][Event] STRUCTURE_UPDATED
[14:49:02.072][Parser][TexLog] Logged 0 messages.
[14:49:02.073][Build] Finished a step in recipe with PID 50033.
[14:49:02.073][Build] Successfully built %WS1%/test.tex .
[14:49:02.073][Event] BUILD_DONE
[14:49:02.073][Viewer] Call refreshExistingViewer: "%WS1%/test.pdf" .
[14:49:02.073][Viewer] Refresh PDF viewer: %WS1%/test.pdf
[14:49:02.074][Cacher] Parsing .fls %WS1%/test.fls .
[14:49:02.077][Cacher] Found .aux %WS1%/test.tex from .fls %WS1%/test.fls , parsing.
[14:49:02.078][Cacher] Parsed .aux %WS1%/test.tex .
[14:49:02.078][Cacher] Parsed .fls %WS1%/test.fls .
[14:49:02.488][Cacher][Watcher] "change" emitted on %WS1%/test.pdf after polling for 250 ms.
[14:49:02.489][Viewer] Call refreshExistingViewer: "%WS1%/test.pdf" .
[14:49:02.489][Viewer] Refresh PDF viewer: %WS1%/test.pdf
[14:49:02.489][Event] FILE_CHANGED: "%WS1%/test.pdf"

Developer Tools Console

Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click Help -> Toggle Developer Tools -> Console.

  • not available in code-server help menu

Anything Else?

Add any other context about the problem below.

The issue seems that the frame of the PDF preview of latex-workshop is itself not updated.
Indeed latex-workshop correctly issue a "preview" command, but that, as well any "manual" attempts of updating/refreshing fails.
The only thing to update the PDF is either to close the PDF preview tab and issue again the "View Latex PDF" command or to right click on the PDF -> This Frame -> Reload Frame (in Firefox, because Chrome doesn't have this option)

Sync also doesn't work (in both directions)

@James-Yu
Copy link
Owner

James-Yu commented Feb 8, 2024

@James-Yu James-Yu closed this as completed Feb 8, 2024
@sylvaticus
Copy link
Author

Yes thank you.. I did read it, but indeed the extension works well, if only there could be a way to force the refresh of the PDF in code-server it would be great...

@benz0li
Copy link

benz0li commented Feb 14, 2024

@benz0li
Copy link

benz0li commented Feb 15, 2024

Jupyter Server Proxy, indeed: jupyterhub/jupyter-server-proxy#446

@benz0li
Copy link

benz0li commented Feb 16, 2024

LaTeX Workshop v9.18.1 works just fine with code-server now.

@James-Yu How can we ensure it stays that way?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants