bonepl / ChromaLeague

Java open-source Razer Chroma keyboard integration for League of Legends
GNU General Public License v3.0
57 stars 24 forks source link

chroma league not working due to misregistering the ID and IGN #146

Closed lXlDevourer closed 8 months ago

lXlDevourer commented 9 months ago

the app is registering riot username that you use when logging into a riot account, while detecting the riot ID that can be changed

here is the log my IGN is not the same as the riot username

09:43:09 [INFO] Started Chroma League, close this window to exit the application 09:43:10 [INFO] Detected Razer Chroma REST Api Version[core=3.34.00, device=3.34.00, version=3.34.00] 09:43:10 [INFO] Running ChromaLeague version 1.2.1 09:43:10 [INFO] Your ChromaLeague version is up to date! 09:43:43 [INFO] Game is loading 09:43:43 [INFO] Initialized ChromaRestSDK connection { sessionId: 62926 } 09:43:51 [INFO] IXIDevourer joined the game 09:43:52 [SEVERE] Error while drawing main HUD java.lang.IllegalStateException: Couldn't find player with name IXIDevourer at com.bonepl.chromaleague.rest.playerlist.PlayerList.lambda$getBySummonersName$3(PlayerList.java:35) at java.base/java.util.Optional.orElseThrow(Optional.java:403) at com.bonepl.chromaleague.rest.playerlist.PlayerList.getBySummonersName(PlayerList.java:35) at com.bonepl.chromaleague.rest.playerlist.PlayerList.getActivePlayer(PlayerList.java:11) at com.bonepl.chromaleague.state.GameStateHelper.isActivePlayerAlive(GameStateHelper.java:22) at com.bonepl.chromaleague.hud.parts.Background.(Background.java:20) at com.bonepl.chromaleague.hud.MainHud.getFrame(MainHud.java:32) at com.bonepl.razersdk.ChromaRestSDK.createKeyboardEffectParameter(ChromaRestSDK.java:91) at com.bonepl.razersdk.ChromaRestSDK.createKeyboardEffect(ChromaRestSDK.java:82) at com.bonepl.chromaleague.tasks.RefreshMainHudTask.run(RefreshMainHudTask.java:18) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

Naneek-code commented 9 months ago

For now, the way I found to get around this is to leave your ID exactly as it was before (I don't know if ids can have spaces, my nickname didn't have spaces)

bonepl commented 9 months ago

Can you let me know what data you see when this issue occurs for the following links:

https://127.0.0.1:2999/liveclientdata/activeplayer

https://127.0.0.1:2999/liveclientdata/playerlist

https://127.0.0.1:2999/liveclientdata/activeplayername

(these links will only be available during the game)

That could help me to track down the problem.

I also have different riot login id and summoner's name, but haven't encountered any problems. Or are you talking about something else?

lXlDevourer commented 9 months ago

Active player: { "abilities": { "E": { "abilityLevel": 0, "displayName": "Shifting Sands", "id": "AzirEWrapper", "rawDescription": "GeneratedTip_Spell_AzirEWrapper_Description", "rawDisplayName": "GeneratedTip_Spell_AzirEWrapper_DisplayName" }, "Passive": { "displayName": "Shurima's Legacy", "id": "AzirPassive", "rawDescription": "GeneratedTip_Passive_AzirPassive_Description", "rawDisplayName": "GeneratedTip_Passive_AzirPassive_DisplayName" }, "Q": { "abilityLevel": 0, "displayName": "Conquering Sands", "id": "AzirQWrapper", "rawDescription": "GeneratedTip_Spell_AzirQWrapper_Description", "rawDisplayName": "GeneratedTip_Spell_AzirQWrapper_DisplayName" }, "R": { "abilityLevel": 0, "displayName": "Emperor's Divide", "id": "AzirR", "rawDescription": "GeneratedTip_Spell_AzirR_Description", "rawDisplayName": "GeneratedTip_Spell_AzirR_DisplayName" }, "W": { "abilityLevel": 1, "displayName": "Arise!", "id": "AzirW", "rawDescription": "GeneratedTip_Spell_AzirW_Description", "rawDisplayName": "GeneratedTip_Spell_AzirW_DisplayName" } }, "championStats": { "abilityHaste": 0.0, "abilityPower": 9.0, "armor": 28.0, "armorPenetrationFlat": 0.0, "armorPenetrationPercent": 1.0, "attackDamage": 52.0, "attackRange": 525.0, "attackSpeed": 0.6944000124931336, "bonusArmorPenetrationPercent": 1.0, "bonusMagicPenetrationPercent": 1.0, "critChance": 0.0, "critDamage": 175.0, "currentHealth": 550.0, "healShieldPower": 0.0, "healthRegenRate": 1.399999976158142, "lifeSteal": 0.0, "magicLethality": 0.0, "magicPenetrationFlat": 0.0, "magicPenetrationPercent": 1.0, "magicResist": 30.0, "maxHealth": 550.0, "moveSpeed": 335.0, "omnivamp": 0.0, "physicalLethality": 0.0, "physicalVamp": 0.0, "resourceMax": 320.0, "resourceRegenRate": 1.600000023841858, "resourceType": "MANA", "resourceValue": 320.0, "spellVamp": 0.0, "tenacity": 5.0 }, "currentGold": 500.0, "fullRunes": { "generalRunes": [ { "displayName": "Hail of Blades", "id": 9923, "rawDescription": "perk_tooltip_HailOfBlades", "rawDisplayName": "perk_displayname_HailOfBlades" }, { "displayName": "Cheap Shot", "id": 8126, "rawDescription": "perk_tooltip_CheapShot", "rawDisplayName": "perk_displayname_CheapShot" }, { "displayName": "Eyeball Collection", "id": 8138, "rawDescription": "perk_tooltip_EyeballCollection", "rawDisplayName": "perk_displayname_EyeballCollection" }, { "displayName": "Ultimate Hunter", "id": 8106, "rawDescription": "perk_tooltip_UltimateHunter", "rawDisplayName": "perk_displayname_UltimateHunter" }, { "displayName": "Transcendence", "id": 8210, "rawDescription": "perk_tooltip_Transcendence", "rawDisplayName": "perk_displayname_Transcendence" }, { "displayName": "Gathering Storm", "id": 8236, "rawDescription": "perk_tooltip_GatheringStorm", "rawDisplayName": "perk_displayname_GatheringStorm" } ], "keystone": { "displayName": "Hail of Blades", "id": 9923, "rawDescription": "perk_tooltip_HailOfBlades", "rawDisplayName": "perk_displayname_HailOfBlades" }, "primaryRuneTree": { "displayName": "Domination", "id": 8100, "rawDescription": "perkstyle_tooltip_7200", "rawDisplayName": "perkstyle_displayname_7200" }, "secondaryRuneTree": { "displayName": "Sorcery", "id": 8200, "rawDescription": "perkstyle_tooltip_7202", "rawDisplayName": "perkstyle_displayname_7202" }, "statRunes": [ { "id": 5005, "rawDescription": "perk_tooltip_StatModAttackSpeed" }, { "id": 5008, "rawDescription": "perk_tooltip_StatModAdaptive" }, { "id": 5002, "rawDescription": "perk_tooltip_StatModArmor" } ] }, "level": 1, "summonerName": "IXIDevourer", "teamRelativeColors": true }

lXlDevourer commented 9 months ago

