Whenever I call login I get
chriskinsman opened this issue · 8 comments
an assertion error "Expected list of pairs from server".
Digging in I see the assertion and it is when parsing a response containing:
SID=BAD_COOKIE
LSID=BAD_COOKIE
Auth=asdf
Token=oauth2asdf
Any thoughts?
please update to the latest gpapi version as there was a change in google's response that impacted the login procedure. let me know if you still have trouble after this
I have now updated to the latest and still hitting error.
Now I get back a LoginError that indicates "Error=BadAuthentication".
But the underlying response is still as above...
Yeah it appears that Google is occasionally handling the login with a different (unsupported) service. If you try a couple of times you'll eventually get a successful login.
I would suggest you save that token and supply it for future requests rather than depend on logging in every time. For now that's the best work around until further information can be gleaned about why the login is unpredictably saying BadAuthentication.
you can supply the authToken: "..."
as part of the options to GooglePlayApi, e.g., like https://github.com/dweinstein/node-google-play-cli/blob/8cc50138be5aa1b044e8a79b89efb5951509dfce/cli.js#L19
Thanks. Will try that.
@chriskinsman so just to confirm were you eventually able to get an auth token after a couple attempts?
Yep.
I fixed this on both a Ubuntu and Windows-based system by installing an older version of Node.js, to be more precise v8.16.2.