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

Unable to run witnessme screenshot command. #39

Open
ghost opened this issue Feb 22, 2022 · 1 comment
Open

Unable to run witnessme screenshot command. #39

ghost opened this issue Feb 22, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 22, 2022

Hi, when i want to run any command like witnessme screenshot http://192.168.1.1:80, i get error:
google chrome and other dependencies was installed, but maybe i lose something!

─# witnessme screenshot http://192.168.1.1:80
[witnessme.screenshot] INFO - Starting scan 62441da4-2381-4480-a817-64ba2901780a
[witnessme.headlessbrowser] INFO - Starting headless browser
[witnessme.headlessbrowser] WARNING - Running under root privileges, browser will start with --no-sandbox
Traceback (most recent call last):
  File "/usr/bin/witnessme", line 33, in <module>
    sys.exit(load_entry_point('witnessme==1.5.0', 'console_scripts', 'witnessme')())
  File "/usr/lib/python3/dist-packages/witnessme/console/witnessme.py", line 113, in run
    args.func(args)
  File "/usr/lib/python3/dist-packages/witnessme/utils.py", line 41, in wrapper
    return asyncio.run(f(*args, **kwargs))
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/lib/python3/dist-packages/witnessme/console/witnessme.py", line 19, in screenshot
    await cmd.start()
  File "/usr/lib/python3/dist-packages/witnessme/commands/screenshot.py", line 128, in start
    await self._scan_task
  File "/usr/lib/python3/dist-packages/witnessme/commands/screenshot.py", line 122, in setup_and_run
    await self._browser.run(self.target, self.ports)
  File "/usr/lib/python3/dist-packages/witnessme/headlessbrowser.py", line 163, in run
    await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
  File "/usr/lib/python3/dist-packages/witnessme/headlessbrowser.py", line 114, in start_browser
    browser = await pyppeteer.launch(
  File "/usr/lib/python3/dist-packages/pyppeteer/launcher.py", line 306, in launch
    return await Launcher(options, **kwargs).launch()
  File "/usr/lib/python3/dist-packages/pyppeteer/launcher.py", line 169, in launch
    self.connection = Connection(self.browserWSEndpoint, self._loop, connectionDelay, )
  File "/usr/lib/python3/dist-packages/pyppeteer/connection.py", line 43, in __init__
    self._ws = websockets.client.connect(
  File "/usr/lib/python3/dist-packages/websockets/imports.py", line 96, in __getattr__
    raise AttributeError(f"module {package!r} has no attribute {name!r}")
AttributeError: module 'websockets' has no attribute 'client'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyppeteer/launcher.py", line 152, in _close_process
    self._loop.run_until_complete(self.killChrome())
  File "/usr/lib/python3.9/asyncio/base_events.py", line 617, in run_until_complete
    self._check_closed()
  File "/usr/lib/python3.9/asyncio/base_events.py", line 510, 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

Also, it's possible to wmdb request aiosqlite version like 17, not 13-14 version. Thanks, best regards.
pkg_resources.DistributionNotFound: The 'aiosqlite<0.14.0,>=0.13.0' distribution was not found and is required by witnessme

@rickoooooo
Copy link

I just ran into this problem myself and solved it by installing a different version of pyppeteer:

pip3 install -U git+https://github.com/pyppeteer/pyppeteer@dev

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

1 participant