ha-nest-protect icon indicating copy to clipboard operation
ha-nest-protect copied to clipboard

Attempt to decode JSON with unexpected mimetype: text/plain

Open IMakeTP opened this issue 10 months ago • 7 comments

The problem

Unknown pynest exception.

What version of this integration (ha-nest-protect) has the issue?

0.4.0b4

What version of Home Assistant Core has the issue?

2024.4.3

Device / Model

Nest Protect Battery

Diagnostics information

No response

Home Assistant log

Logs

This error originated from a custom integration.

Logger: custom_components.nest_protect Source: custom_components/nest_protect/init.py:168 integration: Nest Protect (documentation, issues) First occurred: 6:51:07 PM (4 occurrences) Last logged: 9:54:12 PM

Unknown pynest exception. Please create an issue on GitHub with your logfile. Updates paused for 1 minute. Traceback (most recent call last): File "/config/custom_components/nest_protect/pynest/client.py", line 298, in subscribe_for_data result = await response.json() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 73, in json return await super().json(*args, loads=loads, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1176, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('https://czfe73-front01-iad01.transport.home.nest.com/v6/subscribe')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/nest_protect/init.py", line 168, in _async_subscribe_for_data result = await entry_data.client.subscribe_for_data( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nest_protect/pynest/client.py", line 302, in subscribe_for_data raise PynestException( custom_components.nest_protect.pynest.exceptions.PynestException: 200 error while subscribing -

Additional information

No response

IMakeTP avatar Apr 19 '24 02:04 IMakeTP

Having the same issue and device/versions as @IMakeTP

martymart8864 avatar Apr 22 '24 15:04 martymart8864

I have this issue also

Logs

Logger: custom_components.nest_protect Source: custom_components/nest_protect/init.py:168 integration: Nest Protect (documentation, issues) First occurred: 1:00:23 PM (1 occurrences) Last logged: 1:00:23 PM

Unknown pynest exception. Please create an issue on GitHub with your logfile. Updates paused for 1 minute. Traceback (most recent call last): File "/config/custom_components/nest_protect/pynest/client.py", line 298, in subscribe_for_data result = await response.json() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 73, in json return await super().json(*args, loads=loads, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1176, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('https://czfe74-front01-iad01.transport.home.nest.com/v6/subscribe')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/nest_protect/init.py", line 168, in _async_subscribe_for_data result = await entry_data.client.subscribe_for_data( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nest_protect/pynest/client.py", line 302, in subscribe_for_data raise PynestException( custom_components.nest_protect.pynest.exceptions.PynestException: 500 error while subscribing -

bmos avatar Apr 30 '24 18:04 bmos

Please update to v0.4.0b5 and let me know if this issue is still present.

iMicknl avatar Jun 15 '24 22:06 iMicknl

Hi @iMicknl, thanks for the update but stupid question. How do I upgrade? I uninstalled the v0.4.0b4 package from HA, went to the integration again but it reinstalled v0.4.0b4 and not v0.4.0b5. I'm obviously doing something wrong here.. thanks!

martymart8864 avatar Jun 16 '24 19:06 martymart8864

@martymart8864 have you pressed "Update information"? Selecting "Redownload" should show the latest version.

image

iMicknl avatar Jun 16 '24 19:06 iMicknl

Thanks again @iMicknl, got it now. I'll let it run for a a few days and check if I still get the error!

martymart8864 avatar Jun 16 '24 20:06 martymart8864

Hi @iMicknl

Still given me an error message running version 0.4.0b5


Logger: custom_components.nest_protect Source: custom_components/nest_protect/init.py:169 integration: Nest Protect (documentation, issues) First occurred: 1:36:35 PM (1 occurrences) Last logged: 1:36:35 PM

Unknown pynest exception. Please create an issue on GitHub with your logfile. Updates paused for 1 minute. Traceback (most recent call last): File "/config/custom_components/nest_protect/pynest/client.py", line 309, in subscribe_for_data result = await response.json() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 79, in json return await super().json(*args, loads=loads, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1176, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('https://czfe09-front01-iad01.transport.home.nest.com/v6/subscribe')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/nest_protect/init.py", line 169, in _async_subscribe_for_data result = await entry_data.client.subscribe_for_data( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nest_protect/pynest/client.py", line 313, in subscribe_for_data raise PynestException( custom_components.nest_protect.pynest.exceptions.PynestException: 200 error while subscribing -

martymart8864 avatar Jun 19 '24 17:06 martymart8864