plotly / orca

Command line application for generating static images of interactive plotly charts
MIT License
294 stars 40 forks source link

renderer error - Uncaught ReferenceError: Plotly is not defined #232

Closed ravi-aggarwal closed 5 years ago

ravi-aggarwal commented 5 years ago

I am running orca with headless server xvfb on centos and when I execute: orca graph '{ "data": [{"y": [1,2,1]}] }' -o fig.png --verbose

Get the following error, any ideas on how to fix this? (orca version is 1.2.1)

gpu process crashed - false Chrome version 59.0.3071.115 Electron version 1.8.4 gpu process crashed - false Chrome version 59.0.3071.115 Electron version 1.8.4 gpu process crashed - false Chrome version 59.0.3071.115 Electron version 1.8.4 gpu process crashed - false Chrome version 59.0.3071.115 Electron version 1.8.4 gpu process crashed - false Chrome version 59.0.3071.115 Electron version 1.8.4 renderer error - Uncaught ReferenceError: Plotly is not defined Chrome version 59.0.3071.115 Electron version 1.8.4

ravi-aggarwal commented 5 years ago

So, upon further investigation, error is coming from src/component/plotly-graph/render.js where it cannot find Plotly.

I am not too familiar with javascript but can someone shed more light on how render.js is importing Plotly?

ravi-aggarwal commented 5 years ago

I solved the issue by using a local copy of plotly.min.js instead of default - https://cdn.plot.ly/plotly-latest.min.js

I think it's probably due to firewall restrictions on my work server, not sure if there is a way to make the error more explicit

antoinerg commented 5 years ago

Thank you @ravi-aggarwal for letting us know. I agree that the error message renderer error - Uncaught ReferenceError: Plotly is not defined is not so clear.