michaelwoods / onstar2mqtt

OnStarJS wrapper for MQTT
MIT License
106 stars 38 forks source link

Constant docker crashes #322

Closed ehran closed 8 months ago

ehran commented 11 months ago

Hello and thanks for developping this app !

I've been using it for the past couple of years or so but I see recently that the docker app keeps crashing and in the logs I can see {"error":{"message":"Request Failed with status 400 - Bad Request","request": (etc...)

Any hints where to start investigating ? I have 2 of these running (one for each car) and both fail to work properly.

thanks !

michaelwoods commented 11 months ago

Mine's been running for the last 8 days. Nothing has really changed except for OnStarJS updates and some dependency libraries. I'd suggest checking your docker, environment, etc.

ehran commented 9 months ago

Hi @michaelwoods , my docker environement is a synology app and works fine for all other containers, has always worked fine till few months ago and only the onstar2mqtt is the container that keeps on crashing... any way to debug whats happening looking at the logs ??

ehran commented 9 months ago

Does MFA have to be disabled in order for the app to work ? It still crashes within seconds ...

ehran commented 9 months ago

So I created new containers for my 2 cars in docker, for some reason despite selecting "latest", the old ones would not update to the latest version of the app. The new containers are with the latest version now. The app does not crash within seconds so this is getting better, however I now have this error : error: Error {"error":{"message":"Request Failed with status 504 - Gateway Timeout","request":{"method": "POST"},"response":{"data":"","headers":{"cache-control":"no-store","connection":"keep-alive","content-l ength":"0","date":"Tue, 12 Dec 2023 19:48:37 GMT","pragma":"no-cache","request-context":"appId=cid-v1:a7 e19842-5b19-4b47-a9cf-85cc6e87a746"},"status":504,"statusText":"Gateway Timeout"},"stack":"Error: Reques t Failed with status 504 - Gateway Timeout\n at RequestService. (/app/node_modules/onstarj s/dist/index.cjs:588:32)\n at Generator.throw ()\n at rejected (/app/node_modules/onsta rjs/dist/index.cjs:27:65)\n at process.processTicksAndRejections (node:internal/process/task_queues:9 5:5)"}}

Any hints as to what I am doing wrong ?

thanks

michaelwoods commented 9 months ago

Try starting the vehicle if it hasn't been started recently. That usually resets any request limits.

ehran commented 8 months ago

Hi The vehicle is used everyday but I also notice that the crappy OnStar app "MyChevrolet" is also not updating properly, I have info from 22 days ago and it wont update to the current status despite the car being on...

The good thing is that the docker is not crashing, but it seems that for some time now, all the logs are "Request Failed with Status 504 - Gateway timeout" ... so I was not getting any update. I restarted the docker and seems to work now...

Does that mean we need to restart the docker on a regular basis ?

BigThunderSR commented 8 months ago

Unfortunately, due to the temperamental nature of the OnStar API, it's pretty much a crapshoot at this point. It sometimes works after one restart and at other times, takes 3 - 4 restarts. However, if you restart too often in a short period of time, you will get Error-429'd.

michaelwoods commented 8 months ago

Closing as related to API performance.

ehran commented 6 months ago

I have the latest version of onstar2MQTT, I have waited 24 hours before restarting the docker image and I am still getting an instant crash with the following message in the logs: error: Main function error. {"error":{"message":"Request Failed with status 400 - Bad Request","request":{" (....)

I'm unsure about it being on the API side if I am the only one reporting these crashes. The config setup has not changed, neither have my credentials...

BigThunderSR commented 6 months ago

I have the latest version of onstar2MQTT, I have waited 24 hours before restarting the docker image and I am still getting an instant crash with the following message in the logs: error: Main function error. {"error":{"message":"Request Failed with status 400 - Bad Request","request":{" (....)

I'm unsure about it being on the API side if I am the only one reporting these crashes. The config setup has not changed, neither have my credentials...

Please see https://github.com/michaelwoods/onstar2mqtt/issues/208#issuecomment-1960611072 and https://github.com/michaelwoods/onstar2mqtt/issues/208#issuecomment-1961343869 and https://github.com/michaelwoods/onstar2mqtt/issues/208#issuecomment-1964284387.

ehran commented 6 months ago

I have the latest version of onstar2MQTT, I have waited 24 hours before restarting the docker image and I am still getting an instant crash with the following message in the logs: error: Main function error. {"error":{"message":"Request Failed with status 400 - Bad Request","request":{" (....) I'm unsure about it being on the API side if I am the only one reporting these crashes. The config setup has not changed, neither have my credentials...

Please see #208 (comment) and #208 (comment) and #208 (comment).

Thanks @BigThunderSR installed your fork and seems to work great !!