Open korneliuscode opened 2 years ago
There is an error in the message creation. In line 705 and 726 in FinTsMessage.cs a StringBuilder is reused which results in a faulty message.
But even if I fix that I'm running into other issues later when trying the get the account balance.
I see the same issue with the latest version. But probably there is also something else:
Until some days I used an much older version, I think it was from april 21, without any problems...
Since beginning of 2022 I think DKB changed something and I got error message (with older version) like:
Initialisation failed: 9050: Die Nachricht enthält Fehler., 3905: Es wurde keine Challenge erzeugt., 9800: Dialog abgebrochen, 3920: Zugelassene Zwei-Schritt-Verfahren für den Benutzer.:921, 9955: Auftrag nicht ausgeführt - Die Gerätebezeichnung ist unbekannt. (MBV07390100255)
@leschbenedikt Is this something you see after your fix?
Anyone else available to look into the DKB issue? I'll try to have a more detailed look within the next days at least to reproduce the old error message, but I am not really familiar with this bank communication stuff...
Ich habe versucht die Library upzudaten. Scheinbar ist mir hier ein Fehler unterlaufen. Die Bibliothek benötigt jedoch ein komplettes Redesign/Refactoring.
@party-pansen I just checked my local code, the only othes changes I found were in HKKAZ.cs But the change is only related to transaction retrieval. I'm not sure what use case your are talking about.
But anyway this are the changes:
At first I added the segment Id to the call in line 147
segments = HKTAN.Init_HKTAN(client, segments, "HKKAZ");
In addition I replace every client.HICAZS
with client.HIKAZS
like in the commented rows below.
But if I remenber it correctly this resolved problems with one bank but had issues with other banks.
Maybe you try the first change at first and only try the second one if it's still not working.
Ok, I had some time to analyse:
There is a major bug in the new implementation as you already pointed out:
In line 705 and 726 in FinTsMessage.cs the following line needs to be added:
sb = new StringBuilder();
After that I get back to my original error message regarding "9955: Auftrag nicht ausgeführt - Die Gerätebezeichnung ist unbekannt."
After some research I found the following article: https://medium.com/@subsembly/leitfaden-deutsche-kreditbank-dkb-bbd2d23fb6b9
So there was indeed an issue with my TAN devices which I could solve online @ DKB by removing a second, old pushTan device...
Back to the program, it still did not work. I needed to provide a pushtan, but the generated HKTAN message has failures: HIRMG:3:2+9050::Die Nachricht enthält Fehler.+9800::Dialog abgebrochen+9000::Konvertierung in das/aus dem Format des Verarbeitungssystems fehlgeschlagen.'
Luckily I had an old trace which gave me a hint on the bug. It's simple: Just uncomment line 151 from Tan.cs That's again a bug when switching to sb.Append from old string concatenation
With that I am now able to get a correct answer from DKB. Unfortunately my accounts are not accessible as before switching to latest version. I need to analyze this...
Currently I have not yet github correctly setup to simply push the bugfixes, but I think these are extreme simple for you to incorporate @thisistorsten
I'll probably open up a new issue for the other bugs when anlzying them in the next days...
For me DKB is working again, besides the obvious bugfixes I already explained above, I needed to hack HKKAZ. I only did it for the relevant section for my bank and switched it back to some old HKKAZ string. I wonder what these changes in HKKAZ were all about?`It looked very different. Please review this in Branch bugfixes_dkb Regards party-pansen
Can someone please retest?
the initial error is gone, but retrieving transactions via HKKAZ is not working for DKB. You did not honor my change to HKKAZ. At least for DKB this must be changed back to the old message...
@party-pansen please recommend your changes here.
Please compare with my pushed branch bugfixing_pp. Since the segment now looks very different someone with some insight should have a look at it...
Within the same branch I also added 2 additional fixes for consorsbank, one regarding the consorsbank message format (6241d4e8b3f89f39396599b940b2a3e8608a0ee1) and the other also regarding the HKKAZ (8890b679415c245c2a6d74e84e2e0d278eb65489) Please have a look
Is DKB working for you again? I also deleted my second pushTAN device, but still no luck on Master and also not on bugfixing_pp.
@korneliuscode @party-pansen please retest with this PR. https://github.com/iamtorsten/libfintx/commit/0810e8fdbd3a942bc2899f3d0a18a94480d15cbb
Sorry for the late reply. I was just trying but unfortunately it is not working for me still. I'm testing on the current version of master.
Code: 3060 | Typ: Warning | Nachricht: Bitte beachten Sie die enthaltenen Warnungen/Hinweise.
Code: 0020 | Typ: Success | Nachricht: Auftrag ausgeführt.
Code: 3050 | Typ: Warning | Nachricht: BPD nicht mehr aktuell, aktuelle Version enthalten.
Code: 3920 | Typ: Warning | Nachricht: Zugelassene Zwei-Schritt-Verfahren für den Benutzer.:xxx
Code: 0020 | Typ: Success | Nachricht: Der Auftrag wurde ausgeführt.
Code: 9050 | Typ: Error | Nachricht: Die Nachricht enthält Fehler.
Code: 9800 | Typ: Error | Nachricht: Dialog abgebrochen
Code: 9000 | Typ: Error | Nachricht: Konvertierung in das/aus dem Format des Verarbeitungssystems fehlgeschlagen.
Code: 9110 | Typ: Error | Nachricht: Ungültige Auftragsnachricht: Unbekannter Aufbau.
I tested it again with the current master. It still does not work with DKB. The old version of the library works, but the results are somewhat malformed. Is there anything I can do to support?
Hi @korneliuscode ,
I think I had the same issue with DKB as you with. After running through code, I realized that I just typed in the IBAN and not the account number (Kontonummer
) in the UI interface. Since DKB uses HKKAZ version 5, it still relyes on the account number and there seems to be no logic to extract the account number from the IBAN by default.
After entering the Kontonummer
, all worked fine for me.
See as well HKKAZ.cs
.
Kontonummer
Code: 3060 | Typ: Warning | Nachricht: Bitte beachten Sie die enthaltenen Warnungen/Hinweise.
Code: 0020 | Typ: Success | Nachricht: Auftrag ausgeführt.
Code: 3050 | Typ: Warning | Nachricht: BPD nicht mehr aktuell, aktuelle Version enthalten.
Code: 3920 | Typ: Warning | Nachricht: Zugelassene Zwei-Schritt-Verfahren für den Benutzer.:921
Code: 0020 | Typ: Success | Nachricht: Der Auftrag wurde ausgeführt.
Code: 9050 | Typ: Error | Nachricht: Die Nachricht enthält Fehler.
Code: 9110 | Typ: Error | Nachricht: Ungültige Auftragsnachricht: Unbekannter Aufbau.
Code: 9160 | Typ: Error | Nachricht: Pflichtfeld nicht gefunden
Code: 9010 | Typ: Error | Nachricht: Segment wegen anderer Fehler wirkungslos
Kontonummer
Code: 3060 | Typ: Warning | Nachricht: Bitte beachten Sie die enthaltenen Warnungen/Hinweise.
Code: 0020 | Typ: Success | Nachricht: Auftrag ausgeführt.
Code: 3050 | Typ: Warning | Nachricht: BPD nicht mehr aktuell, aktuelle Version enthalten.
Code: 3920 | Typ: Warning | Nachricht: Zugelassene Zwei-Schritt-Verfahren für den Benutzer.:921
Code: 0020 | Typ: Success | Nachricht: Der Auftrag wurde ausgeführt.
Code: 3060 | Typ: Warning | Nachricht: Bitte beachten Sie die enthaltenen Warnungen/Hinweise.
Code: 0020 | Typ: Success | Nachricht: Der Auftrag wurde ausgeführt.
Code: 0020 | Typ: Success | Nachricht: Die Umsätze wurden übermittelt.
Code: 3076 | Typ: Warning | Nachricht: Starke Kundenauthentifizierung nicht notwendig.
Datum: 01.11.2023 00:00:00 | Buchungsschlüssel: NDDT | GV-Code: 105 | Empfänger / Auftraggeber: ******* | Verwendungszweck: ************* | Betrag: -81,82
[ and more transactions ... ]
I would suggest to implement a test that required fields must be given before a message is send to the bank server.
I get an error with DKB on the most current version. Right with synchronization:
This is the trace of the sent message.
Does anyone have an idea what this could be?