Bug 280416 - kmymoney uses wrong client ID when communicating with bank for account mapping
Summary: kmymoney uses wrong client ID when communicating with bank for account mapping
Status: RESOLVED UPSTREAM
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 12:32 UTC by Troy Carpenter
Modified: 2012-01-28 09:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Troy Carpenter 2011-08-19 12:32:18 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

This is with Clay's 4.6.0 ppa version.

When trying to map an account to an online account, I got a generic error, something line 2000.

Trying to add a recent American Express card, and I got a similar 
error, only this time it was a bit more helpful.  It said that the client 
version was not supported.  This in spite of the fact that I specifcally 
picked Quicken 2011 as the client ID and 103 as the header version.

The exact error from American Express is:

ERROR #2000 General error: "Error other than those specified by the remaining 
error codes. (Note: Servers should provide a more specific error whenever 
possible. Error code 2000 should be reserved for cases in which a more specific 
code is not available.)"
Server message: [ofx.unsupportedClientApplication]Client application or 
version is not supported by this server.[ref: 20110817021706.765]


Reproducible: Always

Steps to Reproduce:
Go to an account and select "map to an online account".  Select kmymoney OFX.  Find the institution information, select "Quicken 2011" and 103 as the header.  Then click the "next" button to try to download account information from the financial institution.

Actual Results:  
From an attempt with American Express:

ERROR #2000 General error: "Error other than those specified by the remaining 
error codes. (Note: Servers should provide a more specific error whenever 
possible. Error code 2000 should be reserved for cases in which a more specific 
code is not available.)"
Server message: [ofx.unsupportedClientApplication]Client application or 
version is not supported by this server.[ref: 20110817021706.765]

Expected Results:  
The Client ID would be correct and kMyMoney receives the account information for mapping.

This obviously happens with institutions only support recent Quicken versions.  If the bank still accepts the other Quicken versions, this probably doesn't happen.

Note that other accounts were previously mapped still work using the newest Quicken version when using the "update" command, so I know it can send the correct client ID, just not on the initial setup.
Comment 1 Cristian Oneț 2011-08-21 20:07:06 UTC
I've tried to reproduce this and I do in fact get the errors you described with American Express but it's not because KMyMoney does not send the correct application version.

This is the request when I've selected Quicken Windows 2011 as the application identifier:


OFX request: OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20110821225721.000

<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20110821225721.000
<USERID>a
<USERPASS>a
<LANGUAGE>ENG
<FI>
<ORG>AMEX
<FID>3101
</FI>
<APPID>QWIN
<APPVER>2000
</SONRQ>
</SIGNONMSGSRQV1>
<SIGNUPMSGSRQV1>
<ACCTINFOTRNRQ>
<TRNUID>20110821225721.000
<CLTCOOKIE>1
<ACCTINFORQ>
<DTACCTUP>19700101
</ACCTINFORQ>
</ACCTINFOTRNRQ>
</SIGNUPMSGSRQV1>
</OFX>

As you can see '<APPID>QWIN' and '<APPVER>2000' are both correct so it seems like the server dos not really support that application version or the application ids we have are not correct.
Comment 2 Troy Carpenter 2011-08-22 12:24:47 UTC
Interesting.   I have another American Express account that was set up a long time ago and it has no problem downloading transactions.  My other existing online bank accounts also don't have any issue downloading as long as I am using one of the latest Quicken versions, but I did have a similar error message when trying to map an additional account at the bank.
Comment 3 Cristian Oneț 2011-08-23 08:39:48 UTC
Although the error is thrown the bank still uses the credential to perform the authentication because it throws a second error that the username or password are invalid. So I guess this is an error on the server side because, as I've shown above, KMyMoney does send the correct version. If indeed QWIN:2000 stands for Quicken Windows 2011.

Can I close this then as invalid?
Comment 4 Troy Carpenter 2011-08-23 13:51:37 UTC
Are you saying your bank throws a second error because of invalid username/password, or there is a second error that is not being reported to me when I try it?  Are you sure you are using the correct username and password when you do this test, or are you just making one up to see what happens?  This happens when I try to map an account using two separate financial institutions.

The end result so far is that I cannot map any new accounts with kmymoney 4.6.0.  If I'm the only one experiencing it, then I would chalk it up to something wrong on my side and say this is invalid.  However, I'm not convinced since you seem to be able to reproduce it to some extent.

