fleet-telemetry icon indicating copy to clipboard operation
fleet-telemetry copied to clipboard

Can't add public key to vehicule

Open themarch opened this issue 1 year ago • 17 comments

I got this when I wanted to add the public key to the vehicle. However, I do have access to this vehicle, and I can make API calls on it etc. And I've already done the ‘third_party’ and ‘authorization_code’ parts. (also with vehicle_device_data scope)

Maybe it's another zone problem? (for the translation of the pictures it's : The vehicle cannot be shared. Adding a virtual key for ‘bib-data.fr’ is prohibited because you have not granted ‘bib-data.fr’ access to your account.)

Capture d’écran 2024-05-29 à 09 32 53

But as you can see, on the client account, all is link with "bib-data.fr"

Screenshot 2024-05-27 at 13 50 47 (1)

themarch avatar May 29 '24 07:05 themarch

Okay @patrickdemers6 I tried with another vehicle (which has a more recent software version and it works), this must have an impact.

themarch avatar May 29 '24 17:05 themarch

This error occurs when you haven't gone through all the authorization code flow steps. Vehicle firmware has nothing to do with it.

When you did a different vehicle, was it on a different account?

patrickdemers6 avatar May 29 '24 18:05 patrickdemers6

I believe it's also possible this happens when your server can't be accessed from the mobile app when it validates public key.

patrickdemers6 avatar May 29 '24 18:05 patrickdemers6

I'm really surprised because I did the EXACT same process, so all the authorization code flow steps. I did it 2 minutes apart and I did it several times. And with one it never worked, always the same error. And with the other it always worked. Yes, it's a different account. @patrickdemers6

themarch avatar Jun 01 '24 17:06 themarch

Can you email [email protected] with the two email addresses you tried? Make sure to call out which one is working and which one isn't.

patrickdemers6 avatar Jun 01 '24 17:06 patrickdemers6

@patrickdemers6 We've had this occur on almost all of our accounts that both:

  1. owned vehicles and
  2. were some of the first accounts that authorized our application.

Based on what we were seeing, we kinda suspected that this started occurring around the time that we were able to retroactively change scopes without revoking the application and re-adding it.

Our (hopefully temporary) workaround has been to revoke the application and re-authenticate.

SirArkimedes avatar Jun 01 '24 19:06 SirArkimedes

Thanks for letting me know. Narrowing down the timeline of this starting helps a lot. If you can also email any additional details to me, it will help with investigating.

patrickdemers6 avatar Jun 01 '24 19:06 patrickdemers6

I've asked for the email address of the second account, but I don't have it directly. I'll send you an email as soon as I have all the information, detailing everything.

We've already tried deleting revoke the application and re-authenticate but no change.

Thanks in advance!

themarch avatar Jun 01 '24 19:06 themarch

I've just emailed you the information! @patrickdemers6

themarch avatar Jun 01 '24 19:06 themarch

Faceing the exact same issue, any advice what should I test/try? @patrickdemers6 I followed exactly the instruction you provided

paede81 avatar Jun 03 '24 22:06 paede81

Sorry for the delay everyone, I'm struggling to identify the issue. Can someone reproduce it again and share VIN/email? I know you already have, but I want to dig into the logs while they're fresh.

cc @themarch @paede81

patrickdemers6 avatar Jun 13 '24 18:06 patrickdemers6

Hi @patrickdemers6 I've just tried it out and same error ! For the VIN: LRWYGCFS6PC552861 And email: [email protected]

themarch avatar Jun 17 '24 14:06 themarch

Sorry for the delay everyone, I'm struggling to identify the issue. Can someone reproduce it again and share VIN/email? I know you already have, but I want to dig into the logs while they're fresh.

cc @themarch @paede81

Tried it right now but still the same issue

paede81 avatar Jun 17 '24 14:06 paede81

Thanks all.

@paede81 I don't see that you've granted an application access to that email. Can you confirm you've gone through full authorization flow?

@themarch you have granted that email address access to the application; however, it looks like the mobile app is signed in with an email beginning with pa. Can you make sure you're using the same email for authorization flow and in the mobile app?

patrickdemers6 avatar Jun 17 '24 22:06 patrickdemers6

I think that's it @patrickdemers6 I'll give it a go, but in fact: the tesla is X with X account.

But I sent the QRCode to be scanned to a secondary driver with email Y. I'm testing X with X later today.

themarch avatar Jun 20 '24 08:06 themarch

@patrickdemers6 Sorry to delay, it was that ! Thanks a lot

themarch avatar Jun 26 '24 09:06 themarch

Thanks all.

@paede81 I don't see that you've granted an application access to that email. Can you confirm you've gone through full authorization flow?

@themarch you have granted that email address access to the application; however, it looks like the mobile app is signed in with an email beginning with pa. Can you make sure you're using the same email for authorization flow and in the mobile app?

Hi Patrick (@patrickdemers6) Sorry for the late response. Yes I did go through the full authorization flow but I probably used the wrong API hostname as I live in Europe and I used the US one. In the meantime I started again with the correct URL and seems it's working now to add the public key to the vehicle. But now facing the next issue: Send Fleet Telemetry Config not accepted as CSR not recognized by Tesla. Could this issues also be related to the other issue? Send first the CSR to the US host and then again to the EU host? "response": null, "error": "Please follow instructions https://developer.tesla.com/docs/fleet-api#fleet-telemetry to send a CSR to Tesla; configuration may take up to two weeks.", "error_description": "", "txid": "579701de39f540145145d4ca683e960e"

paede81 avatar Aug 23 '24 11:08 paede81

@paede81 I updated your EU account so it is configured for streaming.

Closing this issue.

patrickdemers6 avatar Aug 24 '24 00:08 patrickdemers6