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

Something broken with newest chrome with tabs managment #28

Open
gzivdo opened this issue Jun 2, 2018 · 2 comments
Open

Something broken with newest chrome with tabs managment #28

gzivdo opened this issue Jun 2, 2018 · 2 comments

Comments

@gzivdo
Copy link

gzivdo commented Jun 2, 2018

Running example multi_tabs_navigate.py gives error:


Traceback (most recent call last):
  File "./2.py", line 97, in <module>
    main()
  File "./2.py", line 70, in main
    close_all_tabs(browser)
  File "./2.py", line 64, in close_all_tabs
    assert len(browser.list_tab()) == 0
AssertionError

If i comment assert statement I get antother error:

Traceback (most recent call last):
  File "./2.py", line 97, in <module>
    main()
  File "./2.py", line 74, in main
    tabs.append(browser.new_tab())
  File "/usr/local/lib/python2.7/dist-packages/pychrome/browser.py", line 28, in new_tab
    tab = Tab(**rp.json())
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Last one just after calling new_tab()

@kimsbrian
Copy link

kimsbrian commented Apr 1, 2019

Were you ever able to figure out how to fix this?

@callkalpa
Copy link

I had the same issue when I was trying to use headless chrome in docker (image: https://hub.docker.com/r/chromedp/headless-shell). I was referring to the chrome debug endpoint with hostname (docker service name). When I used the IP address instead of the hostname, the issue was solved.

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

3 participants