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

Chrome 120 JSONDecodeError #64

Open
cyberfuhrer opened this issue Dec 12, 2023 · 3 comments
Open

Chrome 120 JSONDecodeError #64

cyberfuhrer opened this issue Dec 12, 2023 · 3 comments

Comments

@cyberfuhrer
Copy link

After updating Chrome to version 120, an empty JSON is received:

File "/lib/python3.9/site-packages/pychrome/tab.py", line 122, in _recv_loop
message = json.loads(message_json)
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

It appears that the error is triggered when calling tab.stop()

@SeanThomas11
Copy link

SeanThomas11 commented Jan 20, 2024

I have the same error when calling tab.stop() and/or browser.close_tab(tab) running Chromium 120.0.6099.199:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.9/dist-packages/pychrome/tab.py", line 122, in _recv_loop
    message = json.loads(message_json)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@timtheguy
Copy link

timtheguy commented May 16, 2024

I'm having the same issue on Chrome 124.0.6367.93, MacOS.

When calling the following:

browser.close_tab(tab)

I get the same error:

Traceback (most recent call last):
  File "/Users/user/.pyenv/versions/3.8.10/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/Users/user/.pyenv/versions/3.8.10/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/user/.pyenv/versions/3.8.10/lib/python3.8/site-packages/pychrome/tab.py", line 122, in _recv_loop
    message = json.loads(message_json)
  File "/Users/user/.pyenv/versions/3.8.10/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/Users/user/.pyenv/versions/3.8.10/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/user/.pyenv/versions/3.8.10/lib/python3.8/json/decoder.py", line 355, in raw_decode
      raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@ccianflone
Copy link

Same issue here.

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

4 participants