Bug 419463 - OFX importer fails on OFX spec 2.2 files (XML)
Summary: OFX importer fails on OFX spec 2.2 files (XML)
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.0.8
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-31 19:23 UTC by glyphimor
Modified: 2020-04-08 18:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description glyphimor 2020-03-31 19:23:14 UTC
SUMMARY

The OFX importer can't process .ofx files compliant w/ version 2.2 of the OFX specification. These use XML, not SGML.

STEPS TO REPRODUCE

1. File -> Import -> OFX...
2. Select new .ofx file and attempt to import

OBSERVED RESULT

"Incorrect format

Unable to import file:///path/to/file.ofx using the OFX importer plugin. This file is not the correct format."


EXPECTED RESULT

Import wizard runs normally

SOFTWARE/OS VERSIONS

KDE Plasma Version: 
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION

Just found that American Express is exporting data compliant w/ this newer version of the OFX spec. AmeEx's old SGML format was:

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0<SEVERITY>INFO<MESSAGE>Login successful</STATUS><DTSERVER>
...
</CREDITCARDMSGSRSV1></OFX>

--

Their new XML format is:

<?xml version="1.0" standalone="no"?>
<?OFX OFXHEADER="200" VERSION="202" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
<OFX xmlns:ns2="http://ofx.net/types/2003/04">
<SIGNONMSGSRSV1><SONRS><STATUS><CODE>0</CODE><SEVERITY><INFO></SEVERITY><MESSAGE>Login Successful!</MESSAGE></STATUS><DTSERVER>
...
</CREDITCARDMSGSRSV1></OFX>

The actual transactions look the same: tags for STMTTRN, TRNTYPE, DTPOSTED, TRNAMT, FITID, REFNUM, NAME. Although I don't see any MEMO tags.
Comment 1 Jack 2020-03-31 20:42:09 UTC
I don't know if it will work or not, but have you tried 103 instead of 102 as the header version in the OFX importer settings?  It's set when you map the account, but can be changed in the Online Settings tab of the Edit Account dialog, OFX Details subtab.
Comment 2 glyphimor 2020-04-01 01:55:59 UTC
(In reply to Jack from comment #1)
> I don't know if it will work or not, but have you tried 103 instead of 102
> as the header version in the OFX importer settings?  It's set when you map
> the account, but can be changed in the Online Settings tab of the Edit
> Account dialog, OFX Details subtab.

Interesting. I don't have those settings. I see from the [handbook](https://docs.kde.org/stable5/en/extragear-office/kmymoney//details.accounts.edit.html) that they apply to online OFX connections, when the KMyMoney account's been mapped to an online account.

Maybe someone who has that working can comment.
Comment 3 Jack 2020-04-08 18:40:56 UTC
OK, you are importing a previously downloaded file, and not mapping the account online and then updating the account. I seem to recall that there are some OFX related settings which can only be set in the online settings.  That may or may not be relevant here.

However, I just did an online update of my only American Express Credit Card account, and the downloaded OFX looks like what you call the old style.  I don't have any recent transactions with that account, which may be why I don't see any way to download an OFX file, so I can't see if that would be different.