Closed michael-markl closed 3 months ago
We have added some logics to reconnect the viewer with the extension after sleep, but they may not work for all network/pc configs. Reopening PDF is the only robust and reliable solution, unfortunately.
Thanks for letting me know; maybe, we can add this to the FAQ in the section SyncTex?
Done.
It seems the mechanism for reconnecting the web socket is broken. I would open a PR later today (if you'd like to have a look at it).
Pre-checks
Environment*
The Issue*
After hibernation (
shutdown /h
), SyncTex and Backward-SyncTex stop working. After closing and reopening the PDF tab in VSCode, SyncTex works again.Reproduction Steps
main.tex
and a correspondingmain.pdf
next to it in VSCodeshutdown /h
)Expected Behavior
SyncTex functionality should survive a hybernate cycle.
Logs
LaTeX Workshop Output*
Developer Tools Console
11:06:04.535 configurationModels.ts:270 Ignoring latex-workshop.synctex.indicator.enabled as latex-workshop.synctex.indicator is "rectangle" (anonymous) @ configurationModels.ts:270
11:06:04.598 log.ts:419 INFO Started local extension host with pid 17864.
11:06:04.727 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/TeX.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:04.727 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex.latex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/LaTeX.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:04.727 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.bibtex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/Bibtex.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:04.727 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/markdown-latex-combined.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:04.727 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/cpp-grammar-bailout.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:05.079 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/TeX.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:05.080 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex.latex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/LaTeX.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:05.080 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.bibtex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/Bibtex.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:05.080 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/markdown-latex-combined.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:05.080 TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex. Old grammar file: file:///c%3A/Users/markl07/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json. New grammar file: file:///c%3A/Users/markl07/.vscode/extensions/james-yu.latex-workshop-9.20.0/syntax/cpp-grammar-bailout.tmLanguage.json register @ TMScopeRegistry.ts:46
11:06:05.400 webviewElement.ts:482 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing. mountTo @ webviewElement.ts:482
11:06:07.939 configurationModels.ts:270 Ignoring latex-workshop.synctex.indicator.enabled as latex-workshop.synctex.indicator is "rectangle" (anonymous) @ configurationModels.ts:270
11:06:25.380 log.ts:419 INFO [perf] Render performance baseline is 23ms
<---------- (Possibly I triggered hybernation exactly here)
11:06:40.802 latexworkshop.js:493 Closed: WebScocket to LaTeX Workshop.
11:07:30.501 latexworkshop.js:516 Try to reconnect to LaTeX Workshop: (1/10).
11:07:31.270 connection.js:12 WebSocket connection to 'ws://127.0.0.1:49924/' failed: (anonymous) @ connection.js:12
11:07:31.272 connection.js:16 Uncaught (in promise) Error: Failed to connect to ws://127.0.0.1:49924/ at WebSocket. (connection.js:16:57)