captin411 / ofxclient

Bank transaction downloader and python OFX client libraries
MIT License
264 stars 89 forks source link

Cannot download from Chase Bank #44

Open sneilan opened 7 years ago

sneilan commented 7 years ago

I'm using Python 2.7.9 with OfxClient 2.0.3 with DEFAULT_OFX_VERSION = '103'


DEBUG:root:posting data to https://www.oasis.cfree.com/1601.ofxgp
DEBUG:root:---- request ----
DEBUG:root:OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:6e1f7c9279cd4a3da52aac4ad23d32e8

<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20170603075704
<USERID>********
<USERPASS>*************
<LANGUAGE>ENG
<FI>
<ORG>Chase Bank
<FID>1601
</FI>
<APPID>QWIN
<APPVER>2500
<CLIENTUID>11b9453ce55c40538fd15b7ed6e356a6
</SONRQ>
</SIGNONMSGSRQV1>
</OFX>
DEBUG:root:---- response ----
DEBUG:root:{'fp': None, 'status': 400, 'will_close': True, 'chunk_left': 'UNKNOWN', 'length': 0, 'strict': 0, 'reason': 'Bad Request', 'version': 11, 'debuglevel': 0, 'msg': <httplib.HTTPMessage instance at 0x75cf32d8>, 'chunked': 0, '_method': u'POST'}
DEBUG:root:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
<HTML>
<HEAD>
<TITLE>Error 400--Bad Request</TITLE>
<META NAME="GENERATOR" CONTENT="WebLogic Server">
</HEAD>
<BODY bgcolor="white">
<FONT FACE=Helvetica><BR CLEAR=all>
<TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>
<FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 400--Bad Request</H2>
</FONT></TD></TR>
</TABLE>
<TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3>
</FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.4.1 400 Bad Request</H4>
</FONT><P><FONT FACE="Courier New">The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.</FONT></P>
</FONT></TD></TR>
</TABLE>

</BODY>
</HTML>

authentication failed: 'NoneType' object has no attribute 'find'
akatrevorjay commented 6 years ago

http://www.ofxhome.com/ofxforum/viewtopic.php?id=47456

Looks like we need to use OFX version 2.2, as well as try generating a client id to see if that works.

sneilan commented 6 years ago

I found out that you need to use the chase bank with the institution endpoint of https://ofx.chase.com/ with ofx version 103. ofxclient --ofx-version 103

good lord what a nightmare.

akatrevorjay commented 6 years ago

Yeah, I'll be honest, half of the providers labelled in this ofx list are the exact opposite of trustworthy to have access to your freaking bank account. I came across two very quickly that were obvious frauds.... I now just scrape mint. At least I've heard of Intuit and have some faith that they know what they're doing. I would have assumed that these ofx providers in the list would only be the banks themselves, but ha, that is wrong.

jantman commented 6 years ago

@akatrevorjay Can you tell us which ones are obvious frauds???

akatrevorjay commented 6 years ago

@jantman I honestly wish I could at this point, it was quite some time ago now unfortunately. I'll see if I have some time to look into it this week though :)

qqrs commented 6 years ago

This issue appears to be a dupe of https://github.com/captin411/ofxclient/issues/19

I was able to get Chase downloads working and documented it there.