If there is any way to turn on better debugging or provide you with server communication transcripts, let me know.  I can also try setting up kmymoney in a VM with an older version to see if this didn't work in an older version (I haven't had to map to an online account for some time).
Comment 5 Cristian Oneț 2011-08-23 13:57:19 UTC
I've just used a/a as usr/pwd since I don't have an OFX account. The server said that they are invalid so I guess that the are processed. The usr/pwd invalid error comes after the unsupported client version error.
Comment 6 Troy Carpenter 2011-08-23 14:00:40 UTC
Would I expect to see that error message as well?  The behavior I see right now is that I get the error #2000 message, then kmm tells me there are no accounts to process after I dismiss the error message.
Comment 7 Cristian Oneț 2011-08-23 14:05:09 UTC
I guess so if you would enter an invalid user/pwd combination.
Comment 8 Jack 2011-08-23 14:31:58 UTC
I just tried mapping several different accounts at different institutions, and failed on all of them, with a variety of errors, some being the same pair of #2000 followed by invalid name or password.  I've got requests in to at least two of my banks to ask what the correct incantation is.  However, I don't think I have ever mapped these, so I can't say that they used to work.
Comment 9 Thomas Baumgart 2011-08-23 19:57:34 UTC
Troy, you can turn on tracing by creating an empty file called ofxlog.txt in your $HOME directory. The command 'touch ~/ofxlog.txt' usually does the trick. Beware, that this file contains your user credentials.
Comment 10 Troy Carpenter 2011-08-23 22:05:15 UTC
url: https://www99.americanexpress.com/myca/ofxdl/us/download?request_type=nl_desktopdownload
request:
OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20110823175544.000

<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20110823175544.000
<USERID>amexuserid
<USERPASS>mypassword
<LANGUAGE>ENG
<FI>
<ORG>AMEX
<FID>3101
</FI>
<APPID>QWIN
<APPVER>2000
</SONRQ>
</SIGNONMSGSRQV1>
<SIGNUPMSGSRQV1>
<ACCTINFOTRNRQ>
<TRNUID>20110823175544.000
<CLTCOOKIE>1
<ACCTINFORQ>
<DTACCTUP>19691231
</ACCTINFORQ>
</ACCTINFOTRNRQ>
</SIGNUPMSGSRQV1>
</OFX>

response:
OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20110823175544.000

<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>2000<SEVERITY>ERROR<MESSAGE>[ofx.unsupportedClientApplication]
Client application or version is not supported by this server.
[ref: 20110823215608.297]</STATUS><DTSERVER>20110823145608.297[-7:MST]<LANGUAGE>ENG<FI><ORG>AMEX<FID>3101</FI></SONRS></SIGNONMSGSRSV1><SIGNUPMSGSRSV1><ACCTINFOTRNRS><TRNUID>20110823175544.000<STATUS><CODE>15500<SEVERITY>ERROR</STATUS><CLTCOOKIE>1</ACCTINFOTRNRS></SIGNUPMSGSRSV1></OFX>


Completed

-------------

And this time I did see the invalid username/password, even though I verified that they were correct (not in the above printout, of course):

ERROR #15500 Signon invalid: "The user cannot signon because he or she entered an invalid user ID or password."
Comment 11 Troy Carpenter 2011-08-23 22:07:41 UTC
I did another to my regular bank, and got the same result, although this time I did NOT get the username/password error:


url: https://eftx.bbt.com/eftxweb/access.ofx
request:
OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20110823180247.000

<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20110823180247.000
<USERID>myuserid
<USERPASS>mypassword
<LANGUAGE>ENG
<FI>
<ORG>BBT
<FID>BBT
</FI>
<APPID>QWIN
<APPVER>2000
</SONRQ>
</SIGNONMSGSRQV1>
<SIGNUPMSGSRQV1>
<ACCTINFOTRNRQ>
<TRNUID>20110823180247.000
<CLTCOOKIE>1
<ACCTINFORQ>
<DTACCTUP>19691231
</ACCTINFORQ>
</ACCTINFOTRNRQ>
</SIGNUPMSGSRQV1>
</OFX>

response:
OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20110823180247.000

<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>2000<SEVERITY>ERROR<MESSAGE>General Error</STATUS><DTSERVER>20110823220310.243[0:GMT]<LANGUAGE>ENG<FI><ORG>BBT<FID>BBT</FI></SONRS></SIGNONMSGSRSV1></OFX>
Completed
Comment 12 Troy Carpenter 2011-08-23 22:15:03 UTC
Finally, here's a successful download from another Amex account:

url: https://online.americanexpress.com/myca/ofxdl/desktop/desktopDownload.do?request_type=nl_ofxdownload
request:
OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20110823180818.000

<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20110823180818.000
<USERID>myuserid
<USERPASS>mypassword
<LANGUAGE>ENG
<FI>
<ORG>AMEX
<FID>3101
</FI>
<APPID>QWIN
<APPVER>2000
</SONRQ>
</SIGNONMSGSRQV1>
<CREDITCARDMSGSRQV1>
<CCSTMTTRNRQ>
<TRNUID>20110823180818.000
<CLTCOOKIE>1
<CCSTMTRQ>
<CCACCTFROM>
<ACCTID>myacctnumber
</CCACCTFROM>
<INCTRAN>
<DTSTART>20110624
<INCLUDE>Y
</INCTRAN>
</CCSTMTRQ>
</CCSTMTTRNRQ>
</CREDITCARDMSGSRQV1>
</OFX>
response:
OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20110823180818.000