[ { "championName": "Azir", "isBot": false, "isDead": false, "items": [], "level": 1, "position": "", "rawChampionName": "game_character_displayname_Azir", "respawnTimer": 0.0, "runes": { "keystone": { "displayName": "Hail of Blades", "id": 9923, "rawDescription": "perk_tooltip_HailOfBlades", "rawDisplayName": "perk_displayname_HailOfBlades" }, "primaryRuneTree": { "displayName": "Domination", "id": 8100, "rawDescription": "perkstyle_tooltip_7200", "rawDisplayName": "perkstyle_displayname_7200" }, "secondaryRuneTree": { "displayName": "Sorcery", "id": 8200, "rawDescription": "perkstyle_tooltip_7202", "rawDisplayName": "perkstyle_displayname_7202" } }, "scores": { "assists": 0, "creepScore": 0, "deaths": 0, "kills": 0, "wardScore": 0.0 }, "skinID": 0, "summonerName": "Ceaseless Void", "summonerSpells": { "summonerSpellOne": { "displayName": "Teleport", "rawDescription": "GeneratedTip_SummonerSpell_SummonerTeleport_Description", "rawDisplayName": "GeneratedTip_SummonerSpell_SummonerTeleport_DisplayName" }, "summonerSpellTwo": { "displayName": "Flash", "rawDescription": "GeneratedTip_SummonerSpell_SummonerFlash_Description", "rawDisplayName": "GeneratedTip_SummonerSpell_SummonerFlash_DisplayName" } }, "team": "ORDER" }, { "championName": "Cassiopeia", "isBot": true, "isDead": false, "items": [], "level": 1, "position": "", "rawChampionName": "game_character_displayname_Cassiopeia", "respawnTimer": 0.0, "runes": { "keystone": { "displayName": "Arcane Comet", "id": 8229, "rawDescription": "perk_tooltip_ArcaneComet", "rawDisplayName": "perk_displayname_ArcaneComet" }, "primaryRuneTree": { "displayName": "Sorcery", "id": 8200, "rawDescription": "perkstyle_tooltip_7202", "rawDisplayName": "perkstyle_displayname_7202" }, "secondaryRuneTree": { "displayName": "Domination", "id": 8100, "rawDescription": "perkstyle_tooltip_7200", "rawDisplayName": "perkstyle_displayname_7200" } }, "scores": { "assists": 0, "creepScore": 0, "deaths": 0, "kills": 0, "wardScore": 0.0 }, "skinID": 0, "summonerName": "Cassiopeia", "summonerSpells": { "summonerSpellOne": { "displayName": "Ghost", "rawDescription": "GeneratedTip_SummonerSpell_SummonerHaste_Description", "rawDisplayName": "GeneratedTip_SummonerSpell_SummonerHaste_DisplayName" }, "summonerSpellTwo": { "displayName": "Heal", "rawDescription": "GeneratedTip_SummonerSpell_SummonerHeal_Description", "rawDisplayName": "GeneratedTip_SummonerSpell_SummonerHeal_DisplayName" } }, "team": "CHAOS" } ]

lXlDevourer commented 9 months ago

activeplayername "IXIDevourer"

lXlDevourer commented 9 months ago

seems like it detects the username, while riot ID which is "Ceaseless Void" is read so it can't find the activeplayername?

bonepl commented 9 months ago

This looks like some kind of bug from Riot, active player returns different summoner's name that appears on the player list. I will try to reach out to Riot and ask them if it is intended.

bonepl commented 9 months ago

Oh looks like this is already global issue https://github.com/RiotGames/developer-relations/issues/857

I think not much I can do here until they address this issue. I will keep this under my radar.

bonepl commented 8 months ago

seems like it detects the username, while riot ID which is "Ceaseless Void" is read so it can't find the activeplayername?

Hey, can you paste what responses look like now? I've seen that riot made some fixes.

You can use something like https://pastebin.com/ to make messages cleaner :)

lXlDevourer commented 8 months ago

sorry for the late response, here it is https://pastebin.com/6UPTkDB0

bonepl commented 8 months ago

No problem, what about these services?

https://127.0.0.1:2999/liveclientdata/activeplayer

https://127.0.0.1:2999/liveclientdata/playerlist

https://127.0.0.1:2999/liveclientdata/activeplayername

lXlDevourer commented 8 months ago

https://pastebin.com/yibTQ4me https://pastebin.com/JUBYxghc https://pastebin.com/9ZJVyXZp

bonepl commented 8 months ago

Ok Riot did some fixing in their API, but they didn't fix all of the services used by CL. I will try to workaround it and it should work 98% of the time unless you are unlucky enough to play with somebody that has the same summoner name (Riot ID without a tag).

Riot devs are beginning winter holiday break - proper fix from their side is expected at best in January.

bonepl commented 8 months ago

Hi, check newest release Chroma League 1.3.0 if it fixes the problem for you.

lXlDevourer commented 8 months ago

Alright i will check it out when i have the time and be sure to reply with the resut, thanks. Another question, would it br a problem if two summoners with the same name(different from mine, same ID different tag) were to be in the same lobby?

bonepl commented 8 months ago

Yes, I expect Chroma League will crash. To fix that Riot devs need to do fixing on their side (probably January-February)

lXlDevourer commented 8 months ago

great, it works. thanks for the workaround