question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error rendering plot with phantomjs

See original GitHub issue

When I try to render a heatmap with phantomjs I get the following error:

TypeError: undefined is not a constructor (evaluating 'ArrayBuffer.isView(t)')

  https://cdn.plot.ly/plotly-latest.min.js:48 in exports
  https://cdn.plot.ly/plotly-latest.min.js:48 in i
  https://cdn.plot.ly/plotly-latest.min.js:48
  https://cdn.plot.ly/plotly-latest.min.js:48 in coerceFunction
  https://cdn.plot.ly/plotly-latest.min.js:48 in coerce
  https://cdn.plot.ly/plotly-latest.min.js:59 in u
  https://cdn.plot.ly/plotly-latest.min.js:44 in exports
  https://cdn.plot.ly/plotly-latest.min.js:59 in exports
  https://cdn.plot.ly/plotly-latest.min.js:56 in supplyTraceDefaults
  https://cdn.plot.ly/plotly-latest.min.js:56 in supplyDataDefaults
  https://cdn.plot.ly/plotly-latest.min.js:56 in supplyDefaults
  https://cdn.plot.ly/plotly-latest.min.js:50 in plot
  https://cdn.plot.ly/plotly-latest.min.js:50 in newPlot

This behavior seems to have started in 1.17.0. It works fine in 1.16.3. I am using phantomjs 2.1.1. I have attached an example that can be run by the following command:

./phantomjs.exe test.js

The example assumes everything is in the current directory. It is rendering the Annotated Heatmap example from the plotly docs.

phantomjs-test.zip

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JordanBallewcommented, Oct 19, 2016

Yeah, it doesn’t really seem like your problem at this point. We have the work around of using 1.16.3 for working with phantomjs at this point. I’ll look into your suggestions when I get a chance, and I’ll report back if I find a better solution. Thanks for the help.

0reactions
waTeimcommented, Dec 31, 2016

I had the same problem. Strangely ArrayBuffer.isView is not implemented by many polyfills including the one referenced above. However, this polyfill does implement it.

polyfill.js (minified: polyfill.min.js) has everything in web.js plus es5.js and es6.js and es2016.js

Include the minified polyfill before plotly and it works fine. e.g.

<head>
  <script src="/polyfill.min.js"></script>
  <script src="/plotly.min.js"></script>
</head>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error rendering plot with phantomjs - - Bountysource
When I try to render a heatmap with phantomjs I get the following error: TypeError: undefined is not a constructor (evaluating 'ArrayBuffer.
Read more >
phantomjs doesn't render a page - Stack Overflow
It doesn't render a screenshot, because the page has no <body> initially and therefore nothing to render. Everything, including the body, is loaded...
Read more >
Recveived error from phantomjs:ERROR: While rendering...
Hi, I have some error while exporting the chart. I am using the exporting.js from Highcharts Export PNG, JPEG, PDF received the below...
Read more >
Phantom Js with Node and Angular - ng-repeat not rendering ...
In your controller you have to call window.callPhantom();. when the render is completed. Next is you have to call it inside $timeout like...
Read more >
Changing plot settings — splash v3.4.0 documentation
For some data reads (phantom, sphNG, magma) the scalings required to transform the ... Use f in Interactive mode on Rendered plots to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found