-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vanguard returning empty profile response #158
Comments
Interesting, might be doable in a backoff/retry to handle empty/infinite responses. Problem here is that none of the ofxtools cookie-handling code is mine. I am just an unfrozen cavemen, your web apps frighten and confuse me. |
...but there's a decent chance I'm serious about the Go thing sometime in 2022! Don't say I didn't warn you, when you start getting pull requests written in Crayola yammering about cost basis matching, multi-leg security reorgs, and transforms from GAAP to cash basis accounting. |
To be clear, I'm falling short of actually recommending we do this here (work as it may). Mostly because I'm hoping we ought to be able to get it working using the typical request/response dance. I can't imagine an OFX server intentionally requiring someone to re-try a request when they get an initial empty response, so it seems like something that may work correctly if we can only find the new magic combination of headers (or whatever). And based on my previous experience, I don't think you need to do anything special with the cookie handling - just hang onto them from the initial request and send them with the subsequent response(s). |
I'm ready! |
I finally spent a little more time digging through the code and debugging this tonight... and it turns out that Vanguard seems to have fixed whatever issue caused it to be empty one time, but because there's some caching going on in Client.py/request_profile() (in the block Does this mean we ought to be doing more sanity-checking before caching it, or perhaps ignoring the cached copy if attempting to use it causes an error? Not sure what the best way to handle that is... |
The actual caching goes on near the end of that same function, when the
I mean sure, we got along fine without caching profiles for many years before shoehorning this bit in. Then this still depends on raising an error in Also - are my eyes deceiving me, or did I define a boolean |
Crap, you're right. I must've misread this code when looking at it earlier because I had it in my head that it was cached before being parsed. In searching for a better explanation, I finally remembered something: A while back one of my partitions ran out of space due to something unrelated. I wonder if the disk filled up so it failed to write this file (even though the OFX had been properly formatted). And because this particular problem didn't show up until the next time I ran my code (and it took me much longer than that to make time to properly debug it), I missed this as a potential cause. Can you poke any holes in that explanation? If not, maybe catching that error and deleting the file upon failure is about the only way to protect against it? Or, you know, I could just not fill up my hard disk...
I think you're right. I don't see any way |
I would agree to just about anything to avoid knowing more about file systems - but sure, sounds plausible, especially if a cron job was involved. Here, try out 3a64f7f on your pathological data & see if it at least bombs out. I'm gonna have a think about this |
Not sure if this belongs here or in a new issue, but "ofxget scan vanguard" says Scan found no working formats for https://vesnc.vanguard.com/us/OfxProfileServlet and "ofxget prof vanguard" (same with acctsinfo) blows up with "urllib.error.URLError: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1006)>" with python 3.11. Let me know if a lower python should work, and if/where you want the full error output. |
@genterminl see #139 for a discussion of the SSLV3_ALERT_HANDSHAKE_FAILURE issue, including a couple of workarounds (either downgrade to pre-python 3.10, or add this hack). |
I've had Vanguard downloads working for years now, but they recently broke with ofxtools. Vanguard is returning an empty response (like, 0 bytes), hence #157. Interestingly, they still work with
ofxgo
. So what's different?In
ofxgo
, I don't do the proper profile requests the wayofxtools
does. However, Vanguard seems to require cookies be set when making the statement request, so I have a hack where if I detect the initial response is empty, I save the cookies it returned and try the exact same response over again. See here: https://github.com/aclindsa/ofxgo/blob/master/vanguard_client.go#L62That said, I don't know what is different now vs. a few weeks ago with ofxtools. I suspect there's some creative new requirement which has been unintentionally imposed on us in order to receive the proper profile response, though I haven't been able to discover it (so far I've tried varying the clientuid and user agent with no success).
The text was updated successfully, but these errors were encountered: