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

version 0.1.1 creates blank png files on Windows 10 #65

Open
massimoaria opened this issue Nov 15, 2023 · 4 comments
Open

version 0.1.1 creates blank png files on Windows 10 #65

massimoaria opened this issue Nov 15, 2023 · 4 comments

Comments

@massimoaria
Copy link

The new version 0.1.1 returns blank png files from HTML generated with visNetwork::visSave.
This happens only on Windows machines. The package works fine on Linux and Mac.
Trying to downgrade to 0.1.0, the function webshot returns to working perfectly.

@gadenbuie
Copy link
Member

Hi @massimoaria, can you share more information about which browser you're using with chromote (chromote::find_chrome() may help there) and the specific version of that browser?

@massimoaria
Copy link
Author

massimoaria commented Nov 16, 2023

HI @gadenbuie ,
here is what find_chrome() returns on my Windows PC:

chromote::find_chrome()
[1] "C:\Program Files\Google\Chrome\Application\chrome.exe"

Google chrome version:
119.0.6045.125 (Official Build) (64 bit)

I attached also an example of HTML file generated by visSave that webshot() returns as an empty PNG file.
file23f036e8ef2_files.zip

My workflow is the following:

  1. In a shiny dashboard (biblioshiny included in the package Bibliometrix), create a dynamic network object "p" through visNetwork package
  2. Save the object using the function visSave as an HTML file (that I attached here)
    visSave(p, html_filename)
  3. Creata a PNG file from the HTML using webshot
    webshot2::webshot(url = html_filename, zoom = 1, file = filename_png)

If I use the webshot2 0.1.0 the PNG file is perfect while using the new 0.1.1 version, the PNG file is empty (only 15kb instead of 700kb).

I checked the issue on 4 different Windows machines with different browsers based on Chrome engine (i.e. Edge, Opera, Chrome) and the results are the same: 0.1.0 works, 0.1.1 doesn't work.

For the moment, I added a workaround in my shiny app that checks the webshot2 version and installs the 0.1.0 if necessary.

@koenniem
Copy link

koenniem commented Dec 19, 2023

Same issue when saving Leaflet maps to png. Downgrading to 0.1.0 did not work unfortunately. chromote::find_chrome() returns a valid Chrome location.

Curiously, saving jpeg does seem to work.

@jay-sf
Copy link

jay-sf commented May 16, 2024

Same on Ubuntu 22.04.3 LTS, though v0.1.0 works. Minimal example here.

$ google-chrome --version
Google Chrome 125.0.6422.60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants