Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script #322

Open lowerends opened 7 years ago

lowerends commented 7 years ago

[Enter steps to reproduce:]

  1. Open a php file.
  2. Click and hold the mouse to make a selection.

Atom: 1.14.4 x64 Electron: 1.3.13 OS: Mac OS X 10.11.6 Thrown From: atom-autocomplete-php package 0.22.0

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 .../.atom/packages/atom-autocomplete-php/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 Function.globalEval (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:328:5)
    at jQuery.domManip (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:5435:16)
    at jQuery.append (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:5218:15)
    at /packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:5333:18)
    at jQuery.access (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:3491:8)
    at jQuery.html (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:5300:10)
    at AttachedPopover.module.exports.Popover.setText (/packages/atom-autocomplete-php/lib/services/popover.coffee:43:40)
    at FunctionProvider.module.exports.AbstractProvider.showPopoverFor (/packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:115:30)
    at /packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:78:22)
    at HTMLDivElement.dispatch (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -0:46.2.0 core:paste (input.hidden-input)
     -0:45.9.0 core:move-down (input.hidden-input)
     -0:45.3.0 core:paste (input.hidden-input)
  4x -0:39.9.0 core:backspace (input.hidden-input)
     -0:35 core:move-left (input.hidden-input)
  2x -0:34.6.0 core:backspace (input.hidden-input)
     -0:29.2.0 core:copy (input.hidden-input)
     -0:28.4.0 core:paste (input.hidden-input)
     -0:26.8.0 core:backspace (input.hidden-input)
     -0:24.1.0 core:copy (input.hidden-input)
     -0:23.2.0 core:paste (input.hidden-input)
     -0:21.3.0 core:copy (input.hidden-input)
     -0:20.3.0 core:paste (input.hidden-input)
     -0:18.5.0 core:backspace (input.hidden-input)
     -0:12.2.0 core:copy (input.hidden-input)
     -0:07.7.0 core:paste (input.hidden-input)

Non-Core Packages

atom-autocomplete-php 0.22.0 
atom-beautify 0.29.17 
atom-shortcuts 0.0.2 
compare-files 0.8.0 
docblockr 0.9.1 
language-babel 2.55.6 
linter 1.11.23 
linter-jshint 3.0.2 
merge-conflicts 1.4.4 
lowerends commented 7 years ago

Actually, this error is triggered in multiple ways. After a while, even hovering over a PHP function is enough to trigger this error.

The thing is that this errors pops up again and again, so the screen gets filled with these error messages.

When these errors occur, the popup with docblocks don't show up anymore. Autocompletion itself keeps working however.