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

FinTS dialog with Berliner Sparkasse aborts due to invalid dialog ID #165

Open
cjolowicz opened this issue May 20, 2024 · 3 comments
Open

Comments

@cjolowicz
Copy link

cjolowicz commented May 20, 2024

Describe the bug
Minimal bootstrap fails with Sparkasse.

The FinTS dialog with Sparkasse aborts when fetching the tan medium (client.get_tan_media) with error 9010 - Die angegebene Bankreferenz/Dialog-ID ist nicht gültig.

*Bank I tested this with
Name of the bank: Berliner Sparkasse
FinTS URL: https://banking-be3.s-fints-pt-be.de/fints30

Expected behavior
Minimal bootstrap succeeds.

I've successfully used this for a couple of years and I've passed a valid product ID. Last successful use was on April 27, 2024. First failure was on May 20, 2024.

Code required to reproduce
The code from quickstart.rst up to minimal bootstrap (minimal_interactive_cli_bootstrap).

Log output / error message

ERROR:fints.client:Dialog response: 9050 - Die Nachricht enthält Fehler.
ERROR:fints.client:Dialog response: 9800 - Dialog abgebrochen
ERROR:fints.client:Dialog response: 9010 - Die angegebene Bankreferenz/Dialog-ID ist nicht gültig.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../raphaelm/python-fints/fints/utils.py", line 301, in minimal_interactive_cli_bootstrap
    m = client.get_tan_media()
        ^^^^^^^^^^^^^^^^^^^^^^
  File ".../raphaelm/python-fints/fints/client.py", line 1425, in get_tan_media
    response = method(dialog)(seg)
               ^^^^^^^^^^^^^^^^^^^
  File ".../raphaelm/python-fints/fints/dialog.py", line 156, in send
    self.client.process_response_message(self, response, internal_send=internal_send)
  File ".../raphaelm/python-fints/fints/client.py", line 230, in process_response_message
    self._process_response(dialog, None, response)
  File ".../raphaelm/python-fints/fints/client.py", line 1341, in _process_response
    raise FinTSClientError("Error during dialog initialization, could not fetch BPD. Please check that you "
fints.exceptions.FinTSClientError: Error during dialog initialization, could not fetch BPD. Please check that you passed the correct bank identifier to the HBCI URL of the correct bank.

Additional context
Python 3.11 macOS
python-fints 4.1.0

With earlier versions (4.0.0 and 3.1.0) I get this error instead (which I think was fixed in 4.1.0):
Traceback (most recent call last):
  File ".../raphaelm/python-fints/minimal.py", line 15, in <module>
    minimal_interactive_cli_bootstrap(f)
  File ".../raphaelm/python-fints/fints/utils.py", line 319, in minimal_interactive_cli_bootstrap
    if client.is_tan_media_required() and not client.selected_tan_medium:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../raphaelm/python-fints/fints/client.py", line 1180, in is_tan_media_required
    tan_mechanism = self.get_tan_mechanisms()[self.get_current_tan_mechanism()]
                    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '999'

My last successful use of this library was with a version before 4, likely 3.1.0.

@cjolowicz cjolowicz changed the title FinTS connection to Berliner Sparkasse fails due to invalid dialog ID FinTS dialog with Berliner Sparkasse aborts due to invalid dialog ID May 20, 2024
@ntf1974
Copy link

ntf1974 commented Jun 9, 2024

Hello,

same behaviour on fetching Transactions from Sparkasse Pforzheim-Calw (BLZ: 66650085 / Endpoint: https://banking-bw3.s-fints-pt-bw.de/fints30) using fints Library Version 4.1.0.

Fetching failed immediately after changing TAN-Mechanism from QR to PushTAN App (=TAN-Method 923).

Troubleshooting Script shows following error:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
File "/srv/its/bank/stmt.request/test/troubleshoot.py", line 21, in
minimal_interactive_cli_bootstrap(f)
File "/srv/its/bank/stmt.request/venv/lib/python3.11/site-packages/fints/utils.py", line 301, in minimal_interactive_cli_bootstrap
m = client.get_tan_media()
^^^^^^^^^^^^^^^^^^^^^^
File "/srv/its/bank/stmt.request/venv/lib/python3.11/site-packages/fints/client.py", line 1425, in get_tan_media
response = method(dialog)(seg)
^^^^^^^^^^^^^^^^^^^
File "/srv/its/bank/stmt.request/venv/lib/python3.11/site-packages/fints/dialog.py", line 156, in send
self.client.process_response_message(self, response, internal_send=internal_send)
File "/srv/its/bank/stmt.request/venv/lib/python3.11/site-packages/fints/client.py", line 230, in process_response_message
self._process_response(dialog, None, response)
File "/srv/its/bank/stmt.request/venv/lib/python3.11/site-packages/fints/client.py", line 1341, in _process_response
raise FinTSClientError("Error during dialog initialization, could not fetch BPD. Please check that you "
fints

Contents of the OrderedDict in Function client.get_tan_mechanisms:
OrderedDict([('923', fints.formals.TwoStepParameters7(security_function='923', tan_process='2', tech_id='pushTAN-cas', zka_id='Decoupled', zka_version=None, name='pushTAN 2.0', max_length_input=None, allowed_format=None, text_return_value='Aufforderung', max_length_return_value=2048, multiple_tans_allowed=True, tan_time_dialog_association=fints.formals.TANTimeDialogAssociation.ALLOWED, cancel_allowed=False, sms_charge_account_required=fints.formals.SMSChargeAccountRequired.MUST_NOT, principal_account_required=fints.formals.PrincipalAccountRequired.MUST_NOT, challenge_class_required=False, challenge_structured=False, initialization_mode=fints.formals.InitializationMode.CLEARTEXT_PIN_NO_TAN, description_required=fints.formals.DescriptionRequired.MUST, response_hhd_uc_required=False, supported_media_number=5, decoupled_max_poll_number=180, wait_before_first_poll=1, wait_before_next_poll=1, manual_confirmation_allowed=True, automated_polling_allowed=True))])

Switching back TAN-Mechanism to QR will fix the error. Troubleshooting Script then works fine.

Also found similar notices in AqBanking Forum.

Sorry @raphaelm - i am not able to solve this by myself at the moment. The process is still too complex for me to understand.

Chris

@cjolowicz
Copy link
Author

There's also #121 which may be related. It's the same error message, but with DKB.

@webffo
Copy link

webffo commented Aug 7, 2024

Hello,
I'm having the same issue with Sparkasse Schwaben-Bodensee since today on BLZ 73150000 and URL https://banking-by5.s-fints-pt-by.de/fints30.

Any idea how this could be fixed?

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

3 participants