dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.42k stars 98 forks source link

Device isn't connecting anymore (JSONDecodeError) #115

Open berrywhite96 opened 9 months ago

berrywhite96 commented 9 months ago

Describe the bug Program does not seem to work, exceptions are thrown and then the program stops.

To Reproduce Can't really provide something here, I didn't changed anything.

Log

--- Logging error ---
Traceback (most recent call last):
  File "/app/iSponsorBlockTV/ytlounge.py", line 180, in connect
    self._process_events(events)
  File "/usr/local/lib/python3.11/site-packages/pyytlounge/wrapper.py", line 325, in _process_events
    self._process_event(event_id, event_type, args)
  File "/app/iSponsorBlockTV/ytlounge.py", line 112, in _process_event
    device_info = json.loads(device.get("deviceInfo", ""))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/logging/__init__.py", line 1110, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/logging/__init__.py", line 953, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/logging/__init__.py", line 687, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/logging/__init__.py", line 377, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
  File "/app/main.py", line 3, in <module>
    helpers.app_start()
  File "/app/iSponsorBlockTV/helpers.py", line 126, in app_start
    main.main(config, args.debug)
  File "/app/iSponsorBlockTV/main.py", line 144, in main
    loop.run_forever()
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
    handle._run()
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/app/iSponsorBlockTV/main.py", line 48, in loop
    await lounge_controller.connect()
  File "/app/iSponsorBlockTV/ytlounge.py", line 184, in connect
    self._logger.exception(ex, resp.status, resp.reason)
Message: JSONDecodeError('Expecting value: line 1 column 1 (char 0)')
Arguments: (200, 'OK')
Connected to device None (Schlafzimmer (Chromecast))

iSponsorBlockTV server (please complete the following information):

Device:

dmunozv04 commented 9 months ago

It looks like you upgraded to version 2.0.3, and that version has a bug when trying to get non existent deviceInfo data (used to detect if YouTube kids is running. Please update to version 2.0.4 and report back

vulcanjedi commented 2 months ago

I had this running and was loving it for about a month. moved Chromecast to alt tv as primary one broke and had to wait to get new one delivered. 1.5 days after migrating back suddenly realized wasn't working and got all these errs?? running v2.1.0 and tried downgrading even though no system changes.

dmunozv04 commented 2 months ago

Please run with debug mode and provide logs so we can diagnose the issue