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:
.R file in Atomshift+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?
Logs:
[Enter steps to reproduce:]
Atom: 1.36.0 x64
Electron: 4.1.1
OS: "Arch Linux"
Thrown From: Hydrogen package 2.9.0
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)
-0:04.3.0 hydrogen:run-and-move-down (input.hidden-input)
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
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
I think this issue is fixed upstream in this PR on atom. I am not seeing this issue on ubuntu, but my atom version is 1.36.0 and I installed it from the latest atom release. Can you try installing from one of these install files from the latest release page?
I'm not sure why your global electron install above would affect atom, the electron version is a pinned dependency of atom. Here is what I get with atom -v:
Atom : 1.36.0
Electron: 2.0.18
Chrome : 61.0.3163.100
Node : 8.9.3
@BenRussert
I've recompiled the source code using this scirpt (obviously I've used asp to download/clone the package sources), it is also packaging the binaries. You can check the sources at the PKGBUILD, it is exactly the same than you've pasted. I'm still having the same issue.
There are a few patches before compile the sources, maybe some of them is causing this.
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.
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.
https://aur.archlinux.org/packages/atom-editor-bin/
This one alternative package does solve the issue, indeed. It is providing an earlier electron2 version? :thinking:
Another alternative that might work is to modify the PKGBUILD to disable those patches related to electron system usage and rebuild the community package.
@BenRussert
I've been thinking about this ... Clearly this is not a upstream issue but a packaging issue, I feel I must notify this in https://bugs.archlinux.org/
However ... This specific issue is related to electron2 version bundled by atom from upstream. Apparently this is not the newest and I don't know which one, but atom or Hydrogen is not interacting properly with this major version (system-wide installed/distributed from Arch repos)
So ... the point is ... Would be this fixed in a future in atom upstream? Are you planing to use a newest version of electron2 for Hydrogen?
Definitely, Should I keep this issue opened?
PS: The pinned comment in here is talking about this thing.
can replicate this issue on latest version of Manjaro
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
I am eagerly looking for a temporary solution and tried this one on Majaro. Hydrogen installed without an error but is not working. When I try to execute code, nothing happens.
Waiting greedily for this bug to get fixed.
@laserjeyes read the whole issue :wink:
This atom package provides(?)/uses an earlier electron2 version, which fits better than electron4 (Arch Linux/Manjaro system-wide electron version)
The AUR package motivation is explained here:
_The package in the official repos modifies the package a bit, and as such, bug reports usually will not be accepted upstream._
_This package aims to keep things as close to upstream as possible [...]_
To be totally honest, I don't understand the desire to use a version of atom that is built to ignore the versioned dependencies like the electron version. Upstream, Atom bumped electron then reverted the change for reasons that don't have to do with hydrogen.
Happy to learn why people want this, but its hard to understand since the official atom build works fine assuming dependencies are respected.
@BenRussert I do not get your point; what do you mean with _Atom bumped electron then reverted the change ..._?
And what package do you not understand? The AUR package? The official package in the Arch repos?
Of course this has nothing to do with hydrogen, I mean, hydrogen is made for atom. The problem here was the official package in Arch Linux repos is using electron 4 as dependency, and ... I'm not sure, but I would say atom devs are using upstream an earlier version of electron.
What I meant by bumping and reverting is that atom tried upgrading electron and then went pack to pinning electron 2.x due to issues the upgraded electron dep caused.
Hydrogen will support the electron version that atom supports. I don't think there is much else to in a hydrogen specific issue, to me the issue is the package manager that is using electron >2.
Hope that helps! Let me know if I'm missing anything we should be doing here on hydrogen.
What I meant by bumping and reverting is that atom tried upgrading electron and then went pack to pinning electron 2.x due to issues the upgraded electron dep caused.
Hydrogen will support the electron version that atom supports. I don't think there is much else to in a hydrogen specific issue, to me the issue is the package manager that is using electron >2.
Hope that helps! Let me know if I'm missing anything we should be doing here on hydrogen.
Exactly, to precise further, is not a _package manager_ thing, but a repo thing. I mean, in Arch Linux there are two alternatives, community package and Arch Linux User's Repository (AUR) package; both are installed using pacman as _package manager_. The second one keeps closest to upstream, consequently; Hydrogen works better.
I am seeing the same error on Ubuntu:
Atom: 1.26.1 x64
Electron: 1.7.11
OS: Ubuntu 18.04.2
Thrown From: Hydrogen package 2.8.0
Failed to activate the Hydrogen package
At (0 , _util.promisify) is not a function
TypeError: (0 , _util.promisify) is not a function
at /packages/Hydrogen/lib/import-notebook.js:15:19)
at /packages/Hydrogen/lib/import-notebook.js:148:2)
at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36)
at Object.value [as .js] (/opt/atom/resources/app/src/compile-cache.js:240:29)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (/app.asar/static/index.js:47:45)
at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33)
at /packages/Hydrogen/lib/main.js:57:47)
at /packages/Hydrogen/lib/main.js:588:24)
at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36)
at Object.value [as .js] (/opt/atom/resources/app/src/compile-cache.js:240:29)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (/app.asar/static/index.js:47:45)
at require (internal/module.js:20:19)
at customRequire (/opt/atom/resources/app/static/<embedded>:96:26)
at Package.requireMainModule (/opt/atom/resources/app/src/package.js:782:33)
at Package.activateNow (/opt/atom/resources/app/src/package.js:220:40)
at activationCommandSubscriptions.add.commandRegistry.onWillDispatch.event (/opt/atom/resources/app/src/package.js:865:28)
at Function.module.exports.Emitter.simpleDispatch (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at CommandRegistry.handleCommandEvent (/opt/atom/resources/app/src/command-registry.js:360:24)
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
at WindowEventHandler.handleDocumentKeyEvent (/opt/atom/resources/app/src/window-event-handler.js:110:40)
-1:40 core:move-down (input.hidden-input)
-1:39.6.0 intentions:highlight (input.hidden-input)
-1:38.5.0 hydrogen:run (input.hidden-input)
atom-fuzzy-grep 0.17.2
atom-latex 0.8.5
autocomplete-R 0.6.0
busy-signal 1.4.3
git-control 0.9.0
git-plus 8.1.0
git-time-machine 2.1.0
Hydrogen 2.8.0
hydrogen-launcher 1.2.2
intentions 1.1.5
language-latex 1.2.0
language-r 0.4.2
language-stan 1.2.0
latexer 0.3.0
linter 2.2.0
linter-lintr 1.1.4
linter-spell 0.15.0
linter-spell-latex 0.11.0
linter-ui-default 1.7.1
markdown-preview-plus 3.3.4
minimap 4.29.9
pdf-view 0.71.0
platformio-ide-terminal 2.8.4
rbox 0.5.0
tasks 2.10.1
tree-view-git-status 1.5.2
@ffinger
This clarification closes this issue, which was initially related to Arch Linux atom packages.
I don't know how does Ubuntu handle atom package. I think you must open another different issue.
@ffinger from the error message it looks like you might have just upgraded atom and need to recompile hydrogen dependencies (done through the atom gui). See this comment
If that doesn't work please open a new issue, thanks!
Hi, after update my Hydrogen I getting this error, anyone has already got?
Cannot find module '@nteract/presentational-components'
Hide Stack Trace
Error: Cannot find module '@nteract/presentational-components'
at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
at Module._resolveFilename (/usr/share/atom/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/usr/share/atom/resources/app/static/
at Module.require (file:///usr/share/atom/resources/app.asar/static/index.js:61:43)
at require (/usr/share/atom/resources/app/static/
at Object.
at Object.
at Module.get_Module._compile (/usr/share/atom/resources/app/static/
at Object.value [as .js] (/usr/share/atom/resources/app/static/
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at Module.require (file:///usr/share/atom/resources/app.asar/static/index.js:72:46)
at require (/usr/share/atom/resources/app/static/
at Object.
at Object.
at Module.get_Module._compile (/usr/share/atom/resources/app/static/
at Object.value [as .js] (/usr/share/atom/resources/app/static/
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at Module.require (file:///usr/share/atom/resources/app.asar/static/index.js:72:46)
at require (/usr/share/atom/resources/app/static/
at Object.
at Object.
at Module.get_Module._compile (/usr/share/atom/resources/app/static/
at Object.value [as .js] (/usr/share/atom/resources/app/static/
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
@kozakjefferson look at the pinned issue