Brandawg93 / homebridge-fordpass

Control your Ford vehicle in HomeKit using Homebridge.
GNU General Public License v3.0
61 stars 15 forks source link

[Bug]: Crashing Homebridge #259

Open riccanet opened 1 month ago

riccanet commented 1 month ago

Describe the bug

It seems that the plugin is failing to request the proper information, and this is causing HomeBridge to get into a crash loop. I have entered all the requested information (client_id, secret, and code)

Debug Output

[FordPass] Command failed with error: {"message":"Request failed with status code 429","name":"AxiosError","stack":"AxiosError: Request failed with status code 429\n at settle (/homebridge/node_modules/homebridge-fordpass/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (/homebridge/node_modules/homebridge-fordpass/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:526:35)\n at endReadableNT (node:internal/streams/readable:1589:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (/homebridge/node_modules/homebridge-fordpass/node_modules/axios/lib/core/Axios.js:45:41)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http","fetch"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","Application-Id":"AFDC085B-377A-4351-B23E-5E1D35FB3700","Authorization":"Bearer XXXXXXXX","User-Agent":"axios/1.7.2","Accept-Encoding":"gzip, compress, deflate, br"},"method":"post","url":"https://api.mps.ford.com/api/fordconnect/v1/vehicles/FF8080819096BE270190B1A211150105/status"},"code":"ERR_BAD_REQUEST","status":429}

Steps to reproduce

  1. Configure the plugin with the required credentials

Device Type

Ubuntu Docker

iOS Version

17

Bug Persistence

Consistently

Last Working Version

No response

cmorozcogmailcom commented 1 month ago

i'm having the same issue 7/20/2024, 10:04:18 AMfordpassbridge stopping 7/20/2024, 10:04:23 AMFordpass Bridge starting 7/20/2024, 10:04:23 AMFordpass Bridge starting 7/20/2024, 10:04:38 AMFordpass BridgeLoaded plugin 'homebridge-fordpass' 7/20/2024, 10:04:38 AMFordpass BridgeLoaded plugin 'homebridge-fordpass' 7/20/2024, 10:04:39 AMFordpass BridgeLoading 1 platforms... 7/20/2024, 10:04:39 AMFordpass BridgeLoading 1 platforms... 7/20/2024, 10:04:39 AMFordpass BridgeFordPassConfiguring accessory 2020 F Escape 7/20/2024, 10:04:39 AMFordpass BridgeFordPassConfiguring accessory 2020 F Escape 7/20/2024, 10:04:39 AMFordpass BridgeBridge is running on port 51836. 7/20/2024, 10:04:39 AMFordpass BridgeBridge is running on port 51836. 7/20/2024, 10:04:57 AMFordpass BridgeFordPassERRORVehicle info failed with error: ERR_BAD_REQUEST 7/20/2024, 10:04:57 AMFordpass BridgeFordPassERRORVehicle info failed with error: ERR_BAD_REQUEST 7/20/2024, 10:04:57 AMFordpass BridgeFordPassERRORFailed to retrieve vehicle information. Will try again in a bit. 7/20/2024, 10:04:57 AMFordpass BridgeFordPassERRORFailed to retrieve vehicle information. Will try again in a bit. 7/20/2024, 10:06:16 AMFordpass BridgeERROR[Fordpass Bridge 892E@Lock Target State] The write handler for the characteristic 'Lock Target State' on the accessory '2020 F Escape' was slow to respond! 7/20/2024, 10:06:16 AMFordpass BridgeERROR[Fordpass Bridge 892E@Lock Target State] The write handler for the characteristic 'Lock Target State' on the accessory '2020 F Escape' was slow to respond! 7/20/2024, 10:06:22 AMFordpass BridgeERROR[Fordpass Bridge 892E@Lock Target State] The write handler for the characteristic 'Lock Target State' on the accessory '2020 F Escape' didn't respond at all!. Please check that you properly call the callback! 7/20/2024, 10:06:22 AMFordpass BridgeERROR[Fordpass Bridge 892E@Lock Target State] The write handler for the characteristic 'Lock Target State' on the accessory '2020 F Escape' didn't respond at all!. Please check that you properly call the callback!

--- postman with ford api seems to work. "status": "SUCCESS", "vehicleCapabilities": { "remoteLock": "Available", "remoteUnlock": "Available", "remoteStart": "Available", "remoteStop": "Available", "boundaryAlerts": "Unavailable", "remoteChirpHonk": "Unavailable", "remotePanicAlarm": "Available", "displayPreferredChargeTimes": "Unavailable", "departureTimes": "Unavailable", "globalStartStopCharge": "Unavailable" } }

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days

cmorozcogmailcom commented 2 weeks ago

running version v2.0.1-test.0 I still see some problem with the plugin. 20/08/2024, 17:08:21] [FordPass] Vehicle info failed with error: ERR_BAD_RESPONSE [20/08/2024, 17:08:21] [FordPass] Failed to retrieve vehicle information. Will try again in a bit.