Skip to content
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

In version above rc9 league client is never found #107

Open
plonsik opened this issue Mar 15, 2023 · 9 comments
Open

In version above rc9 league client is never found #107

plonsik opened this issue Mar 15, 2023 · 9 comments

Comments

@plonsik
Copy link

plonsik commented Mar 15, 2023

No description provided.

@junlarsen
Copy link
Owner

Hi, is this issue different from #106?

@janerjak
Copy link

I might add to this.

Have been running into the same issue. When using rc10 or above, neither an existing nor a newly launched LeagueClient is discovered (using authenticate / web sockets). Downgrading to rc9 worked for me. Since r10 is also not working, this is probably unrelated to Get-CimInstance, but not sure.

Tried running Node.js as Administrator, but that didn't resolve this.
Any idea what the cause is? Please tell me, if there is something else I should provide.

Code with awaitConnection: true

console.log("Looking for League client");
clientCredentials = await authenticate({
	awaitConnection: true,
	pollInterval: 1000,
});
console.log("Obtained League client credentials:", clientCredentials);

Results with League client running:

On rc11, rc10

image

On rc9

image

Code with awaitConnection: false

console.log("Looking for League client");
clientCredentials = await authenticate();
console.log("Obtained League client credentials:", clientCredentials);

Results with League client running:

On rc11, rc10

image

On rc9

image

System details

Windows 11 22H2
Node.js v18.15.0

@plonsik
Copy link
Author

plonsik commented Mar 15, 2023

yes, exactly as Janerjak is saying. Its not related to #106. After upgrading version to above rc9 it cant find process of LeagueClientUx. Tried running Get-CimInstance command as well as wmic one from your code and League process is found. I was looking through commits and nothing much changed but dependency versions - maybe there is a problem?

@bayu01
Copy link

bayu01 commented Mar 17, 2023

Interesting. I was running on rc10 and rc11 just fine for a while. No longer the case.
I had to revert to rc9 to be able to connect

@junlarsen
Copy link
Owner

Maybe Riot changed something in the latest patch?

@EugeneWilson
Copy link
Contributor

It's strange that rc10 has also changed the ability to connect to the client, as that update only changed the WebSocket connection. If someone could get the actual error that's thrown instead of just the ClientNotFoundError (should be here https://github.com/matsjla/league-connect/blob/master/src/authentication.ts#L160) that may be able to tell us more about what's going on.

@plonsik
Copy link
Author

plonsik commented Mar 18, 2023

Catching error results in:

TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
    at tryAuthenticate (C:\Users\Sebastian\IdeaProjects\OverLeague\node_modules\league-connect\dist\index.cjs:110:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async C:\Users\Sebastian\IdeaProjects\OverLeague\src\main.js:17:23

where 110 line in index.cjs at tryAuthenticate is:

const [, password] = stdout.match(passwordRegex);

@plonsik
Copy link
Author

plonsik commented Mar 18, 2023

there was an commit #103 which changed regex for getting password
Testing:

  • old regex
    oldregex

  • new regex
    newregex

@junlarsen
Copy link
Owner

Does the patch from Eugene in #108 fix it? Try rc-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants