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

Installation instructions in Ubuntu 18.04 does not work. #12

Closed
gurumark opened this issue Jun 6, 2018 · 5 comments
Closed

Installation instructions in Ubuntu 18.04 does not work. #12

gurumark opened this issue Jun 6, 2018 · 5 comments

Comments

@gurumark
Copy link

gurumark commented Jun 6, 2018

Hi,

Installed yarn and hiper:
yarn global add hiper
yarn global v1.7.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "hiper@0.0.14" with binaries:
- hiper
Done in 0.38s.


Issue the following:
hiper badu.com
/usr/bin/env: ‘node --no-warnings’: No such file or directory

thanks for help in advance.

@pod4g
Copy link
Owner

pod4g commented Jun 6, 2018

Hi. see #5

@gurumark
Copy link
Author

gurumark commented Jun 6, 2018

Changed the file as instructed:
/usr/local/share/.config/yarn/global/node_modules/hiper/src$ cat index.js
#! /usr/bin/env node
// 接受cli参数
// 装配opts
// 调用broswer拿到数据
// 调用分析模块
// 调用output
/**


Now I get the following:

hiper badu.com
(node:7179) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
[0606/133445.602062:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.
[0606/133445.602118:FATAL:content_main_delegate.cc(57)] Check failed: false.
#0 0x5616ba50182c base::debug::StackTrace::StackTrace()
#1 0x5616ba488290 logging::LogMessage::~LogMessage()
#2 0x5616b8738de3 content::ContentMainDelegate::TerminateForFatalInitializationError()
#3 0x5616ba1b7941 content::ContentMainRunnerImpl::Initialize()
#4 0x5616ba1c1c12 service_manager::Main()
#5 0x5616ba1b6184 content::ContentMain()
#6 0x5616be38ea39 headless::(anonymous namespace)::RunContentMain()
#7 0x5616be38eac2 headless::HeadlessBrowserMain()
#8 0x5616ba1bef8f headless::HeadlessShellMain()
#9 0x5616b87371ac ChromeMain
#10 0x7f6dc160ab97 __libc_start_main
#11 0x5616b873702a _start

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

at onClose (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:255:14)
at Interface.helper.addEventListener (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:244:50)
at Interface.emit (events.js:185:15)
at Interface.close (readline.js:379:8)
at Socket.onend (readline.js:152:10)
at Socket.emit (events.js:185:15)
at endReadableNT (_stream_readable.js:1106:12)
at process._tickCallback (internal/process/next_tick.js:178:19)

(node:7179) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7179) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@pseudolog
Copy link

I didn't hit that one with 18.04 and yarn. This issue suggest permission problems with pupeteer's bundled chromium.

If you have chrome installed you could try launching hiper with the -e, --executablePath <path> argument pointing to your local chrome.

@pod4g
Copy link
Owner

pod4g commented Jun 8, 2018

The problem has been solved, please upgrade hiper to 0.0.15

run below to upgrade:

npm i hiper -g

thr pr: #21

@pod4g pod4g closed this as completed Jun 8, 2018
@gurumark
Copy link
Author

gurumark commented Jun 8, 2018

@pod4g I get the following when I run your command:

sudo npm i hiper -g
[sudo] password for gdssd:
/usr/bin/hiper -> /usr/lib/node_modules/hiper/bin/index.js

puppeteer@1.5.0 install /usr/lib/node_modules/hiper/node_modules/puppeteer
node install.js

ERROR: Failed to download Chromium r564778! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/hiper/node_modules/puppeteer/.local-chromium'
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/lib/node_modules/hiper/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.5.0 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@1.5.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gdssd/.npm/_logs/2018-06-08T14_38_46_407Z-debug.log

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

3 participants