firefly-iii-fints-importer icon indicating copy to clipboard operation
firefly-iii-fints-importer copied to clipboard

Sparkasse import stopped working

Open Athesis opened this issue 10 months ago • 2 comments

Unfortunally my connection to Sparkasse stopped working. I would appreciate to get some help. The error is:


Warning: Undefined array key 921 in /var/www/html/firefly-iii-fints-importer/app/FinTsFactory.php on line 60

Fatal error: Uncaught Error: Call to a member function needsTanMedium() on null in /var/www/html/firefly-iii-fints-importer/app/FinTsFactory.php:32 Stack trace: #0 /var/www/html/firefly-iii-fints-importer/app/Choose2FADevice.php(25): App\FinTsFactory::create_from_session() #1 /var/www/html/firefly-iii-fints-importer/app/index.php(55): App\StepFunction\Choose2FADevice() #2 {main} thrown in /var/www/html/firefly-iii-fints-importer/app/FinTsFactory.php on line 32

...I guess Sparkasse changed something (again), but they won't help anymore. Maybe here someone can help? I'm more than happy to get into debugging stuff.

My configuration:

{
  "bank_username": "A",
  "bank_password": "",
  "bank_code": "56050180",
  "bank_url": "https://banking-rp3.s-fints-pt-rp.de/fints30",
  "bank_2fa": "921",
  "firefly_url": "http://127.0.0.1",
  "firefly_access_token": "key",
  "skip_transaction_review": "false",
  "__description_regex_comment__": "To disable the regex search & replace of the transaction description, set both to an empty string.",
  "description_regex_match": "",
  "description_regex_replace": ""
}

what's safed in $tanModes might be interesting as well:

    [923] => Fhp\Segment\TAN\VerfahrensparameterZweiSchrittVerfahrenV7 Object
        (
            [sicherheitsfunktion] => 923
            [tanProzess] => 2
            [technischeIdentifikationTanVerfahren] => pushTAN-cas
            [dkTanVerfahren] => Decoupled
            [versionDkTanVerfahren] => 
            [nameDesZweiSchrittVerfahrens] => pushTAN 2.0
            [maximaleLaengeDesTanEingabewertes] => 
            [erlaubtesFormat] => 
            [textZurBelegungDesRueckgabewertes] => Aufforderung
            [maximaleLaengeDesRueckgabewertes] => 2048
            [mehrfachTanErlaubt] => 1
            [tanZeitUndDialogbezug] => 2
            [auftragsstornoErlaubt] => 
            [smsAbbuchungskontoErforderlich] => 0
            [auftraggeberkontoErforderlich] => 0
            [challengeKlasseErforderlich] => 
            [challengeStrukturiert] => 
            [initialisierungsmodus] => 00
            [bezeichnungDesTanMediumsErforderlich] => 2
            [antwortHhdUcErforderlich] => 
            [anzahlUnterstuetzterAktiverTanMedien] => 5
            [maximaleAnzahlStatusabfragen] => 180
            [wartezeitVorErsterStatusabfrage] => 1
            [wartezeitVorNaechsterStatusabfrage] => 1
            [manuelleBestaetigungMoeglich] => 1
            [automatisierteStatusabfragenErlaubt] => 1
        )

Thanks a lot for your help!

Athesis avatar Apr 09 '24 18:04 Athesis

... just putting in "bank_2fa": "923" seems to work, but I guess it breaks as soon a pushTAN is actually requested.

Athesis avatar Apr 09 '24 18:04 Athesis

Did you manage to get it back to work? Changed 2fa to 923 and Fatal error: Uncaught Fhp\Protocol\ServerException: FinTS errors: 9050 (global): Die Nachricht enthält Fehler. 9800 (global): Dialog abgebrochen 9120 (global): Die Nachricht hat nicht die erwartete Nachrichtennummer. is the new error.

ffidan61 avatar Apr 21 '24 14:04 ffidan61

Die Nachricht hat nicht die erwartete Nachrichtennummer

Please be careful as to not accidentally submit forms twice. This can happen e.g. when you use the back button of your browser or submit a form right before it is auto-submitted.

Please reopen if you think there is anything that I can help you with.

bnw avatar Jul 21 '24 15:07 bnw

Hi @bnw it worked for a while after I added a iphone device to my pushtan devices(I think I updated the Sparkasse PushTan App befor it stopped working). But since 2-3 days I get a Fatal error: Uncaught Fhp\Protocol\ServerException: FinTS errors: 9050 (global): Die Nachricht enthält Fehler. 9800 (global): Dialog abgebrochen 9120 (global): Die Nachricht hat nicht die erwartete Nachrichtennummer Error Any idea how to fix this?

ffidan61 avatar Aug 01 '24 15:08 ffidan61

Hi everybody, I'm running into related issues. So far I have experienced the following bugs:

  • During manual input in the web ui, the importer does not work at all because the required 2fa method "923 pushTAN-Decoupled" is not available from the dropdown menu and thus the connection gets aborted by the server because you currently can only request an unsupported 2fa method in this way.
  • During import with a configuration file, you can define 2fa method 923 regardless and it works to a degree, that is until a 2fa is actually requested (for me it happened when requesting transaction statements for multiple months, for example). When the server requested the 2fa I was even able to clear it in the app, but the web ui then requests a TAN which is not supplied by this 2fa method. At this point you can either leave the mandatory TAN field empty and remain stuck or produce an error by entering a random number.

According to what very little info you can find on the web this seems to potentially affect all Sparkassen bank accounts. Here's the most concise info I could find (German): Sparkassen: pushTAN ohne TAN-Eingabe

wave864 avatar Aug 05 '24 15:08 wave864

I now also encounter this problem with my Sparkasse-Import. My pushTan-App presents the possibility to mark the device (the importer) as trustworthy. When I confirm this, the importer still asks for a TAN to be entered. This is however not shown in the app. Then the case described in the second point applies.

but the web ui then requests a TAN which is not supplied by this 2fa method. At this point you can either leave the mandatory TAN field empty and remain stuck or produce an error by entering a random number.

Entering a random number or removing the required field in the html leads to the following exception:

 Fatal error: Uncaught InvalidArgumentException: Cannot submit TAN for a decoupled TAN mode in /vendor/nemiah/php-fints/lib/Fhp/FinTs.php:372 Stack trace: #0 /app/TanHandler.php(39): Fhp\FinTs->submitTan(Object(Fhp\Protocol\DialogInitialization), '') #1 /app/TanHandler.php(31): App\TanHandler->create_or_continue_action() #2 /app/Login.php(21): App\TanHandler->__construct(Object(Closure), 'login-action', Object(Symfony\Component\HttpFoundation\Session\Session), Object(Twig\Environment), Object(Fhp\FinTs), Object(App\Step), Object(Symfony\Component\HttpFoundation\Request)) #3 /app/index.php(59): App\StepFunction\Login() #4 {main} thrown in /vendor/nemiah/php-fints/lib/Fhp/FinTs.php on line 372

From the error message, I think the importer has to be adapted?

JuliusFreudenberger avatar Sep 01 '24 13:09 JuliusFreudenberger