Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on startup with 400 bad request - OnStarJS keys expired - UPDATE: New version with alternate access method now available #333

Closed
CamSoper opened this issue Oct 24, 2024 · 11 comments
Assignees
Labels
solution available Previously blocked issue now has a working solution

Comments

@CamSoper
Copy link

CamSoper commented Oct 24, 2024

Has been solid for months. Problem started today. I pulled latest, no change.

Output

**Attached as logs.txt
logs.txt
**

docker-compose.yml

version: '3'
services:
  onstar2mqtt:
    container_name: onstar2mqtt
    # image: michaelwoods/onstar2mqtt
    # image: bigthundersr/onstar2mqtt:latest
    image: ghcr.io/bigthundersr/onstar2mqtt
    restart: unless-stopped
    env_file:
      - ./onstar2mqtt.env
    environment:
    - ONSTAR_DEVICEID=<snip>
    - ONSTAR_VIN=<snip>
    - MQTT_HOST=<snip>

onstar2mqtt.env

ONSTAR_USERNAME=<nope>@outlook.com
ONSTAR_PASSWORD=<nope>
ONSTAR_PIN=<also nope>
MQTT_USERNAME=<mqttnope>
MQTT_PASSWORD=<further nope>
@BigThunderSR
Copy link
Owner

The API key expired on October 23. Unfortunately, there is only one person (@nilathedragon) who knows how to get the keys as of now and his latest attempt was unsuccessful (samrum/OnStarJS#258). Until someone can figure out a way past this, there is nothing I can do at this point. 😞

See: BigThunderSR/homeassistant-addons-onstar2mqtt#744

@BigThunderSR BigThunderSR changed the title Fails on startup with 400 bad request Fails on startup with 400 bad request - OnStarJS keys expired Oct 24, 2024
@CamSoper
Copy link
Author

Totally understood, @BigThunderSR.

Thanks for everything you do for this community!

@Frazou1
Copy link

Frazou1 commented Oct 29, 2024

Same problem here as well :(

@BigThunderSR BigThunderSR changed the title Fails on startup with 400 bad request - OnStarJS keys expired Fails on startup with 400 bad request - OnStarJS keys expired - New version with alternate access method now available Nov 22, 2024
@BigThunderSR BigThunderSR changed the title Fails on startup with 400 bad request - OnStarJS keys expired - New version with alternate access method now available Fails on startup with 400 bad request - OnStarJS keys expired - NOTE: New version with alternate access method now available Nov 22, 2024
@BigThunderSR BigThunderSR changed the title Fails on startup with 400 bad request - OnStarJS keys expired - NOTE: New version with alternate access method now available Fails on startup with 400 bad request - OnStarJS keys expired - UPDATE: New version with alternate access method now available Nov 22, 2024
@glassbase
Copy link

How do we use this new method?

start container without OTP, get OTP, add OTP to config and restart container?

@metheos
Copy link

metheos commented Nov 22, 2024

@glassbase
See the instructions in the readme of my OnstarJS fork that has enabled this functionality 👍

https://github.com/metheos/OnStarJS?tab=readme-ov-file#new-requirement-as-of-2024-11-19

@glassbase
Copy link

glassbase commented Nov 22, 2024

Been trying g to turn off email MFA, follow their steps, get email saying it’s disabled, but go back into account settings and email MFA is re-enabled automatically 😡

oh I see that it is maybe because I have a Canadian account

@Frazou1
Copy link

Frazou1 commented Nov 22, 2024

Been trying g to turn off email MFA, follow their steps, get email saying it’s disabled, but go back into account settings and email MFA is re-enabled automatically 😡

Me too, and i cant get the QR Code ... there is another way ?

@HaTaX2
Copy link

HaTaX2 commented Nov 22, 2024

Just wanted to add my experience as everything is working for me now within HA, or at least the core functionality as it can take a few hours or a day to update things like battery & ambient temps along with tire pressure and mileage / energy usage.

I logged into my account on my computer in Brave browser and had to disable email as my MFA of choice, it sent an email with a code to verify and I did that. After a refresh of the account page I had the option to enable a 3rd party application for MFA and I enabled it. Clicking through things until I got to the QR code to be scanned, I then copy and pasted information on that page which included the QR's "otpauth" URL and also a separate block of text which had my account email address and "Secret XXXXX" where the X's are the TOTP key that was needed. (Edited to add, I did setup Microsoft's Authenticator app on Android with the QR code after I had extracted the TOTP information. It doesn't have an easy way to extract this information so getting that info on the setup QR page was a big help. If you have a raw QR code scanning app you could also use that to extract this information from just the QR code image.)

After putting all of that into the configuration section, I saw in the log it was able to successfully connect to my account and I finally saw information in HA again! So thank you so much everyone that put the effort and for sure some time into resolving this!! BigThunderSR, metheos, and everyone else behind the scenes.... you're awesome and I appreciate your dedication!

@CamSoper
Copy link
Author

CamSoper commented Nov 22, 2024

Awesome work, guys!

I've got my commands back, but my sensors aren't updating. I've got this in my logs:

onstar2mqtt2   | info: Button Configs Published! {"timestamp":"2024-11-22 23:47:09"}
onstar2mqtt2   | error: Error Polling Data: {"error":{"error":{"message":"Request Failed with status 504 - Gateway Timeout","request":{"method":"POST"},"response":{"data":"","headers":{"cache-control":"no-store","connection":"keep-alive","content-length":"0","date":"Fri, 22 Nov 2024 23:47:19 GMT","pragma":"no-cache","request-context":"appId=cid-v1:a7e19842-5b19-4b47-a9cf-85cc6e87a746"},"status":504,"statusText":"Gateway Timeout"},"stack":"Error: Request Failed with status 504 - Gateway Timeout\n    at RequestService.<anonymous> (/app/src/deps/index.cjs:35166:32)\n    at Generator.throw (<anonymous>)\n    at rejected (/app/src/deps/index.cjs:44:65)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}},"timestamp":"2024-11-22 23:47:20"}

Since it's a 504 I'm guessing it's probably a transient condition upstream, but I wanted to see if anybody else is seeing this. Is it just me?

EDIT: Never mind! It just went through! I've got my dashboards back!!!

Thanks again, @BigThunderSR!

@BigThunderSR
Copy link
Owner

Awesome work, guys!

I've got my commands back, but my sensors aren't updating. I've got this in my logs:

onstar2mqtt2   | info: Button Configs Published! {"timestamp":"2024-11-22 23:47:09"}
onstar2mqtt2   | error: Error Polling Data: {"error":{"error":{"message":"Request Failed with status 504 - Gateway Timeout","request":{"method":"POST"},"response":{"data":"","headers":{"cache-control":"no-store","connection":"keep-alive","content-length":"0","date":"Fri, 22 Nov 2024 23:47:19 GMT","pragma":"no-cache","request-context":"appId=cid-v1:a7e19842-5b19-4b47-a9cf-85cc6e87a746"},"status":504,"statusText":"Gateway Timeout"},"stack":"Error: Request Failed with status 504 - Gateway Timeout\n    at RequestService.<anonymous> (/app/src/deps/index.cjs:35166:32)\n    at Generator.throw (<anonymous>)\n    at rejected (/app/src/deps/index.cjs:44:65)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}},"timestamp":"2024-11-22 23:47:20"}

Since it's a 504 I'm guessing it's probably a transient condition upstream, but I wanted to see if anybody else is seeing this. Is it just me?

I have a note about this here: https://github.com/BigThunderSR/onstar2mqtt?tab=readme-ov-file#helpful-usage-notes

You should start getting data after you drive around for a few until the vehicle goes back into hibernation.

@BigThunderSR BigThunderSR added the solution available Previously blocked issue now has a working solution label Nov 26, 2024
@CamSoper
Copy link
Author

CamSoper commented Dec 4, 2024

I'mma close this now, it's all good.

Thanks again, folks!

@CamSoper CamSoper closed this as completed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution available Previously blocked issue now has a working solution
Projects
None yet
Development

No branches or pull requests

6 participants