csingley / ofxtools

Python OFX Library
Other
301 stars 68 forks source link

potential issue with wells fargo download #148

Closed jpeeler closed 2 years ago

jpeeler commented 2 years ago

Disclaimer, no clue what I'm doing, hence the "potential" in the title. This is with the latest 0.9.5 release.

Whenever I'm attempting to get data from Wells Fargo ofxget stmt -v wells -u <my userid>, I get back a clientuid error. I'm not actually sure what is sensitive to post and what's not, but using the --clientuid option did not work either. What can I post to help debug this?

csingley commented 2 years ago

Well you could start by posting the actual error trace. If it contains your account# user id or password you'd want to redact those.

jpeeler commented 2 years ago

The user id and UUIDs have been changed.

$ ofxget acctinfo wells -u <user> --write
Password:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?OFX OFXHEADER="200" VERSION="220" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="3f01d410-7a5e-11ec-8fe4-d620360c3622"?>
<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>15510</CODE><SEVERITY>ERROR</SEVERITY><MESSAGE>CLIENTUID Error</MESSAGE></STATUS><DTSERVER>20220120175950.757[-8:PST]</DTSERVER><LANGUAGE>ENG</LANGUAGE><FI><ORG>WF</ORG><FID>3000</FID></FI></SONRS></SIGNONMSGSRSV1><SIGNUPMSGSRSV1><ACCTINFOTRNRS><TRNUID>40cc4fe6-7a5e-11ec-bbae-d620360c3622</TRNUID><STATUS><CODE>15500</CODE><SEVERITY>ERROR</SEVERITY></STATUS></ACCTINFOTRNRS></SIGNUPMSGSRSV1></OFX>
ofxtools.scripts.ofxget [ERROR] - SONRS: Request failed, code=15510, severity=ERROR, message='CLIENTUID Error'
Traceback (most recent call last):
  File "/home/jpeeler/.local/bin/ofxget", line 33, in <module>
    sys.exit(load_entry_point('ofxtools==0.9.5', 'console_scripts', 'ofxget')())
  File "/home/jpeeler/.local/lib/python3.10/site-packages/ofxtools/scripts/ofxget.py", line 1612, in main
    REQUEST_HANDLERS[args["request"]](args)
  File "/home/jpeeler/.local/lib/python3.10/site-packages/ofxtools/scripts/ofxget.py", line 613, in request_acctinfo
    _merge_acctinfo(args, acctinfo)
  File "/home/jpeeler/.local/lib/python3.10/site-packages/ofxtools/scripts/ofxget.py", line 640, in _merge_acctinfo
    acctinfos: List[AcctInfo] = sorted(extract_acctinfos(markup), key=sortKey)
  File "/home/jpeeler/.local/lib/python3.10/site-packages/ofxtools/scripts/ofxget.py", line 1427, in extract_acctinfos
    verify_status(sonrs)
  File "/home/jpeeler/.local/lib/python3.10/site-packages/ofxtools/scripts/ofxget.py", line 1381, in verify_status
    raise ValueError(msg)
ValueError: SONRS: Request failed, code=15510, severity=ERROR, message='CLIENTUID Error'
csingley commented 2 years ago

This is a response sent to you by WFC's servers. Apparently you're sending a bad CLIENTUID. I guess you either need to send nothing, or else match the CLIENTUID they have on file for you.

Doesn't look like a bug on my side.

jpeeler commented 2 years ago

Okay, so how do I determine the proper clientuid to send in that case? Also, I see the --clientuid option, but that doesn't seem to support sending 'None' does it?

csingley commented 2 years ago

You can just set CLIENTUID to an empty string. But I'm going to hazard a guess that you previously sent one CLIENTUID, and now you're sending another, and WFC is pissed about it. This could occur because you were using some other client, and now you're using ofxget, or else because you had an ofxget.cfg containing an autogenerated CLIENTUID, then you blew it away & recreated a new one, including a freshly autogenerated CLIENTUID.

If that's the case... You may or may not be able to fix it in-band; have to scrutinize the relevant part of the spec. Probably not, in which case you'd have to contact WFC and get them to reinitialize CLIENTUID.

jpeeler commented 2 years ago

I tried with an empty string for the CLIENTUID, which gives me:

ValueError: SONRS: Request failed, code=2000, severity=ERROR, message='The user has entered an invalid user ID or password. If registering for the first time, please login to https://www.wellsfargo.com/fmssetup to start the registration process.'

I've tried going to the url and logging in. Claims that a ten minute window is given, but I don't see any change in behavior.

Otherwise, I still get the same error as above (even with an invalid password). So do you think my account is tainted? I haven't used any other clients. I did try --clientuid before, though I'm pretty sure I tried that only after getting the error in the first place.

csingley commented 2 years ago

So it sounds like you’ve found the out of band channel for initialising CLIENTUID. Sounds very similar to the process used by Chase.

http://www.ofxhome.com/ofxforum//viewtopic.php?pid=108790#p108790

csingley commented 2 years ago

You can also try poking around here for how people fixed this.

I’d be quick though, since he says he’s taking that website down

Leemur312 commented 2 years ago

ppl help plz to buy a wells fargo card

csingley commented 2 years ago

LOL I love it “will slang OFX for food”.

You got this boss, if I can figure it out I’m sure you can too.

jpeeler commented 2 years ago

I'm never going to come back to this, so I'm closing the issue. I imagine I did something wrong while trying to get started.