webrecorder / browsertrix-old

Browsertrix: Containerized High-Fidelity Browser-Based Automated Crawling + Behavior System
Apache License 2.0
88 stars 7 forks source link

creating profiles fails #50

Closed nvanderperren closed 3 years ago

nvanderperren commented 4 years ago

Hi, I'm trying to create a profile as is explained in the documentation. I do browsertrix profile create and a chrome browsers opens.

I then encounter some issues:

  1. when logging into facebook, I get the messages that cookies should be enabled. --> I go to settings and enable storing local cookies
  2. when saving my profile by giving it a name, I get following error:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/docker-4.3.1-py3.8.egg/docker/api/client.py", line 259, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.40/containers/browser-7UCQ6NSPQN7R3YBIPH5YLVUJ/json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/browsertrix", line 33, in <module>
    sys.exit(load_entry_point('browsertrix-cli==0.1.0.dev0', 'console_scripts', 'browsertrix')())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/browsertrix_cli-0.1.0.dev0-py3.8.egg/browsertrix_cli/profile.py", line 118, in create_profile
    curr_browser = docker_api.containers.get('browser-' + reqid)
  File "/usr/local/lib/python3.8/site-packages/docker-4.3.1-py3.8.egg/docker/models/containers.py", line 887, in get
    resp = self.client.api.inspect_container(container_id)
  File "/usr/local/lib/python3.8/site-packages/docker-4.3.1-py3.8.egg/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/docker-4.3.1-py3.8.egg/docker/api/container.py", line 770, in inspect_container
    return self._result(
  File "/usr/local/lib/python3.8/site-packages/docker-4.3.1-py3.8.egg/docker/api/client.py", line 265, in _result
    self._raise_for_status(response)
  File "/usr/local/lib/python3.8/site-packages/docker-4.3.1-py3.8.egg/docker/api/client.py", line 261, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.8/site-packages/docker-4.3.1-py3.8.egg/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.NotFound: 404 Client Error: Not Found ("No such container: browser-7UCQ6NSPQN7R3YBIPH5YLVUJ")

I use docker desktop community for mac.

nvanderperren commented 4 years ago

okay, the problem is solved when you first close the chrome browser and then save the profile.