Skip to content
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

Plotly fails to initialize upon app start #116

Open
valentin-kamm opened this issue Mar 10, 2024 · 0 comments
Open

Plotly fails to initialize upon app start #116

valentin-kamm opened this issue Mar 10, 2024 · 0 comments

Comments

@valentin-kamm
Copy link

valentin-kamm commented Mar 10, 2024

I have written a Shiny App that will render two plotlyOutputs when it is started. I'm hosting this app as a shinylive app on a Microsoft Internet Information Services webserver. When visiting the website, only the second plot is actually rendered correctly, the first plot fails with the following error message in the browser console:

Uncaught (in promise) ReferenceError: Plotly is not defined
at Object.renderValue (plotly.js:162:18)
at htmlwidgets.js:539:22

As soon as I modify the first plot, i.e. using some control widgets to filter the underlying data causing the plot to re-render, everything works fine.

Furthermore, everything works fine when I run the shiny app locally using RStudio, which leads me to believe that the issue might be caused by shinylive.

Edit: Here is a simple demo app showing the problem: https://valentin-kamm.github.io/shinylivePlotlyIssueDemo/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant