TA2k / ioBroker.ford

ioBroker Adapter for FordPass
MIT License
7 stars 4 forks source link

Cannot connect #36

Open HenkKoopmans opened 3 months ago

HenkKoopmans commented 3 months ago

Since yesterday evening no connection anymore. Version 0.2.2 Domain de, com, ch same result

OS = Debian on Pi Error Log (oldest entry at bottom):

ford.0 2024-05-17 11:59:35.410 error {"error":"invalid_request","error_description":"AADB2C90083: The request is missing required parameter: code.\r\nCorrelation ID: 5dfe1205-1952-445d-8573-a1cb2e4f498e\r\nTimestamp: 2024-05-17 09:59:35Z\r\n"}

ford.0 2024-05-17 11:59:35.410 error AxiosError: Request failed with status code 400

ford.0 2024-05-17 11:59:35.409 error Failed to get mid token

ford.0 2024-05-17 11:59:34.609 error "\nAccess Denied\n\n

Access Denied

\n \nYou don't have permission to access \"http://login.ford.de/4566605f-43a7-400a-946e-89cc9fdb0bd7/B2C_1A_SignInSignUp_de-DE/SelfAsserted?\" on this server.

\nReference #18.17fe1202.1715939974.19fafe1d\n

https://errors.edgesuite.net/18.17fe1202.1715939974.19fafe1d

\n\n\n"

ford.0 2024-05-17 11:59:34.608 error AxiosError: Request failed with status code 403

ford.0 2024-05-17 11:59:34.606 error Failed to first Azure Step

ford.0 2024-05-17 11:59:32.760 info starting. Version 0.2.2 (non-npm: TA2k/ioBroker.ford) in /opt/iobroker/node_modules/iobroker.ford, node: v18.17.1, js-controller: 5.0.19

mlapp commented 3 months ago
Hier besteht das gleiche Problem. Tritt sowohl mit 0.20 als auch mit 0.22 auf. Update: Mit der com-Domain funktioniert es bei mir mit dem 0.22er Adapter wieder (teilweise). Update: Es funktioniert aber nicht richtig. Hier die entsprechenden Logeinträge: ford.0 2024-05-17 15:21:46.862 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:21:46.776190459Z"}
ford.0 2024-05-17 15:21:46.862 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:21:39.484 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:21:39.398605320Z"}
ford.0 2024-05-17 15:21:39.484 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:21:36.123 error {"code":401,"error":"unauthorized","message":"provided token was expired","timestamp":"2024-05-17T13:21:36.037180Z","referenceId":"767649ee4db1a343537a057a8f7ec852"}
ford.0 2024-05-17 15:21:36.123 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:21:36.123 error Failed command: status
ford.0 2024-05-17 15:21:35.379 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:21:35.293633542Z"}
ford.0 2024-05-17 15:21:35.378 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:21:10.492 error Start relogin in 1min
ford.0 2024-05-17 15:21:10.492 error {"message":"Invalid or Expired Token","timestamp":"2024-05-17T13:21:10.416546890Z","errorCode":"460"}
ford.0 2024-05-17 15:21:10.492 error AxiosError: Request failed with status code 400
ford.0 2024-05-17 15:21:10.492 error refresh token failed
ford.0 2024-05-17 15:20:39.486 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:20:39.400409560Z"}
ford.0 2024-05-17 15:20:39.486 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:19:39.474 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:19:39.388733692Z"}
ford.0 2024-05-17 15:19:39.474 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:18:39.489 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:18:39.403854477Z"}
ford.0 2024-05-17 15:18:39.489 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:17:39.499 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:17:39.412884856Z"}
ford.0 2024-05-17 15:17:39.498 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:16:39.491 error {"status":"ACC-16-6052","error":"unauthorized","message":"invalid token","timestamp":"2024-05-17T13:16:39.405599532Z"}
ford.0 2024-05-17 15:16:39.491 error AxiosError: Request failed with status code 401
ford.0 2024-05-17 15:14:40.033 error Error [ERR_FR_REDIRECTION_FAILURE]: Redirected request failed: Unsupported protocol fordapp:
ford.0 2024-05-17 15:14:40.033 error Failed to get login form
ford.0 2024-05-17 15:13:38.956 error Start relogin in 1min
ford.0 2024-05-17 15:13:38.956 error {"message":"Invalid or Expired Token","timestamp":"2024-05-17T13:13:38.880725415Z","errorCode":"460"}
ford.0 2024-05-17 15:13:38.956 error AxiosError: Request failed with status code 400
ford.0 2024-05-17 15:13:38.954 error refresh token failed
HenkKoopmans commented 3 months ago

