简体   繁体   中英

Chrome Error when running command yarn start

I am not aware of the technology used in this git repo but just trying to follow steps that are given by creator on https://github.com/paulmaunders/delivery-slot-bot

I have a windows machine and installed VMware player then Kali on it. Downloaded the repo and installed NPM in kali. When i run the command "Yarn Start" it is giving me the below error. I downloaded chrome and installed too but no joy. Any advice how to fix this would be greatly appreciated. I have used Kali a bit so have some knowledge of Linux but cant figure this one out.

Thanks in advance


kali@kali:~/Downloads/delivery-slot-bot-master/delivery-slot-bot$ yarn start
yarn run v1.22.4
$ node ./src/index.js
index.js

Runs one-off

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

Error: Failed to launch chrome!
[0421/142758.038038:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
#0 0x564e68efe879 base::debug::CollectStackTrace()
#1 0x564e68e5bc63 base::debug::StackTrace::StackTrace()
#2 0x564e68e70013 logging::LogMessage::~LogMessage()
#3 0x564e6a60a95e service_manager::ZygoteHostImpl::Init()
#4 0x564e68a9fadc content::ContentMainRunnerImpl::Initialize()
#5 0x564e68aeb72c service_manager::Main()
#6 0x564e68a9e0b1 content::ContentMain()
#7 0x564e68aea99d headless::(anonymous namespace)::RunContentMain()
#8 0x564e68aea70b headless::HeadlessShellMain()
#9 0x564e6687b1b8 ChromeMain
#10 0x7f92b55efbbb __libc_start_main
#11 0x564e6687b02a _start

Received signal 6
#0 0x564e68efe879 base::debug::CollectStackTrace()
#1 0x564e68e5bc63 base::debug::StackTrace::StackTrace()
#2 0x564e68efe401 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f92b7a76520 <unknown>
#4 0x7f92b5603081 gsignal
#5 0x7f92b55ee535 abort
#6 0x564e68efd265 base::debug::BreakDebugger()
#7 0x564e68e70461 logging::LogMessage::~LogMessage()
#8 0x564e6a60a95e service_manager::ZygoteHostImpl::Init()
#9 0x564e68a9fadc content::ContentMainRunnerImpl::Initialize()
#10 0x564e68aeb72c service_manager::Main()
#11 0x564e68a9e0b1 content::ContentMain()
#12 0x564e68aea99d headless::(anonymous namespace)::RunContentMain()
#13 0x564e68aea70b headless::HeadlessShellMain()
#14 0x564e6687b1b8 ChromeMain
#15 0x7f92b55efbbb __libc_start_main
#16 0x564e6687b02a _start
  r8: 0000000000000000  r9: 00007ffde55c0d60 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffde55c2028 r13: 00007ffde55c1008 r14: 00007ffde55c1008 r15: 00007ffde55c1020
  di: 0000000000000002  si: 00007ffde55c0d60  bp: 00007ffde55c0fb0  bx: 00007f92b5783840
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007f92b5603081  sp: 00007ffde55c0d60
  ip: 00007f92b5603081 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.


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

    at onClose (/home/kali/Downloads/delivery-slot-bot-master/delivery-slot-bot/node_modules/puppeteer/lib/Launcher.js:348:14)
    at Interface.helper.addEventListener (/home/kali/Downloads/delivery-slot-bot-master/delivery-slot-bot/node_modules/puppeteer/lib/Launcher.js:337:50)
    at Interface.emit (events.js:203:15)
    at Interface.close (readline.js:397:8)
    at Socket.onend (readline.js:173:10)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentat

ion about this command.

The thing with kali is that everytime you're logged in as the root user and everything you execute will run as root as well. But chrome knows that it's not a good idea to run it as root so it says no to you.

As the error message says, you can add the --no-sandbox to the launch option and make it run as root. However, this is not a very good idea. Running non-system applications or processes, including the ones with graphics, is not a good idea in general.

It's better that you switch to a non-root account and do all your web devs there, or just switch to a normal distro like Ubuntu.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM