【问题标题】:Chrome Error when running command yarn start运行命令 yarn start 时出现 Chrome 错误
【发布时间】:2020-04-21 18:32:02
【问题描述】:

我不知道此 git 存储库中使用的技术,但只是尝试按照创建者在 https://github.com/paulmaunders/delivery-slot-bot 上提供的步骤进行操作

我有一台 Windows 机器并在上面安装了 VMware 播放器和 Kali。下载了 repo 并在 kali 中安装了 NPM。当我运行命令“Yarn Start”时,它给了我以下错误。我下载了 chrome 并安装了,但没有任何乐趣。任何有关如何解决此问题的建议将不胜感激。 我用过一点 Kali,所以对 Linux 有一些了解,但无法弄清楚这一点。

提前致谢


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

关于此命令的信息。

【问题讨论】:

  • 你为什么在kali上做web开发?这不是你知道的最好的发行版:p

标签: node.js npm yarnpkg


【解决方案1】:

kali 的特点是,每次您以 root 用户身份登录时,您执行的所有操作也将以 root 身份运行。但是 chrome 知道以 root 身份运行它不是一个好主意,所以它对你说不。

如错误消息所述,您可以将--no-sandbox 添加到启动选项并使其以root 身份运行。但是,这不是一个好主意。运行非系统应用程序或进程,包括带有图形的应用程序或进程,通常不是一个好主意。

最好切换到非 root 帐户并在那里进行所有网络开发,或者只是切换到像 Ubuntu 这样的普通发行版。

【讨论】:

  • 没有。这不是你的做法。 --no-sandbox 是 chrome 的启动参数。不是纱线。只是好奇,您为什么要使用 kali 进行 Web 开发。这是一个我经常使用的发行版。但我在信息中。秒。
  • 我也在 info sec,所以更喜欢 Kali,但没有太多经验。那么我在哪里添加 --no-sandbox 参数?我找到了一个检查 Tesco 和 ASDA 插槽的脚本,试图让它工作
  • 如果您在 infosec 中,您应该知道最好不要以 root 用户身份运行一些随机代码,该应用甚至不需要 root 权限
猜你喜欢
  • 2021-01-01
  • 2019-09-12
  • 2021-05-06
  • 2019-06-15
  • 1970-01-01
  • 2022-06-11
  • 1970-01-01
  • 1970-01-01
  • 2021-01-08
相关资源
最近更新 更多