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

CSP issues with Plotly using R kernel #841

Closed
bcdunbar opened this issue Jun 1, 2017 · 5 comments
Closed

CSP issues with Plotly using R kernel #841

bcdunbar opened this issue Jun 1, 2017 · 5 comments

Comments

@bcdunbar
Copy link

bcdunbar commented Jun 1, 2017

Description:

Content Security Policy errors when plotting with Plotly R package. The code below works in nteract notebook.

Steps to Reproduce:

library(plotly)

p <- plot_ly(x=1,y=1)
embed_notebook(p) 

# p (similar errors if you run without embed_notebook)

Versions:

Atom : 1.17.2
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0

Hydrogen : 1.15.0

Logs:

2017-05-31 3

@lgeiger
Copy link
Member

lgeiger commented Jun 1, 2017

Unfortunately for us, the CSP policy in Atom doesn't allow the injection of scripts because of security reasons. Until we completely sandbox our display area we can't support embedded javascript in outputs.

Can you try to restart your kernel via the command pallet and try again without embed_notebook(p)?

@lgeiger
Copy link
Member

lgeiger commented Jun 1, 2017

Could you also try this solution: plotly/plotly.R#768 (comment)

@bcdunbar
Copy link
Author

bcdunbar commented Jun 1, 2017

Ah, okay.

Restarted and ran:

p <- plot_ly(x = 1, y = 1)
p

2017-06-01 2

@bcdunbar
Copy link
Author

bcdunbar commented Jun 1, 2017

Yup, the above solution (plotly/plotly.R#768 (comment)) works in Atom.

@lgeiger
Copy link
Member

lgeiger commented Jun 1, 2017

Yup, the above solution works in Atom.

Excellent! Would you be interested in adding it to our examples collection?

lgeiger added a commit to lgeiger/hydrogen that referenced this issue Jun 4, 2017
rgbkrk pushed a commit that referenced this issue Jun 4, 2017
pfackeldey pushed a commit to pfackeldey/hydrogen that referenced this issue Sep 17, 2017
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

2 participants