leagueoflegends icon indicating copy to clipboard operation
leagueoflegends copied to clipboard

XMPP Version error - disconnected from chat

Open henricazottes opened this issue 5 years ago • 8 comments

Hi,

I've managed to install LoL on elementary os following this guide and applying this fix. However, it seems chat is not working, similar to #146 .

In the launcher, I have a message "You've been disconnected from chat, attempting to reconnect...". And in the logs, I get:

000014.141|  ERROR|                   Remoting| HTTP Response 500 to GET '/lol-game-queues/v1/queues'
000014.551|  ERROR|                   Remoting| HTTP Response 503 to GET '/lol-chat/v1/conversations/active'
000014.569|  ERROR|                   Remoting| HTTP Response 503 to GET '/lol-chat/v1/friend-groups'
000014.572|  ERROR|                   Remoting| HTTP Response 503 to GET '/lol-chat/v1/friends'
000014.574|  ERROR|                   Remoting| HTTP Response 503 to GET '/lol-chat/v1/friend-requests'
000014.591|  ERROR|                   Remoting| HTTP Response 501 to GET '/lol-chat/v1/resources'
000014.752|  ERROR|                   Remoting| HTTP Response 503 to GET '/lol-chat/v1/me'
000014.796|  ERROR|                   Remoting| HTTP Response 503 to GET '/lol-chat/v1/blocked-players'

and

000076.931| ALWAYS|            rcp-be-lol-chat| beginning job 'lol-chat.connector.reconnect' with expected delay of seconds 2 after 7.000000 seconds
000076.933| ALWAYS|            rcp-be-lol-chat| Beginning authentication with chat server
000076.935| ALWAYS|            rcp-be-lol-chat| authenticating with the chat service...
000077.187| ALWAYS|            rcp-be-lol-chat| chat connection state change : Session closed, possibly due to error (4)
000077.188|   WARN|            rcp-be-lol-chat| closed chat session with enum 'XMPP version error'
000077.190| ALWAYS|            rcp-be-lol-chat| disconnected from the chat service because 'XMPP version error'...
000077.193|   WARN|            rcp-be-lol-chat| chat session disconnected - XMPP version error
000077.195|  ERROR|            rcp-be-lol-chat| chat server authentication failed with code 3: 'XMPP version error'

Launcher version is V10.23.343.2581.

Any idea how to fix this XMPP version error ? If you need more info/logs feel free to ask. And thanks for the job so far!

henricazottes avatar Nov 19 '20 15:11 henricazottes

I've found this thread on reddit which says to change how the app is started by addind options like so:

$WINEPREFIX/drive_c/Riot Games/Riot Client/RiotClientServices.exe --launch-product=league_of_legends --launch-patchline=live

It seems it was integrated in the snap and then reverted with commit 2f8e889829c41de3f6b223091b11d8be60f0db0b.

Is it sure it's not causing chat problems ? (I'm not used to snap development, I can't try easily as file are read only)

henricazottes avatar Nov 20 '20 09:11 henricazottes

That change caused issue #154, anyways I'll investigate this later today.

mmtrt avatar Nov 20 '20 10:11 mmtrt

do you have old launcher or new one? chat seem to load fine here in client on fresh install.

mmtrt avatar Nov 20 '20 14:11 mmtrt

I have the new one I guess, it looks like this :

image

Could you clarify your process for the fresh install? I may have done something wrong mixing how tos here and there. I tried to install it twice and had the same result in the end.

henricazottes avatar Nov 20 '20 17:11 henricazottes

That's old launcher, try purge remove league snap then reinstall it.

snap remove --purge leagueoflegends

mmtrt avatar Nov 20 '20 17:11 mmtrt

My process:

  • snap install --devmode --edge leagueoflegends
  • run League of Legend shortcut, a window opens with a loading, disappear and another one appear with region selection where I select EUW
  • Then this one appears: image
  • When downloading is done, this launcher opens and continue downloading: image
  • When it's finished, I close the launcher and run the script:
for f in RiotClientServices.exe RiotClientCrashHandler.exe; do
  sudo chmod 0 "$HOME/snap/leagueoflegends/common/.wine/drive_c/Riot Games/Riot Client/$f";
  sudo chown root:root "$HOME/snap/leagueoflegends/common/.wine/drive_c/Riot Games/Riot Client/$f";
done
  • Then run this script:
#!/bin/bash
process=LeagueClientUx.exe
uxpid=$(timeout 2m /bin/bash -c "until pidof ${process}; do sleep 1; done")
if [[ ! -n $uxpid ]]; then
  echo "Could not find process ${process}"
  exit 1
fi
echo "LeagueClientUx pid: ${uxpid}"
port=$(xargs -0 < /proc/${uxpid}/cmdline \
  | sed -n 's/.*--app-port=\([[:digit:]]*\).*/\1/p')
if [[ ! -n $port ]]; then
  echo "Could not find port"
  exit 1
fi
echo "Waiting for port ${port}"

kill -STOP ${uxpid}
timeout 5m /bin/bash -c "
until openssl s_client -connect :${port} <<< Q > /dev/null 2>&1; do
  sleep 1
done"
kill -CONT ${uxpid}
  • It's silent until I run League of Legend shortcut again, then it outputs:
LeagueClientUx pid: 9773
Waiting for port 43335
  • This time, this launcher appears: image

  • It asks to restart but waiting or clicking restart doesn't restart the launcher, so I log in and it start downloading the update: image

  • Right now the chat is already broken: image

And it is like the other tries I made before : I wait for the update to finish but it doesn't fix the chat

henricazottes avatar Nov 20 '20 18:11 henricazottes

This is not needed at all as new launcher works just fine and likely you are breaking it with this,

for f in RiotClientServices.exe RiotClientCrashHandler.exe; do
  sudo chmod 0 "$HOME/snap/leagueoflegends/common/.wine/drive_c/Riot Games/Riot Client/$f";
  sudo chown root:root "$HOME/snap/leagueoflegends/common/.wine/drive_c/Riot Games/Riot Client/$f";
done

Snap now ships this script and loads it as of todays update

Then run this script:

#!/bin/bash
process=LeagueClientUx.exe
uxpid=$(timeout 2m /bin/bash -c "until pidof ${process}; do sleep 1; done")
if [[ ! -n $uxpid ]]; then
  echo "Could not find process ${process}"
  exit 1
fi
echo "LeagueClientUx pid: ${uxpid}"
port=$(xargs -0 < /proc/${uxpid}/cmdline \
  | sed -n 's/.*--app-port=\([[:digit:]]*\).*/\1/p')
if [[ ! -n $port ]]; then
  echo "Could not find port"
  exit 1
fi
echo "Waiting for port ${port}"

kill -STOP ${uxpid}
timeout 5m /bin/bash -c "
until openssl s_client -connect :${port} <<< Q > /dev/null 2>&1; do
  sleep 1
done"
kill -CONT ${uxpid}

mmtrt avatar Nov 20 '20 18:11 mmtrt

This was the missing information! I didn't know which launcher was the newer one, so I though I was on the right way when it was changing after running the script modifying right access.

Thanks a lot, I'm sorry it was such a dumb error. I'll do a PR to modify the readme and add a screenshot of the white launcher :)

henricazottes avatar Nov 21 '20 12:11 henricazottes