kirei / hass-chargeamps

Home Assistant Component for Chargeamps
Other
26 stars 8 forks source link

Issues with hass 2021.10 #23

Closed fredrike closed 3 years ago

fredrike commented 3 years ago

This error originated from a custom integration.

Logger: homeassistant.setup Source: custom_components/chargeamps/init.py:111 Integration: chargeamps (documentation, issues) First occurred: 18:42:46 (1 occurrences) Last logged: 18:42:46

Error during setup of component chargeamps Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component result = await task File "/config/custom_components/chargeamps/init.py", line 111, in async_setup for cp in await client.get_chargepoints(): File "/usr/local/lib/python3.9/site-packages/chargeamps/external.py", line 82, in get_chargepoints response = await self._get(request_uri) File "/usr/local/lib/python3.9/site-packages/chargeamps/external.py", line 66, in _get await self._ensure_token() File "/usr/local/lib/python3.9/site-packages/chargeamps/external.py", line 54, in _ensure_token token_payload = jwt.decode(self._token, verify=False) File "/usr/local/lib/python3.9/site-packages/jwt/api_jwt.py", line 119, in decode decoded = self.decode_complete(jwt, key, algorithms, options, **kwargs) File "/usr/local/lib/python3.9/site-packages/jwt/api_jwt.py", line 86, in decode_complete raise DecodeError( jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode().

DanielOrneling commented 3 years ago

I got some issues when I ran the Check Configuration addon if this helps.

From the log: [20:16:01] ERROR: The configuration check did not pass! [20:16:01] ERROR: See the output below for more details. Testing configuration at /tmp/config Fatal error while loading config: (PyJWT 2.1.0 (/usr/local/lib/python3.9/site-packages), Requirement.parse('PyJWT<2.0.0,>=1.7.1'), {'chargeamps'}) Failed config General Errors:

Will try to find more information tomorrow once I'm by a computer again.

jschlyter commented 3 years ago

Thanks for the report, fixed release published.

DanielOrneling commented 3 years ago

I just updated to the latest version and got this error now:

Logger: homeassistant.setup Source: custom_components/chargeamps/init.py:111 Integration: Chargeamps (documentation, issues) First occurred: 11:16:58 (1 occurrences) Last logged: 11:16:58

Error during setup of component chargeamps Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/jwt/api_jwt.py", line 154, in _validate_iat int(payload['iat']) ValueError: invalid literal for int() with base 10: '10/07/2021 09:16:57'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 255, in _async_setup_component result = await task File "/config/custom_components/chargeamps/init.py", line 111, in async_setup for cp in await client.get_chargepoints(): File "/usr/local/lib/python3.9/site-packages/chargeamps/external.py", line 82, in get_chargepoints response = await self._get(request_uri) File "/usr/local/lib/python3.9/site-packages/chargeamps/external.py", line 66, in _get await self._ensure_token() File "/usr/local/lib/python3.9/site-packages/chargeamps/external.py", line 54, in _ensure_token token_payload = jwt.decode(self._token, options={"verify_signature": False}) File "/usr/local/lib/python3.9/site-packages/jwt/api_jwt.py", line 104, in decode self._validate_claims(payload, merged_options, **kwargs) File "/usr/local/lib/python3.9/site-packages/jwt/api_jwt.py", line 128, in _validate_claims self._validate_iat(payload, now, leeway) File "/usr/local/lib/python3.9/site-packages/jwt/api_jwt.py", line 156, in _validate_iat raise InvalidIssuedAtError('Issued At claim (iat) must be an integer.') jwt.exceptions.InvalidIssuedAtError: Issued At claim (iat) must be an integer.

jschlyter commented 3 years ago

Oh, that seems to be an error on the ChargeAmps side. I'll report it!

jschlyter commented 3 years ago

FWI, JWT iat issue at ChargeAmps has caseId 23168

DanielOrneling commented 3 years ago

Have you received any news on the case you opened with ChargeAmps?

jschlyter commented 3 years ago

@DanielOrneling They are looking into it. Strange I did not get this error on 2021.10.2 - what version did you try? Could it be fixed in the JWT library used in 2021.10?

DanielOrneling commented 3 years ago

I think it works now again. Updated to 2021.10.1 yesterday and Will try to plug in my car in about an hour.


From: Jakob Schlyter @.> Sent: Saturday, October 9, 2021 12:31:48 PM To: kirei/hass-chargeamps @.> Cc: Daniel Örneling @.>; Mention @.> Subject: Re: [kirei/hass-chargeamps] Issues with hass 2021.10 (#23)

@DanielOrnelinghttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FDanielOrneling&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102905607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9ISZCCHgDXpZNdrm6Yo%2BRSseOXWXncReVX9xC1GcDIg%3D&reserved=0 They are looking into it. Strange I did not get this error on 2021.10.2 - what version did you try? Could it be fixed in the JWT library used in 2021.10?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkirei%2Fhass-chargeamps%2Fissues%2F23%23issuecomment-939273679&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102905607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qZEyUGkgPD6VUUF8H9nRLg72%2ByNlt%2B%2BdtbRfeTkaGqI%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADTTS27UMFGBXWD3ISRYMU3UGAKZJANCNFSM5FPEEYJA&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102915602%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sk4L6MycVJNDyZR5%2Fh0tdDZUFZ%2FaKXZn04%2BS3DD7fHI%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102925595%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FIGTk6K6wOQB1uQDr35ynMebhEL3uKuvipF5xRYzMYw%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102925595%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uRpgvy1K%2FZE1uALwI8F%2BPKTNm%2BdX%2F2xuNNV4BsxnFjk%3D&reserved=0.

DanielOrneling commented 3 years ago

And it's working again just as expected :)


From: Daniel Örneling @.> Sent: Saturday, October 9, 2021 12:32:59 PM To: kirei/hass-chargeamps @.>; kirei/hass-chargeamps @.> Cc: Mention @.> Subject: Re: [kirei/hass-chargeamps] Issues with hass 2021.10 (#23)

I think it works now again. Updated to 2021.10.1 yesterday and Will try to plug in my car in about an hour.


From: Jakob Schlyter @.> Sent: Saturday, October 9, 2021 12:31:48 PM To: kirei/hass-chargeamps @.> Cc: Daniel Örneling @.>; Mention @.> Subject: Re: [kirei/hass-chargeamps] Issues with hass 2021.10 (#23)

@DanielOrnelinghttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FDanielOrneling&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102905607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9ISZCCHgDXpZNdrm6Yo%2BRSseOXWXncReVX9xC1GcDIg%3D&reserved=0 They are looking into it. Strange I did not get this error on 2021.10.2 - what version did you try? Could it be fixed in the JWT library used in 2021.10?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkirei%2Fhass-chargeamps%2Fissues%2F23%23issuecomment-939273679&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102905607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qZEyUGkgPD6VUUF8H9nRLg72%2ByNlt%2B%2BdtbRfeTkaGqI%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADTTS27UMFGBXWD3ISRYMU3UGAKZJANCNFSM5FPEEYJA&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102915602%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sk4L6MycVJNDyZR5%2Fh0tdDZUFZ%2FaKXZn04%2BS3DD7fHI%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102925595%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FIGTk6K6wOQB1uQDr35ynMebhEL3uKuvipF5xRYzMYw%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C0d55b6b0adfc46a1ff1608d98b100017%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693723102925595%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uRpgvy1K%2FZE1uALwI8F%2BPKTNm%2BdX%2F2xuNNV4BsxnFjk%3D&reserved=0.