junlarsen/league-connect

authenticate function can't parse remoting auth token from stdout

Riveran opened this issue · 3 comments

At the current time I'm trying write application for import champions runes from my app in lol client.
I'm using electron with your library, and when i tryed authenticate I got error "object null is not iterable (cannot read property Symbol(Symbol.iterator))" and problem was with parse remoting auth token.

And I found couse:
image

problem are binding with execOptions namely { shell: 'powershell' }
https://github.com/matsjla/league-connect/blob/12720c7915abb08f7a3beb81b7cb49ec5ebb15f0/src/authentication.ts#L119

I think powershell formats data differently depending on the environment.

That's interesting... (btw how was that image captured? debugger?)

I'm not too sure how we'd go about resolving this, maybe replacing all newlines in the output?

The fix (thanks to @hotsoycandy in #60) has been released under version 5.4.0.