pod4g / hiper

🚀 A statistical analysis tool for performance testing
MIT License
2.7k stars 168 forks source link

Installation instructions in Ubuntu 18.04 does not work. #12

Closed gurumark closed 6 years ago

gurumark commented 6 years ago

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:

thanks for help in advance.

pod4g commented 6 years ago

Hi. see #5

gurumark commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

The problem has been solved, please upgrade hiper to 0.0.15

run below to upgrade:

npm i hiper -g

thr pr: https://github.com/pod4g/hiper/pull/21

gurumark commented 6 years ago

@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