grzegorz914 / homebridge-xbox-tv

Homebridge plugin for Microsoft Game Console, publish as independent external platform accessory.
MIT License
164 stars 15 forks source link

Error Messaging on CHECK STATE #171

Closed shanemcw closed 1 year ago

shanemcw commented 1 year ago

Authorization error: { "status": 400, "body": ""error\": "invalid _grant\", \"error_description\": \"The provided value for the 'code' parameter is not valid. I, I"correlation_id":|"Ocaef031-C095-4c68-a40a-1ddb8aff1£881"" }

Error reported when clicking CHECK STATE and after quite some time of the gear spinning.

2.8.16-beta.0

Screenshot 2023-04-14 at 10 25 16 AM

Nothing apparent in debug logging

[4/14/2023, 10:34:37 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Last heart beat was: 0.717 sec ago. [4/14/2023, 10:34:38 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Last heart beat was: 1.718 sec ago. [4/14/2023, 10:34:38 AM] [Homebridge UI] [homebridge-xbox-tv] Incoming Request: /startAuthorization [4/14/2023, 10:34:39 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Last heart beat was: 2.718 sec ago. [4/14/2023, 10:34:39 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Received message from: 192.168.0.23:5050 [4/14/2023, 10:34:39 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Received event type: acknowledge [4/14/2023, 10:34:39 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Packet send acknowledge. [4/14/2023, 10:34:39 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Request number set to: 37 [4/14/2023, 10:34:39 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Socket send Acknowledge. [4/14/2023, 10:34:40 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Last heart beat was: 0.714 sec ago. [4/14/2023, 10:34:41 AM] [Homebridge UI] [homebridge-xbox-tv] Terminating child process... [4/14/2023, 10:34:41 AM] [Homebridge UI] [homebridge-xbox-tv] Child process ended [4/14/2023, 10:34:41 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Last heart beat was: 1.715 sec ago. [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Last heart beat was: 2.715 sec ago. [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Received message from: 192.168.0.23:5050 [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Received event type: acknowledge [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Packet send acknowledge. [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Request number set to: 38 [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Socket send Acknowledge. [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Received message from: 192.168.0.23:5050 [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Received event type: acknowledge [4/14/2023, 10:34:42 AM] [XboxTv] Device: 192.168.0.23 Xbox, debug: Packet send acknowledge.

shanemcw commented 1 year ago
[4/14/2023, 10:45:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 10:55:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 11:05:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 11:15:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 11:25:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 11:35:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 11:45:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 11:55:53 AM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 12:05:53 PM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 12:15:53 PM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 12:25:53 PM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 12:35:53 PM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
[4/14/2023, 12:41:33 PM] [homebridge-http-advanced-accessory] This plugin slows down Homebridge. The read handler for the characteristic 'On' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[4/14/2023, 12:45:53 PM] [XboxTv] Device: 192.168.0.23 Xbox, check authorization state error: {}, recheck in 60se.
shanemcw commented 1 year ago

I believe this is triggered when Microsoft invalidates a previously-working Web API Token. Enhancement: parse the error and report user recommended steps.

grzegorz914 commented 1 year ago

if this error occurs just clear Web Api token and authorize console again