iamtorsten / libfintx

Moved to https://github.com/libfintx/libfintx - please use the new repository!
https://github.com/libfintx/libfintx
GNU Lesser General Public License v3.0
115 stars 40 forks source link

Fehler beim Synchronisieren mit ING #113

Closed freddy6218 closed 1 year ago

freddy6218 commented 1 year ago

Bekomme seit je her folgenden Fehler beim Verwenden der ING

Invalid segment. Expected segment begin. Message is: HIRMG:2:2:+3060...

LOG

Log.txt

TRACE

Trace.txt

iamtorsten commented 1 year ago

@freddy6218 can you please retest.

freddy6218 commented 1 year ago

Produces the same Error

ArgumentException: Invalid segment. Expected segment begin. Message is: HIRMG:2:2:+3060...

 at libfintx.FinTS.Helper.ProcessSegmentBegin(String message, StringBuilder currentSegment) in C:\Users\fredd\Meine Ablage\C#\libFintx\src\libfintx.FinTS\Helper\Helper_Segment.cs:line 41
   at libfintx.FinTS.Helper.SplitSegments(String message) in C:\Users\fredd\Meine Ablage\C#\libFintx\src\libfintx.FinTS\Helper\Helper_Segment.cs:line 142
   at libfintx.FinTS.Helper.DecryptSegments(List`1 encryptedSegments) in C:\Users\fredd\Meine Ablage\C#\libFintx\src\libfintx.FinTS\Helper\Helper_Segment.cs:line 231
   at libfintx.FinTS.Helper.SplitEncryptedSegments(String message) in C:\Users\fredd\Meine Ablage\C#\libFintx\src\libfintx.FinTS\Helper\Helper_Segment.cs:line 244
   at libfintx.FinTS.Helper.Parse_Segments(FinTsClient client, String Message) in C:\Users\fredd\Meine Ablage\C#\libFintx\src\libfintx.FinTS\Helper\Helper.cs:line 166

Trace

Trace.txt

leo-schick commented 1 year ago

Hi @iamtorsten could you take a look at PR #115 ? I think I found the bug which created the error Expected segment begin here.

The added unit test for this still fails because you added a test on segment HITAN = "900", but ING seems to use HITANS, not HITAN. The implementation for this seems to be missing somewhere around here.

Is thant enough for you to continue on this issue?

leo-schick commented 1 year ago

@iamtorsten I do not get actually the idea why you used Helper.Parse_Message instead of Helper.Parse_Segments. It looks to me that Helper.Parse_Segments would support segment HITANS, but ..Parse_Message does not.

Link to your added test: https://github.com/iamtorsten/libfintx/commit/dd6cd461a6ebb20b35654223abf161167e36de1a