danielgtaylor / atom-api-blueprint-preview

Live preview API Blueprint in Atom
MIT License
43 stars 19 forks source link

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an al... #41

Open thitu opened 9 years ago

thitu commented 9 years ago

Steps

Previewed a valid *.apib file.

Atom Version: 1.0.3 System: Mac OS X 10.10.4 Thrown From: api-blueprint-preview package, v0.5.1

Stack Trace

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

At /opt/homebrew-cask/Caskroom/atom/1.0.3/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:328

EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

    at eval (native)
    at Function.jQuery.extend.globalEval (/opt/homebrew-cask/Caskroom/atom/1.0.3/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:328:5)
    at ApiBlueprintPreviewView.jQuery.fn.extend.domManip (/opt/homebrew-cask/Caskroom/atom/1.0.3/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:5435:16)
    at ApiBlueprintPreviewView.jQuery.fn.extend.append (/opt/homebrew-cask/Caskroom/atom/1.0.3/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:5218:15)
    at ApiBlueprintPreviewView.<anonymous> (/opt/homebrew-cask/Caskroom/atom/1.0.3/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:5333:18)
    at jQuery.access (/opt/homebrew-cask/Caskroom/atom/1.0.3/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:3491:8)
    at ApiBlueprintPreviewView.jQuery.fn.extend.html (/opt/homebrew-cask/Caskroom/atom/1.0.3/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:5300:10)
    at /Users/username/.atom/packages/api-blueprint-preview/lib/api-blueprint-preview-view.coffee:279:19
    at /Users/username/.atom/packages/api-blueprint-preview/lib/renderer.coffee:32:14
    at /Users/username/.atom/packages/api-blueprint-preview/lib/renderer.coffee:64:16

Commands

n/a

Config

{
  "core": {},
  "api-blueprint-preview": {}
}

Installed Packages

# User
api-blueprint-preview, v0.5.1
language-api-blueprint, v1.0.2
linter, v1.3.0
linter-eslint, v3.0.2
pigments, v0.9.3

# Dev
No dev packages
danielgtaylor commented 9 years ago

@thitu which version of Aglio do you have installed, and are you trying to use a custom theme?

thitu commented 9 years ago

@danielgtaylor: aglio version 2.0.1; and no, not using a custom theme.

host:~ username$ aglio -v
aglio 2.0.1
olio 1.0.3
host:~ username$
danielgtaylor commented 9 years ago

@thitu please try the latest release, aglio 2.0.2. It includes some important fixes for the blueprint preview plugin!

nheinbaugh commented 9 years ago

Just as a heads up this error can also occur when you try to edit the generated docs while having the atom api preview window open.