Closed lologrignola closed 1 year ago
That's interesting, do you think you'd be able to get the entire output from the program (the stdout variable here https://github.com/matsjla/league-connect/blob/master/src/authentication.ts#L140) for debugging purposes? You can censor out any sensitive parts, but I'd like to see why it would join them
The RegEx used is /--remoting-auth-token=([\w-_]+)/
which suggests there is no space in your output but I'd love to double check.
It would also be appreciated if you could open a fix with the .replace so we can evaluate different approaches! Thanks!
Yes, here it is:
"M:/Games/Riot Games/Riot Client/UX/RiotClientUx.exe" --app-port=56160 --remoting-auth-token=RQC0fruXtnXRUyS5SDd6DA --app-pid=1160 "--log-dir=C:/Users/loren/AppData/Local/Riot Games/Riot Client/Logs" "--user-data-root=C:/Users/loren/AppData/Local/RiotGames/Riot Client" "--app-root=M:/Games/Riot Games/Riot Client" --crashpad-environment=KeystoneFoundationLiveWin
Uhm that's very weird. The regex is not supposed to, and does not capture --app-pid 🤔
Wtf, that's weird idk why it gets captured in my case then. Probably you can just ignore this then, seems like an exclusive scenario and I found a work around. Thanks
Sounds good, I'll keep this issue open in case anybody else stumbles upon the same issue
Bumping it, same issue
They patched the package locally I believe with this change https://github.com/matsjla/league-connect/pull/86/files
@matsjla any update? still broken but in my case it capture --app-port at the end of password.
_url: 'wss://riot:8CB0AGpFZigrT7zNIXKpeQ--app-port@127.0.0.1:53125',
Hmm maybe we could edit the regex to ignore any trailing double dashes
Hmm maybe we could edit the regex to ignore any trailing double dashes
Also there is no spaces in stdout because of this line:
const stdout = rawStdout.replace(/\s/g, "");
if you apply regex against rawStdout it works.
So replacing
const [, password] = stdout.match(passwordRegex);
to
const [, password] = rawStdout.match(passwordRegex);
fixes this issue.
Right, that I believe someone had a similar problem with the rawStdout too though https://github.com/matsjla/league-connect/pull/60
As you can see the current RegEx (the top portion of the screenshot) is taking the "--app-pid" and this is causing problems in the authentication part. I'm basically trash at RegEx so couldn't find a RegEx-fix but had a work around with .replace.
Let me know if you can fix it with RegEx or you want me to create a branch with the other fix.
Bye 😄