-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
"Failed - network error" when downloading large png using toImage button #3771
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
Comments
Thanks for reporting! Interestingly, downloading your graph in FF66 works fine. Chrome must put a URL-length limit in plotly.js/src/snapshot/filesaver.js Lines 45 to 52 in 4529fe9
I found this stackoverflow post claiming that Chrome uses a 2MB limit. We should probably try using Interestingly, we were using createObjectURL to some extent back before #446 |
PoC in https://github.com/plotly/plotly.js/compare/createObjectURL We should be able to get a fix in the next minor 1.49.0 (I wouldn't want to try this our in a patch release). |
... to workaround Chrome URL length limit (#3771) and probably (not tested) have a perf boost. N.B. createObjectURL expects Blob object which itself expect data string w/o data:image prefix, so use imageDataOnly in the Plotly.toImage call
... to workaround Chrome URL length limit (#3771) and probably (not tested) have a perf boost. N.B. createObjectURL expects Blob object which itself expect data string w/o data:image prefix, so use imageDataOnly in the Plotly.toImage call
https://codepen.io/etpinard/pen/zVdjQg which uses https://42931-45646037-gh.circle-artifacts.com/0/dist/plotly.min.js appears to work correctly on Chrome 70 and FF67 on my laptop. Before making a PR, we still need to test the legacy fallbacks on IE10, IE11 and Safari. |
I manually tested saving mock
|
Cool. Thanks! Have you tried downloading |
Taking a snapshot of |
In IE10 I can't load the dashboard and render anything. |
... to workaround Chrome URL length limit (#3771) and probably (not tested) have a perf boost. N.B. createObjectURL expects Blob object which itself expect data string w/o data:image prefix, so use imageDataOnly in the Plotly.toImage call
Things seems to now work ok in Safari off ecf3ac7 on browserstack. Still, before I make a PR, I would appreciate if someone with access to a Mac could test out https://codepen.io/etpinard/pen/QXraeW in Safari. Thanks! |
I haven't yet found the actual limiting condition, but after some threshold of plot width/height/number of data points, I am unable to download a png of a Plotly plot. See following codepen:
https://codepen.io/anon/pen/WWZBOB
With

n = 20000
, I can't download the png, Chrome just shows the following message:With
n = 10000
, it works. It also works with a 2000x2000 figure layout and 20000 points.The text was updated successfully, but these errors were encountered: