"Session has expired" error message
It seems like authentication is now failing.
I've tried removing the ~/.minty file and performing a fresh login, I've tried running it from another machine, I've tried logging onto mint in my browser to initiate a new session, but no luck.
user:dashing user$ minty login
You are already logged in, [email protected].
user:dashing user$ minty accounts
/Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/common.rb:155:in `parse': 757: unexpected token at '<error><code>1</code><description>Session has expired.</description><name></name><type></type></error>' (JSON::ParserError)
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/common.rb:155:in `parse'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minty-0.1/lib/minty/client.rb:41:in `block in accounts'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minty-0.1/lib/minty/client.rb:91:in `login'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minty-0.1/lib/minty/client.rb:39:in `accounts'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minty-0.1/lib/minty/cli/accounts.rb:55:in `accounts'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minty-0.1/lib/minty/cli/accounts.rb:41:in `exec'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minty-0.1/bin/minty:11:in `<top (required)>'
from /Users/user/.rbenv/versions/2.2.3/bin/minty:23:in `load'
from /Users/user/.rbenv/versions/2.2.3/bin/minty:23:in `<main>'
Mint has made a lot of changes in their login lately, so I'm not surprised that login is failing. I'll try and fix it if I have some time, but I can't make any guarantees it will be soon.
I've done a bit more spelunking. If I can manage to find the time to fix it on my own, I'll submit a PR.
I've noticed two things so far, though I'm not a skilled Nokogiri or Mechanize user and don't know how the API used to behave, so you can correct me if I'm wrong.
The session expires, though I can't figure out why.
- The first thing I noticed was the
@tokenin client.rb was coming back nil. I inspected the mechanize results and dropped['token']from the end of the@token =line in client.rb (@token = page.at('input').attributes["value"].value) and it began grabbing the token from the structure again. -
https://wwws.mint.com/refreshFILogins.xeventdoesn't seem to be a call anymore. Whereas I can make a call tohttp://wwws.mint.com/app/getJsonData.xevent?task=accountsin my browser and get the expected JSON, doing that with therefreshFILoginscall seems to come up with a 404. Maybe that's invalidating the session token?
I'll let you know if I find anything else. Thanks for responding! :)
Lots of good discussion here: https://github.com/mrooney/mintapi/issues/73
Mint doesn't look too promising anymore.