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 display not working on Crostini (Linux on ChromeOS) #1935

Closed
msiniscalchi opened this issue Feb 6, 2020 · 15 comments
Closed

PDF display not working on Crostini (Linux on ChromeOS) #1935

msiniscalchi opened this issue Feb 6, 2020 · 15 comments
Labels
external issue Issue with something else than LaTeX-Wokshop

Comments

@msiniscalchi
Copy link

LaTeX workshop works just fine under Crostini (Linux on ChromeOS). However, PDF preview does not work. When viewing the PDF file, the display is corrupted -- only part of the page is shown. See attached image
Screenshot 2020-02-05 at 11 45 41 PM
.
Zooming in or out a few times does seem to cause the entire page to be displayed, but there does not seem to be any empirical regularity.

This is under VSCode 1.41.1, LaTeX Workshop 8.7.1.

FYI by default, Crostini provides a Debian VM. In my case, I am running Buster.

@jlelong
Copy link
Collaborator

jlelong commented Feb 6, 2020

  • Can you post anything suspicious from the console logs (to access the log, click 'help' -> 'Toggle Developer Tools')?

  • Can you try to open your .pdf file in Chrome (View LaTeX PDF > View in web browser)?

@tamuratak
Copy link
Contributor

I think we can do nothing on our side.

@tamuratak tamuratak added the external issue Issue with something else than LaTeX-Wokshop label Feb 6, 2020
@jszarin
Copy link

jszarin commented Feb 6, 2020

Can verify. Issue is also present on crostini with the default debian stretch container. The PDF will appear correctly on chromeos if loaded into the browser from the file manager.

@msiniscalchi
Copy link
Author

Thank you all! I'll check the console logs tonight---I'm at work now. @jszarin @jlelong one thing I can say for sure is that PDFs render perfectly in the browser (as well as in Evince, for that matter). The issue is only with PDFs rendered by PDF.js/LaTeX Workshop within VSCode.

I wonder if there have been similar reports regarding Wayland. ChromeOS uses Wayland natively, and X apps run via xwayland. But I don't know if VSCode runs as an X app. Just throwing ideas out for smarter people to mull over :-)

@seragunn
Copy link
Contributor

seragunn commented Feb 6, 2020

It works fine on Wayland for me.

@tamuratak
Copy link
Contributor

Related to microsoft/vscode/issues/1031.

@msiniscalchi
Copy link
Author

@jlelong there is nothing strange in the dev console. When I open the PDF viewer,this is added to the log:

[Embedded Page] PDF 331f608807138a54b3e60379aed33350 [1.5 pdfTeX-1.40.19 / TeX] (PDF.js: 2.2.228)

and, to the right of this message,

webviewElement.ts:241

Now where it gets interesting is this. I have set up Firefox as the default web browser in Crostini. So, when I invoke the web view option from the extension, Firefox opens up----and I have the exact same issue: rendering is wrong. But, if I open the file in Chrome (or Evince under Crostini), all is fine.

Since I believe Firefox uses PDF.js, that's probably where the issue is.

@msiniscalchi
Copy link
Author

@jlelong sorry, I gave you incorrect information.

My default browser in Crostini is Chromium, not Firefox. However, it appears that, when the PDF file is opened from within VSCode, using the "View in web browser" option in LaTeX Workshop, I do get the corruption issue. Also, opening the developer tools in Chromium shows that PDF.js is used to render the file.

If instead I open the PDF file directly from Chromium, rendering is correct---but it's also apparent that Chromium's internal PDF renderer is used.

@jlelong
Copy link
Collaborator

jlelong commented Feb 7, 2020

This looks like a pdf.js issue. So I am closing this bug report but if you can make a create MWE pdf file, you can post a bug report against pdf.js.

@jlelong jlelong closed this as completed Feb 7, 2020
@jlelong jlelong added pdf.js issue Issue related to PDF.js itself and removed external issue Issue with something else than LaTeX-Wokshop labels Feb 7, 2020
@tamuratak tamuratak added external issue Issue with something else than LaTeX-Wokshop and removed pdf.js issue Issue related to PDF.js itself labels Feb 11, 2020
@tamuratak
Copy link
Contributor

See mozilla/pdf.js/issues/11575. This problem should be reported to Chrostini itself.

@msiniscalchi
Copy link
Author

That was in response to my bug report there, and yes, I have reported the issue on the chromium bug tracker. Fingers crossed!

@tamuratak
Copy link
Contributor

@msiniscalchi Thank you for reporting this issue to the Chromium dev team.

This problem is tracked in https://bugs.chromium.org/p/chromium/issues/detail?id=1050344.

@msiniscalchi
Copy link
Author

It would help if people star the issue on the Chromium bug tracker. Right now the bug is marked "available," which means that it was verified, but nobody is currently working on it. The more people star it, the more likely it becomes that someone will pick it up. Thank you!

@tamuratak
Copy link
Contributor

Starting VS Code with --disable-gpu might solve this issue. https://code.visualstudio.com/docs/supporting/FAQ#_vs-code-is-blank

@msiniscalchi
Copy link
Author

msiniscalchi commented Mar 22, 2020 via email

Repository owner locked as resolved and limited conversation to collaborators Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
external issue Issue with something else than LaTeX-Wokshop
Projects
None yet
Development

No branches or pull requests

5 participants