<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0<SEVERITY>INFO<MESSAGE>Login successful</STATUS><DTSERVER>20110823150843.313[-7:MST]<LANGUAGE>ENG<FI><ORG>AMEX<FID>3101</FI><START.TIME>20110823150843<ORIGIN.ID>FMPWeb</SONRS></SIGNONMSGSRSV1><CREDITCARDMSGSRSV1><CCSTMTTRNRS><TRNUID>20110823180818.000<STATUS><CODE>0<SEVERITY>INFO</STATUS><CLTCOOKIE>1<CCSTMTRS><CURDEF>USD<CCACCTFROM><ACCTID>myacctnumber</CCACCTFROM><BANKTRANLIST><DTSTART>20110624050000.000[-7:MST]<DTEND>20110823050000.000[-7:MST]</BANKTRANLIST><LEDGERBAL><BALAMT>0.00<DTASOF>20110823050000.000[-7:MST]</LEDGERBAL><CYCLECUT.INDICATOR>false<PURGE.INDICATOR>false<INTL.INDICATOR>false</CCSTMTRS></CCSTMTTRNRS></CREDITCARDMSGSRSV1></OFX>


Completed
Comment 13 Jack 2011-08-24 21:10:40 UTC
Troy - can you unmap the successful account, and then capture the messages when you remap it?


I'm getting similar errors.  I just spent an entirely frustrating and useless time on the phone with Chase (credit card), who refused to do anything since I'm using software they don't support.  Does anybody have a real copy of Quicken to try, to capture the same log to see if we are really identical?

From Chase, I get #2000: USER NOT AUTHORIZED TO ACCESS THE SYSTEM WITH THIS APPLICATION

From Amex, I get #2000: [ofx.unsupportedClientApplication] Client application or version is not supported by this server. [ref: 20110824201504.368]

From Merrill Lynch: #2000: Please attempt your login again. If you continue to have difficulty, please call 1.800.MERRILL (637.7455).

All tried with Q2008, Q2011 both 102 and 103.

Are there any ideas on how else to troubleshoot this?
Comment 14 Troy Carpenter 2011-08-24 22:11:44 UTC
The first time I came across this is because my bank stopped supporting the Quicken variant I was using before.  I unmapped the account and got the error listed above for BB&T.  I had to go to a backup directory to get it restored.

I then tried with American Express, which led to this bug being written.
Comment 15 Thomas Baumgart 2011-08-26 07:27:21 UTC
I received a note, that the listing entry for AMEX has been updated. To give it a try, you need to remove the local copy of the listing on your system by executing 'rm ~/.kde4/share/apps/kmymoney/*.xml' and then start the mapping procedure.

All files pulled from the online listing are kept for 7 days before the are re-loaded. To enforce a prior reload, remove all the files as explained above.
Comment 16 Troy Carpenter 2011-08-27 12:28:13 UTC
Deleted those files as indicated and retried the mapping.  I saw it download new XML files, but I still got the invalid client from all my online institutions.
Comment 17 Jack 2011-09-01 23:57:00 UTC
Ack.....   Look at the URL being used in Comment 10 (fail) and Comment 12 (works).  Different server.  Changing the server from wwww99.americanexpress.com to online... should work.  I've already posted this info at ofxhome.
Comment 18 Jack 2011-12-11 00:02:17 UTC
Troy - did changing the server allow this to work?  If so, the bug could be closed, although I'm not sure if it should be INVALID, WORKSFORME, or DOWNSTREAM.....

One thing I've learned in dealing with financial institutions regarding OFX is that it is essentially impossible to talk to anyone who actually knows anything, and that the error messages their servers throw do not always reflect reality.
Comment 19 Cristian Oneț 2012-01-13 20:08:54 UTC
In the end did the proposed solution work, I'm asking so we can give a resolution to this report.
Comment 20 Troy Carpenter 2012-01-24 03:55:07 UTC
Sorry, but no.  I'm now using 4.6.1 from Clay's repository.

Trying to set up an online account with BB&T, I got the same result as in comment #11.  However, an older file with the online mapping worked to download transactions.  No change in behavior.
Comment 21 Troy Carpenter 2012-01-24 04:35:13 UTC
AHA...found the problem for BB&T, at least.

It looks like the entry for BB&T from libofx (I guess) is using the followng:

<ORG>BBT
<FID>BBT

BUT, when I traced a successful transaction, I found:

<ORG>BB&T
<FID>BB&T

So, I switched to the manual tabs and put in the ORG and FID fields as BB&T and it worked.

I haven't tried the Amex one yet.
Comment 22 Troy Carpenter 2012-01-24 04:39:40 UTC
And it looks like the Amex card now works out of the box.  I didn't have to do anything special for it.  So it sounds like a libofx bug for the BB&T entry.
Comment 23 Thomas Baumgart 2012-01-28 09:21:57 UTC
Just to clarify this: it is not a libofx problem. The data is collected by KMyMoney from http://www.ofxhome.com - a non profit voluntary provider. I have informed him about this bug entry and he confirmed to have changed his listing already. The entry can be found at http://www.ofxhome.com/index.php/institution/view/475