[LoL launcher] Champion select not detected

Issue Description:
Users have experienced that sometimes it doesn’t detect champion select, not even after restarting Overwolf, the LCU, nor the PC. It appears to be the issue that Overwolf doesn’t always detect the LCU because one tester mentioned that it didn’t detect champion select for the porofessor.gg app either, but when I guided him to manually connect to the LCU via lockfile and browser it worked (typing “https://riot:[password]@127.0.0.1:[port]/[query]” in chrome) while both apps didn’t. For all users it has returned to working after a day or so, sometimes after restart sometimes even later than so… For me it has always worked. There was a user for whom restart PC didn’t help but after installing the porofessor.gg app to see if that one didn’t work either, then both apps worked and have worked since. The code is wrapped in a try-catch which console.warn(ex)-s any thrown exception, yet the logs are empty.

I’m not using the wrappers in https://overwolf.github.io/docs/api/overwolf-games-launchers-events-lol because I also need some more information about the summoners which these wrappers don’t provide, instead I’m using overwolf.games.launchers.events.getInfo to get the credentials and then overwolf.web.sendHttpRequest to send raw queries to the LCU.

I’d gladly send you the exact code if that helps.

Can you reproduce it:
No, sadly.

Impact for my app:
3 of ~15 beta testers have experienced this.

Do you currently have a workaround?
All 3 recovered after some time, but time could be days. Considering 3/15 have reported it, I’d call it critical, and I’ve not made the app visible yet just because of this.

[Update]
One of the users reports it’s still not working. Like with the other user, we tried connecting via browser and it worked, and we checked that the logs were empty. However, when installing porofessor.gg both apps worked, just like with the second user. It also continued to work after uninstalling the porofessor.gg app and restarting the LCU.

I’m wondering if there is some setup code I’m not doing which the porofessor.gg app does? Or a permissions issue?

Hi, and thanks for the feedback.

We will check the issue and we will update you here.

Thanks.

Thanks Eran, do you have an estimate when you can work on this? Should I connect to the LCU myself instead meanwhile?

I finally got to experience it myself so I could gather more intel :smiley:
I’ll write as much as I can sorry if it’s a lot of text, I believe in these kind of bugs anything can be a lead.

So OW does not start the App when the LoL launcher starts so the app doesn’t automatically start.
It neither detects the launcher after if I manually start the app.
The following had no effect on the above:

  • Restarting the LoL client
  • Restarting OW
  • Closing both OW, and LoL, then starting OW then starting LoL
  • Logging in on OW on whitelisted account
  • Running an unpacked version of the app

Since I could reproduce it on an unpacked version of the app, I could debug however I wanted, these are the results:

The call overwolf.games.launchers.getRunningLaunchersInfo returns:
{"success":true,"launchers":[]}

This event doesn’t get triggered no matter how many times I restart LoL client:
overwolf.games.launchers.onLaunched

The calls overwolf.games.launchers.events.setRequiredFeatures and overwolf.games.launchers.events.getInfo both return (over and over when recalling each 2 seconds):
{"success":false,"status":"error","reason":"Launcher isn't running or the associated game isn't running"}

If I remove from the manifest:

    "game_targeting": { "type": "dedicated", "game_ids": [ 10902 ] },
    "game_events": [ 10902 ],

While keeping:

    "launch_events": [ { "event": "GameLaunch", "event_data": { "game_ids": [ 10902 ] }, "start_minimized": false } ],

Then the latter functions return:

{"success":false,"status":"error","reason":"launcher doesn't appear in the app's manifest"}

(As expected)

The following C# code finds the lockfile looking for the LoL process, sends a request to LCU and gets the currently logged in region as expected:

	var ps = Process.GetProcesses();
	var lol = ps.Where(x => x.ProcessName == "LeagueClientUx").First();
	var lockfile = Path.Combine(Path.GetDirectoryName(lol.MainModule.FileName), "lockfile");
	using var fs = new FileStream(lockfile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
	using var sr = new StreamReader(fs, Encoding.Default);
	var spl = sr.ReadToEnd().Split(':');
	var (port, pass) = (spl[2], spl[3]);
	var cmd = "lol-platform-config/v1/namespaces/LoginDataPacket/platformId";
	var c = new RestClient
	{
		Authenticator = new HttpBasicAuthenticator("riot", pass),
		BaseUrl = new Uri($"https://127.0.0.1:{port}/{cmd}"),
		RemoteCertificateValidationCallback = new RemoteCertificateValidationCallback((object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) => true)
	};
	var req = new RestRequest();
	var res = c.Get(req);
	if (res.StatusCode != System.Net.HttpStatusCode.OK) { }
	var region = res.Content;

This worked while overwolf.games.launchers.getRunningLaunchersInfo is still returning {"success":true,"launchers":[]}

So apparently OW doesn’t detect LoL at all for my app even though the manifest has:

    "game_targeting": { "type": "dedicated", "game_ids": [ 10902 ] },
    "game_events": [ 10902 ],
    "launch_events": [ { "event": "GameLaunch", "event_data": { "game_ids": [ 10902 ] }, "start_minimized": false } ],

All users have reported that installing the porofessor.gg app will make it start working again (even after uninstalling the porofessor.gg app).
All affected users also report that it worked in the beginning, and stopped working after a while.
It never happened to me as long as I had other OW apps installed, but doing a clean installation of OW installing ONLY my app via the installer (can’t do via app store because it’s hidden), it eventually (after 2 days) stopped working.

I will wait and not install the porofessor.gg app in case there is more debugging we want to do.

Windows update also reports there are no more updates available.

It would be very easy for me to just use the C# in a dll instead of using the OW wrappers. I also don’t mind doing this in the meantime, at least as a fallback option if the wrappers don’t work. Should I?

My understanding: It works at start even when installed alone, so the manifest is probably correct, then it stops working if no other OW apps are installed. So it’s as if OW takes from all the installed apps a list of all games and launchers which it needs to scan for, but for some reason, after a few days it doesn’t read my app’s manifest. By installing other LoL apps, it now realizes it needs to scan for the LoL launcher, and then my app also works.

I hope this helps!

Hi @benketriel,

I’m sorry about the delay. There was a Passover holiday here.

Regarding your last replay - I will take a deeper look at that tomorrow when I’ll back to the office.

Thanks.

1 Like

Hi @benketriel,

It’s an option, but there is no reason for using a custom C# dll if we have built-in support for your requirements in the OW API. And if something is working “for a few days,” there is no reason that it will stop after a few days… so there is an issue there. And as there are no other complaints about the launcher from other apps, I guess that there is a big possibility that it’s an app issue rather than an API issue. So let’s find out…

Can you please download the lol launcher sample app and make sure that it’s working as expected?

Note that this app has no UI. Just open it, run the lol client, and then open the dev tools for the main window. And the app should print all the events in the dev console while the launcher is running. I want to make sure that it’s working.

Besides, please reproduce the issue and send me your log package.

Thanks.

Hi, I installed the sample app and it works as far as I understand. It started when starting the LoL client and prints to console:

main.js:64 League of Legends launcher running
main.js:99 getRunningLaunchersInfo: {"success":true,"launchers":[{"title":"League of Legends Launcher","id":109021,"classId":10902,"isInFocus":true,"position":{"top":340,"left":640,"width":1280,"height":720},"handle":6166396,"commandLine":"\"C:/Riot Games/League of Legends/LeagueClientUx.exe\" \"--riotclient-auth-token=Q3UQexCjKrUKhyeQtDykRw\" \"--riotclient-app-port=50415\" \"--no-rads\" \"--disable-self-update\" \"--region=EUNE\" \"--locale=en_GB\" \"--remoting-auth-token=ZlYpas2QZk-zG_Wjs57H9g\" \"--respawn-command=LeagueClient.exe\" \"--respawn-display-name=League of Legends\" \"--app-port=51537\" \"--install-directory=C:/Riot Games/League of Legends\" \"--app-name=LeagueClient\" \"--ux-name=LeagueClientUx\" \"--ux-helper-name=LeagueClientUxHelper\" \"--log-dir=LeagueClient Logs\" \"--crash-reporting=crashpad\" \"--crash-environment=EUN1\" \"--crash-pipe=/./pipe/crashpad_33876_PZHZGEQIGYOGWFOT\" \"--app-log-file-path=C:/Riot Games/League of Legends/Logs/LeagueClient Logs/2021-03-30T12-53-05_33876_LeagueClient.log\" \"--app-pid=33876\" \"--output-base-dir=C:/Riot Games/League of Legends\" \"--no-proxy-server\"","processId":45420,"path":"C:/Riot Games/League of Legends/LeagueClientUx.exe"}]}
main.js:80 Set required features:
main.js:81 {"success":true,"status":"success","supportedFeatures":["game_flow","summoner_info","champ_select","lcu_info","lobby_info","end_game","game_info"]}

Note that my app also works when installing it from scratch so this is not a big surprise.

Then I reproduced the problem again and created a log dump: OverwolfLogs_2021-03-30_12-45-18.zip (521.7 KB)

Note that the app isn’t even launched when running the LoL client, and I didn’t manually run it either when creating these logs.

In case it helps, here is the manifest of the file manifest.zip (1.0 KB) . If the problem is with the app then I’m guessing it’s the only place where it could be is in the manifest, since the app doesn’t even start when starting the LoL client as it should.

Thank you!

Hi! I made some progress, I was looking through the log files created by OW, and found this line in one of the trace files:
2021-03-30 12:39:59,849 (INFO) [OverlayService ID 14] GamesManager - Not injecting into launcher: 109021 because Overlay is disabled for this game under the game settings

So I went to settings and found this overlay setting which when turning on made the app work again. So the question is, what could make this get turned off by itself? (Neither me nor any of the beta testers have went in to change this setting)

[EDIT] Another observation: When I expand the League of Legends row it says “You have no apps here yet”. Could it be that because my app is only for the LoL launcher and not while in game, that this makes OW disable the launcher for it as well?

If you or your beta testers change the overlay settings, your app is never enabled by your app - as your app is targeted only to lol launcher.

If you add the lol id (5426) to your manifest as a targeted game, that will resolve the issue.

Can you please test it and update?

Thanks

Yes it appears to fix it!
So to summarize the issue, it was that even though the app is only for the launcher and not intended to be used in-game, in the manifest I have to write both the game id and the launcher id. Otherwise it won’t connect to the launcher events unless some other app triggers OW to connect to the LoL client in which case it works too.

It was also observed that on a fresh install it would still connect to the LoL client even though no games needed this. In this case LoL doesn’t even appear in the list of games in the settings, and was automatically added later (took 2 days for me, maybe after restart?) by OW as it saw that I used LoL - at this time the app stops working because then it is marked as “off” so it no longer connects to the LoL client unless 5426 is in the manifest (together with 10902).

Does that sound right?

Many thanks for your help!

@benketriel, let’s summarize it like this: lol and lol launcher are a unique case: they have different game ids, but they are not exactly diverse, and they are bound together in some ways in our GEP (game events provider component). Your app is unique, as it’s targeted only to the lol launcher, so you use only the launcher id (make sense). But you should also add the lol id. Once you did, that solved the issue.

I will see if I can add it to the docs in some way.

Anyway, glad it’s working.
Thanks!

1 Like