byt3bl33d3r / WitnessMe

Web Inventory tool, takes screenshots of webpages using Pyppeteer (headless Chrome/Chromium) and provides some extra bells & whistles to make life easier.
GNU General Public License v3.0
734 stars 109 forks source link

pyppeteer.errors.BrowserError: Browser closed unexpectedly: #2

Closed korang closed 5 years ago

korang commented 5 years ago

pyppeteer.errors.BrowserError: Browser closed unexpectedly:Running as root without --no-sandbox is not supported.

korang commented 5 years ago

Running on Kali Linux 2019.3. Which uses root as primary account.

byt3bl33d3r commented 5 years ago

Yeah I'm gonna need a lot more info. Can you post the full traceback? are you running it from a virtualenv?

mdisec commented 5 years ago

Lemme give your more info.

root@kali:~/WitnessMe# python3 witnessme.py IP/24 IP/24
2019-11-07 09:32:58,182 [DEBUG] - parsers.py: __enter__ - Detected IP Range or CIDR as a target
2019-11-07 09:32:58,186 [DEBUG] - parsers.py: __enter__ - Detected IP Range or CIDR as a target
Traceback (most recent call last):
  File "witnessme.py", line 168, in <module>
    asyncio.run(start_scan())
  File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
  File "witnessme.py", line 139, in start_scan
    browser = await pyppeteer.launch(headless=True, ignoreHTTPSErrors=True)
  File "/usr/local/lib/python3.7/dist-packages/pyppeteer/launcher.py", line 311, in launch
    return await Launcher(options, **kwargs).launch()
  File "/usr/local/lib/python3.7/dist-packages/pyppeteer/launcher.py", line 189, in launch
    self.browserWSEndpoint = self._get_ws_endpoint()
  File "/usr/local/lib/python3.7/dist-packages/pyppeteer/launcher.py", line 233, in _get_ws_endpoint
    self.proc.stdout.read().decode()
pyppeteer.errors.BrowserError: Browser closed unexpectedly:
[1107/093258.111155:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/pyppeteer/launcher.py", line 174, in _close_process
    self._loop.run_until_complete(self.killChrome())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 555, in run_until_complete
    self._check_closed()
  File "/usr/lib/python3.7/asyncio/base_events.py", line 475, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
sys:1: RuntimeWarning: coroutine 'Launcher.killChrome' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback