You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have RMarkdown document with several Plotly 3D charts. I convert it to HTML using RStudio's knitr and get HTML. This HTML file cannot be opened with Firefox: the browser starts complaining about unresponsive script, eats a lot of memory and finally hangs. The same charts created by Jupyter / IPython Notebook and converted to HTML can be opened with Firefox.
Opening this in Firefox 46.0.1 on Windows 10 I receive the warning message:
"mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create"
followed by an out of memory exception after allocation of more than 1GB.
The same issue happens for me when opening any HTML-Widgets based plotly charts saved to .html file from RStudio. It appears that with a clean restart of Firefox I can often get one plot to load properly, although it is still very slow and consumes more than 1GB of RAM whereas opening the same .html in Chrome or Edge is fast and uses less than 100MB.
The crash/exception issue with Firefox does not appear to happen when I manually replace the reference to plotly.js version 1.10.1 used by RStudio with plotly.js version 1.12. I do still receive the warning message regarding line 3419 in plotly.js but it is no longer unstable in Firefox for me.
3418 if (Buffer.TYPED_ARRAY_SUPPORT) {
3419 Buffer.prototype.proto = Uint8Array.prototype
If it's the same source, the "mutating the [[Prototype]]…" warningcomes from d3 and won't be fixed. My best understanding is that it's a warning about best practices, but not one that has a measurable effect relative to a library like plotly.js. (in particular because gl3d plots are hardly (if at all?) using d3)
I can definitely confirm that the page is perfectly snappy in chrome and very problematic in firefox.
Ok, this definitely has something to do with self_contained: true on Firefox as mentioned in #721. Here is a more minimal example that at least seems to render in Firefox, though it hogs up to 5GB of RAM on my system!
---
title: "Open me in Firefox if you dare"
output:
# set `self_contained: false` and the problem goes away
html_document:
self_contained: true
---
```{r, message = FALSE}
library(plotly)
plot_ly()
```
I can confirm it works with self_contained: false, but would prefer it to work with true as well. Most of all, there should be a big warning about Firefox incompatibility (especially as self_contained: true is the default), since it's a major browser. I don't use it myself, and only realized there was an issue with my report when someone asked me "What figures?" when trying to read it.
Activity
equastatjamesw commentedon May 26, 2016
Opening this in Firefox 46.0.1 on Windows 10 I receive the warning message:
"mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create"
followed by an out of memory exception after allocation of more than 1GB.
The same issue happens for me when opening any HTML-Widgets based plotly charts saved to .html file from RStudio. It appears that with a clean restart of Firefox I can often get one plot to load properly, although it is still very slow and consumes more than 1GB of RAM whereas opening the same .html in Chrome or Edge is fast and uses less than 100MB.
The crash/exception issue with Firefox does not appear to happen when I manually replace the reference to plotly.js version 1.10.1 used by RStudio with plotly.js version 1.12. I do still receive the warning message regarding line 3419 in plotly.js but it is no longer unstable in Firefox for me.
3418 if (Buffer.TYPED_ARRAY_SUPPORT) {
3419 Buffer.prototype.proto = Uint8Array.prototype
ManuelZ commentedon Feb 4, 2017
I'm having the same problem with Firefox 51.0.1 and Plotly 4.5.6 for R.
mbannert commentedon Mar 14, 2017
same here... any news on the issue? Problems seem to persist with FF 52.0 .
cpsievert commentedon Apr 6, 2017
note to self: hoping plotly/plotly.js#1525 fixes this
rreusser commentedon Apr 7, 2017
If it's the same source, the
"mutating the [[Prototype]]…" warningcomes from d3 and won't be fixed. My best understanding is that it's a warning about best practices, but not one that has a measurable effect relative to a library like plotly.js. (in particular because gl3d plots are hardly (if at all?) using d3)I can definitely confirm that the page is perfectly snappy in chrome and very problematic in firefox.
cpsievert commentedon Apr 7, 2017
Ok, this definitely has something to do with
self_contained: trueon Firefox as mentioned in #721. Here is a more minimal example that at least seems to render in Firefox, though it hogs up to 5GB of RAM on my system!DarioS commentedon Jun 7, 2017
Thanks for the implicit tip. It worked for me once I used
self_contained: falsebut I'd prefer if it worked whenself_contained: true.Kabouik commentedon Oct 12, 2017
I can confirm it works with
self_contained: false, but would prefer it to work withtrueas well. Most of all, there should be a big warning about Firefox incompatibility (especially asself_contained: trueis the default), since it's a major browser. I don't use it myself, and only realized there was an issue with my report when someone asked me "What figures?" when trying to read it.cpsievert commentedon Apr 17, 2018
I have a feeling this issue is related to the fact that pandoc <2.0 used data URIs to embed dependencies, but pandoc >2.0 uses cleartext.
Closing since upgrading to pandoc >2.0 seems to fix #483 (comment), but please reopen if you find more (related) problems