hydrogen: Failed to activate the Hydrogen package

Description:

I’m not able to run R code with Hydrogen, I did not want to publish this issue cause could have been due outdated dependencies, but I’ve upgraded all pip packages and R and Hydrogen still does not work.

I’ve also reinstalled several times Hydrogen but keeps broken.

Steps to Reproduce:

  1. [First Step] Open a .R file in Atom
  2. [Second Step] shift+enter to run any random line, and right top popup with trace about the issue.

Versions:

Arch Linux x86_64
5.0.7-zen1-1-zen

Atom    : 1.36.0
Electron: 4.1.1
Chrome  : 69.0.3497.128
Node    : 10.11.0

Plugins:

Do you have any Hydrogen plugins installed and active?

  • hydrogen-python
  • Hydrogen Launcher
  • Data Explorer

Logs:

[Enter steps to reproduce:]

Atom: 1.36.0 x64 Electron: 4.1.1 OS: “Arch Linux” Thrown From: Hydrogen package 2.9.0

Stack Trace

Failed to activate the Hydrogen package

At 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'".


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 (<anonymous>)
    at field (/packages/Hydrogen/node_modules/vega-lib/build/vega.js:110:7)
    at /packages/Hydrogen/node_modules/vega-lib/build/vega.js:118:12
    at isArray (/packages/Hydrogen/node_modules/vega-lib/build/vega.js:2:66)
    at /packages/Hydrogen/node_modules/vega-lib/build/vega.js:5:2)
    at /packages/Hydrogen/node_modules/vega-lib/build/vega.js:38114:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at xhtml (/packages/Hydrogen/node_modules/vega-embed/build/vega-embed.js:2:91)
    at /packages/Hydrogen/node_modules/vega-embed/build/vega-embed.js:5:2)
    at /packages/Hydrogen/node_modules/vega-embed/build/vega-embed.js:3473:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at /packages/Hydrogen/node_modules/@nteract/transform-vega/lib/index.js:36:41)
    at /packages/Hydrogen/node_modules/@nteract/transform-vega/lib/index.js:178:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)

Commands

     -0:04.3.0 hydrogen:run-and-move-down (input.hidden-input)

Non-Core Packages

atom-language-r 1.4.8 
atom-python-run 0.9.7 
atom-runner 2.7.1 
autocomplete-font-awesome 1.0.2 
autocomplete-latex 0.9.0 
autocomplete-paths 2.12.2 
autocomplete-python 1.14.0 
autocomplete-R 0.6.0 
browser-plus 0.0.98 
browser-plus-open-new-window 0.0.1 
browser-plus-zoom 0.0.2 
build 0.70.0 
build-rscript 0.6.2 
busy-signal 2.0.1 
cobalt2-syntax 0.5.3 
color-picker 2.3.0 
dark-flat-ui 1.2.4 
file-icons 2.1.31 
git-log 0.4.1 
git-plus 8.6.2 
git-time-machine 2.1.0 
glacier-dark-ui 1.5.0 
hacking-the-kernel 1.7.4 
hacking-the-kernel-ui 1.8.5 
highlight-line 0.12.0 
highlight-selected 0.16.0 
Hydrogen 2.9.0 
ide-python 1.4.1 
ide-r 0.1.8 
intentions 1.1.5 
jumpy 5.0.2 
language-latex 1.2.0 
latex 0.50.2 
latex-autocomplete 1.1.1 
latex-completions 0.3.6 
linter 2.3.0 
linter-latex 1.0.0 
linter-python 3.1.2 
linter-ui-default 1.7.1 
markdown-preview-plus 3.8.1 
markdown-table-editor 1.1.1 
merge-conflicts 1.4.5 
minimap 4.29.9 
minimap-autohider 1.6.0 
minimap-highlight-selected 4.6.1 
minimap-pigments 0.2.2 
minimap-titles 1.15.0 
multi-cursor 2.1.5 
outlander-syntax 2.0.0 
outlander-ui 1.4.0 
pdf-view 0.71.0 
pigments 0.40.2 
platformio-ide-terminal 2.9.1 
python-debugger 0.2.0 
python-indent 1.1.7 
python-tools 0.6.9 
snow-dark-syntax 0.1.1 
split-diff 1.6.0 
Sublime-Style-Column-Selection 1.7.5 
svg-preview 0.14.0 
sync-settings 0.8.6 
toggle-docks 0.1.0 
wakatime 7.0.9 

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

can replicate this issue on latest version of Manjaro

I dont really know what I’m looking at here, but I see something about “use system electron” or “electron 3”, either of which could cause the issue.

Is there no way to install from a deb on arch? We’ve now had 3 reports of the issue, all from arch users, but I dont know anything about that distro to guess what it could be.

Have exactly the same error on fully updated Arch Linux, with same Atom 1.36.0. Only Hydrogen installed.

Reinstalling Hydrogen didn’t help. Removing ~/.atom directory didn’t help.

As a temporary solution, downgrading following packages solved the issue for me:

sudo pacman -U /var/cache/pacman/pkg/atom-1.35.1-1-x86_64.pkg.tar.xz
sudo pacman -U /var/cache/pacman/pkg/apm-2.1.3-2-x86_64.pkg.tar.xz
sudo pacman -U /var/cache/pacman/pkg/electron-3.1.4-1-x86_64.pkg.tar.xz