Download png not working in R Shiny

I’ve created an app including plotly charts in R Shiny and am experiencing problems with the “download plot as png” button. When I click the button, I get error messages. This problem seems to be more widespread than just my app: the same happens on the “Getting Started with Shiny and Plotly in R” page - see below.

Any help with a solution would be much appreciated.

Interesting. Support client-side downloading can vary strongly from OS / browser / plotly.js / plotly R library version.

Would you mind sharing these info?

Thanks Etienne. The details are below - it looks like a browser issue:

OS: Windows 7 Enterprise
browser: Chrome 51.0.2704.106 m (though I’ve now found it works correctly in Firefox 31.3.0)
plotly.js: not sure how to find this
plotly R library: 3.6.0

Thanks for the info.

This was indeed a bug in Chrome 51 with an old plotly.js version (about two months ago).

Updating your plotly R library should fix this issue.

I’d already tried that - 3.6.0 is the most recent version I can download.

Right. 3.6.0 is the latest version on CRAN. You can try installing the latest dev release with

devtools::install_github("ropensci/plotly")

More info here.

The up-and-coming 4.0 should resolve most of these snapshot issues in both RStudio Viewer and Chrome.