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

Error connecting to DKB #8

Open
vosst opened this issue Jan 23, 2017 · 16 comments
Open

Error connecting to DKB #8

vosst opened this issue Jan 23, 2017 · 16 comments

Comments

@vosst
Copy link

vosst commented Jan 23, 2017

When trying to connect to DKB with the code in this gist, the following error is reported:

panic: Error while fetching accounts: Institute returned errors:
MessageAcknowledgement for message 1 (0): Code: 9010, Position: none, Text: 'Nachricht ungueltig.', Parameters: "Validierung fehlgeschlagen."

@mitch000001
Copy link
Owner

Hey, sorry for coming back to you just know. I also experienced this error when speaking with a Sparkasse. I haven't figured out yet why some institutes work be others don't.

@CoreTex
Copy link

CoreTex commented Jan 1, 2018

Hey guys, I have the same issue and like to help to fix this. I'm also a customer of Sparkasse.

@mitch000001
Copy link
Owner

mitch000001 commented Jan 2, 2018

Hey, thanks for joining forces on that issue. My observation so far is that when doing a request to a problematic bank institute it already fails at the first request, i.e. the dialog initialization.
It could be that it is a problem with encoding. The spec says it has to be ISO 8859_1. I guess I convert the data somewhere from byte slices to strings and they get UTF8 encoding there.

@mitch000001
Copy link
Owner

mitch000001 commented Jan 2, 2018

The message acknowledgement for these messages:
Code: 9010, Position: none, Text: 'Nachricht ungueltig.', Parameters: "Validierung fehlgeschlagen."
Could also be a malformed signature/encryption, but strange enough it works for other institutes just fine. In my case it is possible to communicate to the bank using HBCI 2.2.0 without problems. But when switching to FINTS 3.0.0 it breaks.

@mitch000001
Copy link
Owner

Seems like I found the problem and fixed it. Please try it out with this release: https://github.com/mitch000001/go-hbci/releases/tag/0.1.0

@CoreTex
Copy link

CoreTex commented Jan 3, 2018

Hey @mitch000001,

thanks now I can get the names of the bank accounts. Unfortunately we now have some following errors:

MessageAcknowledgement for message 1 (535286721777=176863099751BRJ4=): Code: 3060, Position: none, Text: 'Bitte beachten Sie die enthaltenen Warnungen/Hinweise.'
SegmentAcknowledgement for message 0 (), segment 4: Code: 3050, Position: none, Text: 'UPD nicht mehr aktuell, aktuelle Version enthalten.'
SegmentAcknowledgement for message 0 (), segment 4: Code: 3050, Position: none, Text: 'BPD nicht mehr aktuell, aktuelle Version enthalten.'

Looks like the version 0.1.0 differs in the specs from the current implementation

@mitch000001
Copy link
Owner

Hey @CoreTex,
These warnings are expected. If you initially communicate with a bank you don't have any UPD or BPD, so they got sent by the institute so the client can use it. They are stored within dialog, though not persisted, which means, when you make additional calls with the same client, you won't get these errors again, but if you create a new client the warning will come again.

@mitch000001
Copy link
Owner

That said, Acknowledgements with codes between 3000 and 3999 are considered warnings and do not necessarily lead to an error.

@mitch000001
Copy link
Owner

@vosst can you confirm that the error is gone?

@CoreTex
Copy link

CoreTex commented Jan 7, 2018

@mitch000001 it works only partially. I can access the name of the bank account and some details. If I want to get the account balance I get this error:

go-hbci: 2018/01/07 14:01:20 Supported securityFunctions: ["921"]
Institute returned errors:
MessageAcknowledgement for message 2 (214114170456=164082533851BRJ4=): Code: 9050, Position: none, Text: 'Die Nachricht enthält Fehler.'
SegmentAcknowledgement for message 0 (), segment 3: Code: 9010, Position: none, Text: 'Auftragsart wird laut BPD nicht unterstützt.'

@mitch000001
Copy link
Owner

@CoreTex I also got this kind of error messages. What it basically tells is that we're making a request with a specific version of a segment which is not supported (anymore?). To fix that a complete overhaul of the way the segments are chosen for a given request is necessary. ATM the segment fetching is somewhat static, which means it can work with an institute when it supports the used segment version.
I haven't found the time to start with that. Also, it will be necessary to parse all so called Bankparameterdaten to see which version of a segment is supported. Also, at some point we have to implement even more versions of some segments to allow proper communication.

@maufl
Copy link

maufl commented Jan 19, 2018

I have the same problem with Sparkasse. The allowed requests are returned with the accounts, so segments should probably chosen based on account? I'm not very deep into FinTS or this code base, so I have unfortunately no idea how to fix that.

@maufl
Copy link

maufl commented Jan 19, 2018

Hm, but as far as I understand, requesting the balance is an HKSAL element, which is supported by my account according to my bank.

@mitch000001
Copy link
Owner

@maufl probably it does not support the version this project has implemented.

@mitch000001
Copy link
Owner

@vosst @CoreTex @maufl I refactored the library so the BankParameter Data is used and we send the right versions. Can you verify the new build: v0.1.4-beta1 ?

@maufl
Copy link

maufl commented Mar 26, 2018

Looks better. I only tested it for fetching balances but that seems to work. It returns the correct balance for my Girokonto and my Tagesgeldkonto, tough not for my credit card. But this is a problem that I encountered with other FinTS software too, so I guess that is not a bug but a limitation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants