Replies: 59 comments 4 replies
-
Hmm, I can't reproduce this on Python 3.9 under Linux. Is this occurring on master, or an older version of |
Beta Was this translation helpful? Give feedback.
-
I've tried this on master and the most current release version. I'm quite unsure why this is happening. Only thing I can think of is it's an issue in Ubuntu. Are you able to attempt to give this a try on Ubuntu 20.10? |
Beta Was this translation helpful? Give feedback.
-
If you're running identical Python and ofxtools on 2 different OS'es, but on one of them you're getting different results, I'd eliminate differences in user config before turning to the OS. The problem is that USAA isn't sending you OFX. Your Ubuntu machine is sending different requests. Try comparing the output of |
Beta Was this translation helpful? Give feedback.
-
I'm also encountering this issue. Docker |
Beta Was this translation helpful? Give feedback.
-
Well shoot, now it's failing for me as well. I'll try to look into this a bit more. |
Beta Was this translation helpful? Give feedback.
-
@csingley bad news, USAA completely changed their OFX authentication so now only Quicken can connect https://communities.usaa.com/t5/Finances/USAA-Creates-Quicken-Monopoly/td-p/243850 |
Beta Was this translation helpful? Give feedback.
-
Well that's a drag. USAA seems to be following Schwab to the "OFX Secure Plus" dark side... "You'll use Quicken and like it". The original reports on this ticket were probably formatting differences that were fixable by tweaking connection parameters. This latest change is something qualitatively different, and it ain't gonna be fixable from my end. |
Beta Was this translation helpful? Give feedback.
-
Haven't tested this yet, but someone claims to have got this working from the master branch: |
Beta Was this translation helpful? Give feedback.
-
@csingley I've been able to get USAA to work again with some information from the GnuCash-devel mailing list. The following config seems to work for me with latest version from here with some addl notes. The clientuid I extracted from the URL when authenticating via https://df3cx-services.1fsapi.com/casm/usaa/enroll. After entering USAA credentials the page is redirected to https://www.usaa.com/inet/ent_oauth_consent/authorize?0&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&.... It would seem there may be a link between the account and this clientuid. Also ClientUID must be in uppercase. DTACCTUP of 19900101 is required to get good data. The default of 19901231 returned success, but only "Client up to date", no acct info.
I'm not sure if or where these changes should be incorporated, but hoping the information is useful none the less.
@gthole That was me. Was updating this post here at same time you posted. 👍 |
Beta Was this translation helpful? Give feedback.
-
@cfazzini do you know what user agent is being used? I ended up getting the IP block described on https://lists.gnucash.org/pipermail/gnucash-devel/2021-February/045690.html, thank fuck my assets are at Chase now... |
Beta Was this translation helpful? Give feedback.
-
@jackpot51 Best I can tell from the code in ofxget.py, default is a blank User-Agent, so it would appear I'm not sending one. But, could use confirmation on that. Sucks on the IP ban. Hopefully it's short term. |
Beta Was this translation helpful? Give feedback.
-
@cfazzini - thanks for the report! Setting I'm thinking I may need to patch Should we perhaps set up a wiki, to serve as a repository for this kind of info that's helpful to users? |
Beta Was this translation helpful? Give feedback.
-
Sorry just realized I wasn't too clear. It seemed to not have an issue with the full date format, the value of the date seemed to matter more. I just used the 19900101 format with the --dtacctup CLI flag and it was fine. |
Beta Was this translation helpful? Give feedback.
-
@cfazzini - thanks for the clarification. From |
Beta Was this translation helpful? Give feedback.
-
Thanks for clarification, I was looking at this in ofxget.py
|
Beta Was this translation helpful? Give feedback.
-
Well, here we are about a week later, and I'm still getting the Incapsula response using the CURL string and saved file that I had from last week. (Today is the first time I've tried to do anything with this since my last post on the 18th, and I tried only the one time.) I will try it again tomorrow night, and see if that matters (since, technically, tomorrow will be the 7th day). Not sure where to go with this if I am not able to get a connection tomorrow. |
Beta Was this translation helpful? Give feedback.
-
You could jump ship like I did to Chase, where they still have a working OFX endpoint |
Beta Was this translation helpful? Give feedback.
-
I also remain blocked from home, however I set up ofxtools on an AWS instance with the exact same config, and I was able to download my account data, so it really is just blocking access from my home IP for some reason. I haven't made a decision yet whether this is an acceptable solution for me or whether just switching to a more customer-friendly bank makes more sense. |
Beta Was this translation helpful? Give feedback.
-
I had issues with two USAA accounts until I ensured that all *UID values were uppercase GUID's, not random strings. After that, I still get blocked downloading account data from one user, but not from the other. Downloading the list of accounts works on both users. So I think there is server-side blocking that is massively screwed up. |
Beta Was this translation helpful? Give feedback.
-
Well, tonight's run was rather anti-climactic. I remain blocked. So, at some point in the next week, I will probably gird my loins with excessive patience and actually call USAA and see if I can find someone there who has a clue about all this (I am not encouraged by many, many postings on their community boards) and try to get A) unblocked Should it happen that I am successful, I will post back here with any relevant details. Should it happen that I am unsuccessful, I will at least report back that fact. The odds are that it will be at least Tuesday or Wednesday of the coming week before I have opportunity to pursue this (given the amount of time investment required to climb through first layer tech support). |
Beta Was this translation helpful? Give feedback.
-
I wondering whether the people who have had success getting this to work have a paid Quicken account? I have noticed that the app access for Quicken disappears from my USAA account profile after about a week. If I re-request access, I get the exact same access ID and PIN every time, and it reappears in my USAA profile. I am wondering whether Quicken is doing something to keep the token alive that is not done by ofxtools. |
Beta Was this translation helpful? Give feedback.
-
No paid Quicken acct, I've continued to have no issues with USAA since getting the format correct. I download transactions intermittently, sometimes more than a week apart. |
Beta Was this translation helpful? Give feedback.
-
@cfazzini Could you post your working configuration (without accessid and pin, of course)? Perhaps I'll see something in yours that is not in mine (or something that is in mine that is not in yours)? At this point, it has been about two weeks (13 days, to be exact) since I last tried it. I am probably going to wait until next week (that will put me at 19 days, which should be plenty of time for an IP block to be lifted). Then if I get nowhere, I will try to figure out AWS enough to be able to spin up an instance under the free tier to test with. Then, depending on what results I get, I will likely be trying to get in touch with USAA support... |
Beta Was this translation helpful? Give feedback.
-
FYI, AWS is not working for me either - it worked a few times and then I was blocked just like my home IP. I've tried IPs from multiple AWS regions, so either there is a very wide-ranging IP block or the blocking is tied to my account. I'm not sure what to conclude - I've not identified any difference in my setup other than my USAA account credentials. |
Beta Was this translation helpful? Give feedback.
-
If that is the case, then it has to be tied to the account. So, yet another thing to discuss with them once I get to that point... |
Beta Was this translation helpful? Give feedback.
-
OK, so it had been a couple of weeks since I messed with this, so I decided to try it again. Here's what I did, and the results that I got. I'm still not sure what these results mean, but perhaps someone here will. First, I went to the main page of this repository, downloaded the code (using Next, I went to USAA and re-authorized Quicken to access the account (to refresh all my data and access). Gave me the same access ID and access PIN as before, but I did copy the new UUID from the resulting URL into the ofxget.cfg file. Relevant portion of the ofxget.cfg file is:
So, after that, I tried to use
So I went back and did the
Then I tried sending that using curl using the command:
Which netted me this:
I did go back to USAA at one point in this process and attempt to reauthorize Quicken, and I was prompted at sign-in with a "are you human" Captcha, which I answered then it let me log in. So I'm thinking that I might have been blocked at one point, and going in and answering that Captcha unblocked me? Maybe. Anyway, this is where I'm currently at. If anyone has any additional suggestions, I'm all ears. Otherwise, I'm about to just throw my hands up at it and just forget about it again for a while (until I have another free day that I don't mind wasting on it).... |
Beta Was this translation helpful? Give feedback.
-
I am in the same state - I consistently am blocked with this exact same error page. I have also tried testing from multiple AWS regions in order to rule out IP blocking, and did get it to work the very first time I tried sending the request from an AWS instance, but never again. I did not change anything between the successful query and the consistent failure thereafter - there must be something tied to my account blocking access, and likely yours as well. |
Beta Was this translation helpful? Give feedback.
-
Good people, you are entirely welcome to discuss the rituals required to summon lesser demons of the technofinance pantheon. Let's just, you know, take it off the bug tracker, okay? I'm pushing the "Discussions" section of the Github site, which seems like a good fit for this sort of thing. |
Beta Was this translation helpful? Give feedback.
-
After a good bit of testing, I think the issue is around carriage returns. I tried @cfazzini's curl trick from #123 (comment) an on ubuntu ec2 instance. While editing in vim, I noticed that the headers had "\r\n" (shows up as a ^M at the end of the line in vim) and the lines starting with I tried the curl test from https://lists.gnucash.org/pipermail/gnucash-devel/2021-February/045690.html and it worked fine. After reviewing the email on gnucash-devel, I edited my input file from @cfazzini's curl test to have \r\n (in vim, I removed the ^M endings and did Since @cfazzini mentioned using WSL, I'm suspecting the pretty portion of the OFX code uses native carriage returns and python on windows is using "\r\n" while python on linux is using "\n" |
Beta Was this translation helpful? Give feedback.
-
Thanks for the report @jfly ! Lots of fun writing software to talk to a party taking active countermeasures against you, when you’re paying for the privilege |
Beta Was this translation helpful? Give feedback.
-
I'm unsure what the exact cause of this may be, but I'm running into trouble using this with Linux (Ubuntu 20.10) on both python3.8 and python3.9. I can get the commands to work correctly on windows. However, every command via linux is outputting:
~/.local/bin$ ofxget stmt usaa -u 011111111 --all
<title>Traceback (most recent call last):
File "/home/wallet/.local/bin/ofxget", line 8, in
sys.exit(main())
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/scripts/ofxget.py", line 1568, in main
REQUEST_HANDLERSargs["request"]
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/scripts/ofxget.py", line 646, in request_stmt
_merge_acctinfo(args, acctinfo)
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/scripts/ofxget.py", line 617, in _merge_acctinfo
acctinfos: List[AcctInfo] = sorted(extract_acctinfos(markup), key=sortKey)
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/scripts/ofxget.py", line 1380, in extract_acctinfos
parser.parse(markup)
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/Parser.py", line 85, in parse
self.header, message = self._read(source)
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/Parser.py", line 118, in _read
header, message = parse_header(source)
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/header.py", line 294, in parse_header
header, header_end_index = OFXHeaderV1.parse(rawheader)
File "/home/wallet/.local/lib/python3.9/site-packages/ofxtools/header.py", line 81, in parse
raise OFXHeaderError(f"OFX header is malformed:\n{rawheader}")
ofxtools.header.OFXHeaderError: OFX header is malformed:
This, again, only seems to happen on linux. The same command works fine on my windows install.
Beta Was this translation helpful? Give feedback.
All reactions