Ich habe es gerade probiert, bei mir funktioniert es auch nicht mit der com oder ch Domain. (0.22 Adapter)

HenkKoopmans commented 3 months ago

Korrektur, com Domain funktioniert. !!

mlapp commented 3 months ago

Mit der com-Domain hat es bei mir einen Moment gedauert bis der Adapter wieder grün wurde. Aber jetzt kommen auch wieder aktuelle Daten an. Update: Zumindest kurz. Dann läuft er wieder auf Fehler. Siehe weiter oben.

erwini commented 3 months ago

Wieder kein login möglich seit ~18h.

error: ford.0 (280553) Failed to first Azure Step
error: ford.0 (280553) AxiosError: Request failed with status code 403
error: ford.0 (280553) "Access Denied  You don't have permission to access http://login.ford.com/...
error: ford.0 (280553) Failed to get mid token
error: ford.0 (280553) AxiosError: Request failed with status code 400
error: ford.0 (280553) {"error":"invalid_request","error_description":"AADB2C99983: The request is missing required parameter: code.\r\nCorrelation ID: b3 ...

sieht aber ein wenig anders aus als oben. Gleiche Ursache?

TA2k commented 3 months ago

bitte v1.0.1 nutzen

erwini commented 3 months ago

gleiche Fehler mit v1.0.1 :-(

HenkKoopmans commented 3 months ago

Ich konnte mich einloggen und habe nun ein Developer-Konto mit einem ID-Code. Ich habe den Code im Adapter gespeichert, aber danach ist es nicht mehr klar. Welche URL muss ich öffnen?

TA2k commented 3 months ago

die in der ersten text box

HenkKoopmans commented 3 months ago

Sorry welche erste Textbox? Meine Delopper Konto ID ist meine E-mail, dann habe ich eine Credential ID, und eine secret Hint.

TA2k commented 3 months ago

Genau die eintragen. Speichern drücken. Seite Neuladen und dann die url die sichtbar ist besuchen. die letzte url mit localhost in die zweite box kopieren

HenkKoopmans commented 3 months ago

Meine URL in der Adresszeile ist keine "Localhost" aber eine Lokale Netzwerk Adresse.

Den Adapter startet regelmässig, aber kriegt Fehlermeldung: ford.0 2024-05-24 21:57:51.668 error {"error":"invalid_request","error_description":"AADB2C90083: The request is missing required parameter: code.\r\nCorrelation ID: 01d59f77-a263-4d13-8e05-bc63a18ab0fe\r\nTimestamp: 2024-05-24 19:57:51Z\r\n"}

ford.0 2024-05-24 21:57:51.668 error AxiosError: Request failed with status code 400

ford.0 2024-05-24 21:57:51.663 info Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason

ford.0 2024-05-24 21:57:51.661 info terminating

ford.0 2024-05-24 21:57:51.659 info Got terminate signal TERMINATE_YOURSELF

ford.0 2024-05-24 21:57:51.631 error Failed to get token. Please restart the adapter and do a new login

ford.0 2024-05-24 21:57:50.119 info Found clientID start API Login

ford.0 2024-05-24 21:57:50.027 info starting. Version 1.0.1 (non-npm: TA2k/ioBroker.ford) in /opt/iobroker/node_modules/iobroker.ford, node: v18.17.1, js-controller: 5.0.19

ford.0 2024-05-24 21:57:43.662 info Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason

ford.0 2024-05-24 21:57:43.660 info terminating

TA2k commented 3 months ago

wie sieht die localhost url aus die du einkopiert hast

HenkKoopmans commented 3 months ago

Ok I repeated the reload, now I got the following URL https://fordconnect.cv.ford.com/common/login/?make=F&application_id=AFDC085B-377A-4351-B23E-5E1D35FB3700&response_type=code&state=123&redirect_uri=https%3A%2F%2Flocalhost%3A3000&scope=access&client_id=xxxxx@bluewin.ch I went to this address and get an error message:

Sorry, but we're having trouble signing you in. We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, please try again. Correlation ID: xxxxxxxxxxxxx875 Timestamp: 2024-05-24 20:06:32Z AADB2C90018: The client id 'xxxx_bluewin.ch' specified in the request is not registered in tenant 'dah2vb2cprod.onmicrosoft.com'.

my E-mail was correct of course

HenkKoopmans commented 3 months ago

I believe I have a problem with what is ID and what is the secret? Sorry for english, is for me easier then german. No problem when you answer in german

TA2k commented 3 months ago

Du musst die erste url besuchen für eine client id und secret in 1.0.2 ist das besser sichtbar

HenkKoopmans commented 3 months ago

OK I repeated the process. ClientID was the long code. Secret was only a 5 digit code. I got a URL, steered to that URL logged in, and my MachE showed up. Then I was directed to a localhost URL. I copied this URL in the adapter. But still get the same error messages.

TA2k commented 3 months ago

Wie sieht die localhost url aus

HenkKoopmans commented 3 months ago

https://localhost:3000/?state=123&code=eyJraWQiOiI2c

I have removed the last xx digits.

TA2k commented 3 months ago

was sagt der log

HenkKoopmans commented 3 months ago
Zeit

Nachricht

ford.0 2024-05-24 22:33:12.886 info Found clientID start API Login

ford.0 2024-05-24 22:33:12.789 info starting. Version 1.0.2 (non-npm: TA2k/ioBroker.ford) in /opt/iobroker/node_modules/iobroker.ford, node: v18.17.1, js-controller: 5.0.19

ford.0 2024-05-24 22:33:06.411 info Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason

ford.0 2024-05-24 22:33:06.409 info terminating

ford.0 2024-05-24 22:33:06.404 info Got terminate signal TERMINATE_YOURSELF

ford.0 2024-05-24 22:33:06.399 error {"error":"invalid_grant","error_description":"AADB2C90080: The provided grant has expired. Please re-authenticate and try again. Current time: 1716582785, Grant issued time: 1716582155, Grant expiration time: 1716582455\r\nCorrelation ID: 5989e70e-4912-4f80-a35c-71e4c12b3290\r\nTimestamp: 2024-05-24 20:33:05Z\r\n"}

ford.0 2024-05-24 22:33:06.398 error AxiosError: Request failed with status code 400

ford.0 2024-05-24 22:33:06.374 error Failed to get token. Please restart the adapter and do a new login

ford.0 2024-05-24 22:33:05.020 info Found clientID start API Login

ford.0 2024-05-24 22:33:04.930 info starting. Version 1.0.2 (non-npm: TA2k/ioBroker.ford) in /opt/iobroker/node_modules/iobroker.ford, node: v18.17.1, js-controller: 5.0.19

ford.0 2024-05-24 22:32:58.784 info terminating

TA2k commented 3 months ago

der Fehler sagt der Prozess hat zu lange gedauert einfach nochmal den login und die localhost url kopieren

HenkKoopmans commented 3 months ago

Different error in the log

ford.0 2024-05-24 22:37:14.132 warn https://fordconnect.cv.ford.com/common/login/?make=F&application_id=AFDC085B-377A-4351-B23E-5E1D35FB3700&response_type=code&state=123&redirect_uri=https%3A%2F%2Flocalhost%3A3000&scope=access&client_id=30990062-9618-40e1-a27b-7c6bcb23658a

ford.0 2024-05-24 22:37:14.131 warn Please connect your car with the FordPass API and copy the last Url in the settings

HenkKoopmans commented 3 months ago

I repeated the process, maybe a copy issue

New log: 2024-05-24 22:42:15.425 error {"error":"invalid_client","error_description":"AADB2C90081: The specified client_secret does not match the expected value for this client. Please correct the client_secret and try again.\r\nCorrelation ID: dcef5ff9-cd9f-48e3-b351-c131509344e3\r\nTimestamp: 2024-05-24 20:42:15Z\r\n"}

ford.0 2024-05-24 22:42:15.423 error AxiosError: Request failed with status code 400

ford.0 2024-05-24 22:42:15.398 error Failed to get token. Please restart the adapter and do a new login

ford.0 2024-05-24 22:42:13.941 info Found clientID start API Login

ford.0 2024-05-24 22:42:13.850 info starting. Version 1.0.2 (non-npm: TA2k/ioBroker.ford) in /opt/iobroker/node_modules/iobroker.ford, node: v18.17.1, js-controller: 5.0.19

ford.0 2024-05-24 22:42:07.558 info Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason

HenkKoopmans commented 3 months ago

I think I found my problem. I made a mistake when copying the secret from my developers account. Do you know how to generate a new secret? According to the FAQ this must be possible via button.However I do not see a button.

HenkKoopmans commented 3 months ago

So, ich habe es geschafft, mich einzuloggen. Ich habe ein neues Konto mit einer anderen Email erstellt. Dann habe ich mich mit meiner MachE eingeloggt und sehe die gleiche ID und jetzt kenne ich auch das "Geheimnis" (die ersten Ziffern sind gleich...).

Aber... Eine Enttäuschung wir haben jetzt viel weniger interessante Daten zur Verfügung!

erwini commented 3 months ago

Ebenfalls auf 1.0.2 upgedated. Auf der developerseite angemeldet. Nur im Kreis redirekted, aber kein API-Key zu kriegen. Mit anderer Email-Adresse als der in fordpass verwendeten email auf der developerseite angemeldet. Prozedur weiterverfolgt und die ClientID und Secret eingebenen. Dann mit dem erzeugten Link wieder mit den Fordpass Zugangsdaten angemeldet und Fahrzeug dazugelinkt. Nach dem "Autorisize" Button auf localhost:3000 umgeleitet mit einer resultierenden Fehlermeldung, logischerweise. Keinen Link gesehen, den man in die das URL-Feld des Adapters eintragen könnte. Wie sollte der aussehen bzw. wo bekommt man diesen her?

TA2k commented 3 months ago

den localhost:3000 link eingeben wie es in dein Einstellung auch als Platzhalter drin ist

erwini commented 3 months ago

Was muss eingetragen werden? https://localhost:3000 oder https://localhost:3000/?state=123&code= oder https://localhost:3000/?state=123&code=... oder was sollen die 3 Punkte repräsentieren?

Bei diesen Varianten kommt dann: {"error":"invalid_request","error_description":"AADB2C90083: The request is missing required parameter: code.\r\nCorrelation ID: aacd950c-305b-48f2-bece-0ac0457aa8fa\r\nTimes

Wenn ich an der Stelle der 3 Punkte dann die Ford API Client ID eintrage, dann sieht die Antwort so aus:

Failed to get token. Please restart the adapter and do a new login
AxiosError: Request failed with status code 400
{"error":"invalid_grant","error_description":"AADB2C90090: The provided JWE is not a valid 5 segment token.\r\nCorrelation ID: 7c25dffc-d00d-4e9e-acb4-41ac0fff74cb\r\nTimestamp: 2024-...
TA2k commented 3 months ago

die komplette url

erwini commented 3 months ago

welche komplette URL ?

erwini commented 3 months ago

An welcher Stelle des Prozesses soll eine URL angezeigt werden / auftauchen? Was steht da drin? Beispiel ? Vielleicht wird die bei mir aus irgendeinem Grund nicht angezeigt?

erwini commented 3 months ago

So, jetzt hab ich das auch hinbekommen, nachdem ich eine API-Doku gefunden habe.

Auszüge: After authorizing, you will see a “This site can’t be reached” message on the next screen of the web browser. This is not an error. Copy the entire URL from this page displayed in the address line of the browser. Note: If you receive a 500-error response in the URL, clear your browser cache and re-try the account linking process.

Letztlich ist der Part nach dem "code=" der "interessante" individuelle Teil.

Und das könnte auch nach einer gewissen Zeit treffen: "Refresh tokens must be maintained every 30 days for 12 months before account linking must be performed again."

Hope it helps.

HenkKoopmans commented 2 months ago

Meine Verbindung wurde jetzt getrennt, ich nehme an, dass dies auf die oben erwähnte Erneuerung zurückzuführen ist. Folgende Fehlermeldungen:

ford.0 2024-06-08 08:52:17.027 Fehler ""

ford.0 2024-06-08 08:52:17.026 error AxiosError: Anfrage fehlgeschlagen mit Statuscode 500

ford.0 2024-06-08 08:52:17.025 error Failed to get vehicles


Ich habe versucht, den Installationsprozess neu zu starten, aber jetzt kommt die URL nicht.

Wie soll ich den "refresh process" durchführen?

Sorry für meine "inexperience" - Ich schätze sehr die Mühe die Du Dir machst um zu antworten und diese Adapter zu betreuen.

HenkKoopmans commented 2 months ago

Sorry Problem gelöst. Ford Adapter gelöscht, neu installiert von GitHub, und neu eingerichtet. Gibt am Anfang ein paar Fehlermeldungen "Zu viele Abfrage" aber mit etwas Geduld geht es.

bjoernszw commented 2 months ago

Hallo,

wo find ich den die "Connect URL to get next URL" ? Die URL after Finish hab ich bereits. Der Adapter sagt auch Login to API success. Aber dann kommt trotzdem der Fehler:

ford.0 | 37286 | 2024-06-29 09:44:32.670 | error | "" ford.0 | 37286 | 2024-06-29 09:44:32.670 | error | AxiosError: Request failed with status code 403 ford.0 | 37286 | 2024-06-29 09:44:32.669 | error | Failed to get vin

Fehlt mir noch die connect URL? Die URL after Finish , da hab ich jetzt "nur" die eine URL von dem letzten Fahrzeug drinne? Oder wie mach ich das mit mehreren Fahrzeugen?

Über ein Tipp würd ich mich freuen! Grüße

bjoernszw commented 2 months ago

Hallo,

wo find ich den die "Connect URL to get next URL" ? Die URL after Finish hab ich bereits. Der Adapter sagt auch Login to API success. Aber dann kommt trotzdem der Fehler:

ford.0 | 37286 | 2024-06-29 09:44:32.670 | error | "" ford.0 | 37286 | 2024-06-29 09:44:32.670 | error | AxiosError: Request failed with status code 403 ford.0 | 37286 | 2024-06-29 09:44:32.669 | error | Failed to get vin

Fehlt mir noch die connect URL? Die URL after Finish , da hab ich jetzt "nur" die eine URL von dem letzten Fahrzeug drinne? Oder wie mach ich das mit mehreren Fahrzeugen?

Über ein Tipp würd ich mich freuen! Grüße

ok, hab nun den Adapter gelöscht und nochmal neu angebunden dann siehts gut aus. aber wenn ich mehrere Fahrzeuge habe muss ich nun pro Fahrzeug eine eigene 'Instanz bauen?