Mixaill / galaxy-integration-wargaming

GOG Galaxy 2.0 WGC integration
MIT License
13 stars 5 forks source link

XMPP: empty roster on EU realm #21

Closed FriendsOfGalaxy closed 4 years ago

FriendsOfGalaxy commented 4 years ago

Hey,

WgcXMPP.get_friends hangs on empty roster and this coroutine never ends. Probably due to title error (shown as DEBUG in logs):

2020-01-02 12:40:15,931 - galaxy.api.plugin - INFO - Using local address: 127.0.0.1:52677
2020-01-02 12:40:15,931 - galaxy.api.plugin - INFO - Creating plugin for platform wargaming, version 0.8.3
2020-01-02 12:40:15,974 - galaxy.api.jsonrpc - DEBUG - Received 66 bytes of data
2020-01-02 12:40:15,975 - galaxy.api.jsonrpc - INFO - Handling request: id=0, method=get_capabilities, params={}
2020-01-02 12:40:15,975 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "0", "result": {"platform_name": "wargaming", "features": ["ImportOSCompatibility", "ImportUserPresence", "LaunchGame", "LaunchPlatformClient", "ImportInstalledGames", "UninstallGame", "ImportFriends", "ImportOwnedGames", "InstallGame", "ImportGameTime"], "token": "532b8425-0768-48f4-8734-75331428e1d5"}}
2020-01-02 12:40:16,093 - galaxy.api.jsonrpc - DEBUG - Received 106 bytes of data
2020-01-02 12:40:16,094 - galaxy.api.jsonrpc - INFO - Handling request: id=1, method=initialize_cache, params={'data': '****'}
2020-01-02 12:40:16,094 - galaxy.task_manager - DEBUG - Task manager plugin internal: creating task 0 (tick)
2020-01-02 12:40:16,094 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "1", "result": null}
2020-01-02 12:40:16,195 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data
2020-01-02 12:40:16,195 - galaxy.api.jsonrpc - INFO - Handling request: id=2, method=ping, params={}
2020-01-02 12:40:16,196 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "2", "result": null}
2020-01-02 12:40:16,415 - galaxy.api.jsonrpc - DEBUG - Received 273 bytes of data
2020-01-02 12:40:16,415 - galaxy.api.jsonrpc - INFO - Handling request: id=3, method=init_authentication, params={'stored_credentials': '****'}
2020-01-02 12:40:16,415 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 0 (init_authentication)
2020-01-02 12:40:16,416 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 0 (init_authentication)
2020-01-02 12:40:16,768 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 0 (init_authentication)
2020-01-02 12:40:16,769 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "3", "result": {"user_id": 566014973, "user_name": "EU_Testeusz"}}
2020-01-02 12:40:16,769 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: finished task 0 (init_authentication)
2020-01-02 12:40:17,399 - galaxy.api.jsonrpc - DEBUG - Received 68 bytes of data
2020-01-02 12:40:17,399 - galaxy.api.jsonrpc - INFO - Handling request: id=4, method=import_owned_games, params={}
2020-01-02 12:40:17,399 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 1 (import_owned_games)
2020-01-02 12:40:17,399 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 1 (import_owned_games)
2020-01-02 12:40:17,399 - galaxy.api.jsonrpc - DEBUG - Received 68 bytes of data
2020-01-02 12:40:17,400 - galaxy.api.jsonrpc - INFO - Handling request: id=5, method=import_local_games, params={}
2020-01-02 12:40:17,400 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 2 (import_local_games)
2020-01-02 12:40:17,402 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 2 (import_local_games)
2020-01-02 12:40:17,402 - galaxy.api.jsonrpc - DEBUG - Received 64 bytes of data
2020-01-02 12:40:17,402 - galaxy.api.jsonrpc - INFO - Handling request: id=6, method=import_friends, params={}
2020-01-02 12:40:17,403 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 3 (import_friends)
2020-01-02 12:40:17,460 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 2 (import_local_games)
2020-01-02 12:40:17,460 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 3 (import_friends)
2020-01-02 12:40:17,460 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "5", "result": {"local_games": [{"game_id": "WOT.EU.PRODUCTION", "local_game_state": 3}]}}
2020-01-02 12:40:17,460 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: finished task 2 (import_local_games)
2020-01-02 12:40:17,614 - slixmpp.plugins.base - DEBUG - Loaded Plugin: RFC 6120: Stream Feature: STARTTLS
2020-01-02 12:40:17,618 - slixmpp.plugins.base - DEBUG - Loaded Plugin: RFC 6120: Stream Feature: Resource Binding
2020-01-02 12:40:17,622 - slixmpp.plugins.base - DEBUG - Loaded Plugin: RFC 3920: Stream Feature: Start Session
2020-01-02 12:40:17,626 - slixmpp.plugins.base - DEBUG - Loaded Plugin: RFC 6121: Stream Feature: Roster Versioning
2020-01-02 12:40:17,629 - slixmpp.plugins.base - DEBUG - Loaded Plugin: RFC 6121: Stream Feature: Subscription Pre-Approval
2020-01-02 12:40:17,640 - slixmpp.plugins.base - DEBUG - Loaded Plugin: RFC 6120: Stream Feature: SASL
2020-01-02 12:40:17,648 - slixmpp.plugins.base - DEBUG - Loaded Plugin: XEP-0030: Service Discovery
2020-01-02 12:40:17,648 - slixmpp.plugins.base - DEBUG - Loaded Plugin: XEP-0199: XMPP Ping
2020-01-02 12:40:17,649 - slixmpp.xmlstream.xmlstream - DEBUG - Event triggered: connecting
2020-01-02 12:40:17,657 - slixmpp.xmlstream.resolver - DEBUG - DNS: Not using aiodns, but aiodns is installed.
2020-01-02 12:40:17,657 - slixmpp.xmlstream.resolver - DEBUG - DNS: Querying woteu.xmpp.wargaming.net for AAAA records.
2020-01-02 12:40:17,714 - slixmpp.xmlstream.resolver - DEBUG - DNS: Error retrieving AAAA address info for woteu.xmpp.wargaming.net.
2020-01-02 12:40:17,714 - slixmpp.xmlstream.resolver - DEBUG - DNS: Querying woteu.xmpp.wargaming.net for A records.
2020-01-02 12:40:18,086 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 4 (task_check_for_instances)
2020-01-02 12:40:19,508 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 1 (import_owned_games)
2020-01-02 12:40:19,509 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "4", "result": {"owned_games": [{"game_id": "WOT.EU.PRODUCTION", "game_title": "World of Tanks (EU)", "license_info": {"license_type": "FreeToPlay"}}, {"game_id": "WOWS.EU.PRODUCTION", "game_title": "World of Warships (EU)", "license_info": {"license_type": "FreeToPlay"}}, {"game_id": "WOWP.WW.PRODUCTION", "game_title": "World of Warplanes", "license_info": {"license_type": "FreeToPlay"}}]}}
2020-01-02 12:40:19,510 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: finished task 1 (import_owned_games)
2020-01-02 12:40:19,700 - galaxy.api.jsonrpc - DEBUG - Received 147 bytes of data
2020-01-02 12:40:19,700 - galaxy.api.jsonrpc - INFO - Handling request: id=7, method=start_game_times_import, params={'game_ids': ['WOT.EU.PRODUCTION', 'WOWP.WW.PRODUCTION', 'WOWS.EU.PRODUCTION']}
2020-01-02 12:40:19,700 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 4 (start_game_times_import)
2020-01-02 12:40:19,700 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 5 (start_game_times_import)
2020-01-02 12:40:19,700 - galaxy.api.jsonrpc - DEBUG - Received 153 bytes of data
2020-01-02 12:40:19,701 - galaxy.api.jsonrpc - INFO - Handling request: id=8, method=start_os_compatibility_import, params={'game_ids': ['WOT.EU.PRODUCTION', 'WOWP.WW.PRODUCTION', 'WOWS.EU.PRODUCTION']}
2020-01-02 12:40:19,701 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 5 (start_os_compatibility_import)
2020-01-02 12:40:19,701 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 6 (game times import)
2020-01-02 12:40:19,701 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 5 (start_game_times_import)
2020-01-02 12:40:19,701 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 7 (start_os_compatibility_import)
2020-01-02 12:40:19,701 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "7", "result": null}
2020-01-02 12:40:19,702 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: finished task 4 (start_game_times_import)
2020-01-02 12:40:19,702 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 8 (os compatibility import)
2020-01-02 12:40:19,702 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 7 (start_os_compatibility_import)
2020-01-02 12:40:19,702 - galaxy.api.jsonrpc - INFO - Sending notification: method=game_time_import_success, params={'game_time': GameTime(game_id='WOT.EU.PRODUCTION', time_played=0, last_played_time=0)}
2020-01-02 12:40:19,702 - galaxy.api.jsonrpc - DEBUG - Sending 157 bytes of data
2020-01-02 12:40:19,702 - galaxy.api.jsonrpc - INFO - Sending notification: method=game_time_import_success, params={'game_time': GameTime(game_id='WOWP.WW.PRODUCTION', time_played=0, last_played_time=0)}
2020-01-02 12:40:19,703 - galaxy.api.jsonrpc - DEBUG - Sending 158 bytes of data
2020-01-02 12:40:19,703 - galaxy.api.jsonrpc - INFO - Sending notification: method=game_time_import_success, params={'game_time': GameTime(game_id='WOWS.EU.PRODUCTION', time_played=0, last_played_time=0)}
2020-01-02 12:40:19,703 - galaxy.api.jsonrpc - DEBUG - Sending 158 bytes of data
2020-01-02 12:40:19,703 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "8", "result": null}
2020-01-02 12:40:19,703 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: finished task 5 (start_os_compatibility_import)
2020-01-02 12:40:19,704 - galaxy.api.jsonrpc - INFO - Sending notification: method=os_compatibility_import_success, params={'game_id': 'WOT.EU.PRODUCTION', 'os_compatibility': <OSCompatibility.MacOS|Windows: 3>}
2020-01-02 12:40:19,704 - galaxy.api.jsonrpc - DEBUG - Sending 131 bytes of data
2020-01-02 12:40:19,704 - galaxy.api.jsonrpc - INFO - Sending notification: method=os_compatibility_import_success, params={'game_id': 'WOWP.WW.PRODUCTION', 'os_compatibility': <OSCompatibility.Windows: 1>}
2020-01-02 12:40:19,705 - galaxy.api.jsonrpc - DEBUG - Sending 132 bytes of data
2020-01-02 12:40:19,705 - galaxy.api.jsonrpc - INFO - Sending notification: method=os_compatibility_import_success, params={'game_id': 'WOWS.EU.PRODUCTION', 'os_compatibility': <OSCompatibility.Windows: 1>}
2020-01-02 12:40:19,705 - galaxy.api.jsonrpc - DEBUG - Sending 132 bytes of data
2020-01-02 12:40:19,705 - galaxy.api.jsonrpc - INFO - Sending notification: method=game_times_import_finished, params=None
2020-01-02 12:40:19,706 - galaxy.api.jsonrpc - DEBUG - Sending 75 bytes of data
2020-01-02 12:40:19,706 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 6 (game times import)
2020-01-02 12:40:19,706 - galaxy.api.jsonrpc - INFO - Sending notification: method=os_compatibility_import_finished, params=None
2020-01-02 12:40:19,706 - galaxy.api.jsonrpc - DEBUG - Sending 81 bytes of data
2020-01-02 12:40:19,707 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 8 (os compatibility import)
2020-01-02 12:40:21,214 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data
2020-01-02 12:40:21,214 - galaxy.api.jsonrpc - INFO - Handling request: id=9, method=ping, params={}
2020-01-02 12:40:21,215 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "9", "result": null}
2020-01-02 12:40:26,238 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:40:26,238 - galaxy.api.jsonrpc - INFO - Handling request: id=10, method=ping, params={}
2020-01-02 12:40:26,239 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "10", "result": null}
2020-01-02 12:40:31,290 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:40:31,291 - galaxy.api.jsonrpc - INFO - Handling request: id=11, method=ping, params={}
2020-01-02 12:40:31,291 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "11", "result": null}
2020-01-02 12:40:36,337 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:40:36,338 - galaxy.api.jsonrpc - INFO - Handling request: id=12, method=ping, params={}
2020-01-02 12:40:36,338 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "12", "result": null}
2020-01-02 12:40:38,773 - slixmpp.xmlstream.xmlstream - DEBUG - Connection failed: [WinError 121] The semaphore timeout period has expired
2020-01-02 12:40:38,773 - slixmpp.xmlstream.xmlstream - DEBUG - Event triggered: connection_failed
2020-01-02 12:40:41,409 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:40:41,409 - galaxy.api.jsonrpc - INFO - Handling request: id=13, method=ping, params={}
2020-01-02 12:40:41,409 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "13", "result": null}
2020-01-02 12:40:46,454 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:40:46,455 - galaxy.api.jsonrpc - INFO - Handling request: id=14, method=ping, params={}
2020-01-02 12:40:46,455 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "14", "result": null}
2020-01-02 12:40:48,121 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 4 (task_check_for_instances)
2020-01-02 12:40:48,138 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 9 (task_check_for_instances)
2020-01-02 12:40:51,499 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:40:51,499 - galaxy.api.jsonrpc - INFO - Handling request: id=15, method=ping, params={}
2020-01-02 12:40:51,499 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "15", "result": null}
2020-01-02 12:40:56,546 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:40:56,546 - galaxy.api.jsonrpc - INFO - Handling request: id=16, method=ping, params={}
2020-01-02 12:40:56,546 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "16", "result": null}
2020-01-02 12:41:00,776 - slixmpp.xmlstream.xmlstream - DEBUG - Connection failed: [WinError 121] The semaphore timeout period has expired
2020-01-02 12:41:00,776 - slixmpp.xmlstream.xmlstream - DEBUG - Event triggered: connection_failed
2020-01-02 12:41:00,779 - slixmpp.xmlstream.resolver - DEBUG - DNS: Not using aiodns, but aiodns is installed.
2020-01-02 12:41:00,779 - slixmpp.xmlstream.resolver - DEBUG - DNS: Querying woteu.xmpp.wargaming.net for AAAA records.
2020-01-02 12:41:00,781 - slixmpp.xmlstream.resolver - DEBUG - DNS: Error retrieving AAAA address info for woteu.xmpp.wargaming.net.
2020-01-02 12:41:00,781 - slixmpp.xmlstream.resolver - DEBUG - DNS: Querying woteu.xmpp.wargaming.net for A records.
2020-01-02 12:41:01,612 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
2020-01-02 12:41:01,613 - galaxy.api.jsonrpc - INFO - Handling request: id=17, method=ping, params={}
2020-01-02 12:41:01,613 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "17", "result": null}
2020-01-02 12:41:06,664 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data
Mixaill commented 4 years ago

Nope, after that it performs A query and then it should works.

Maybe your roster is really empty, in this case it may really hang, because I am waiting for the roster to contain at least one result.

But this is no longer necessary because GLX periodically runs both functions (users and presence)

Mixaill commented 4 years ago

Please try https://github.com/Mixaill/galaxy-integration-wargaming/commit/6e4f4ba2507f92116fba36d005dee3ed39df7216

FriendsOfGalaxy commented 4 years ago

OK, so the problem is no friends are found. DEBUG - Sending data: {"jsonrpc": "2.0", "id": "20", "result": {"friend_info_list": []}}

How it is supposed to work? I'm on EU realm and has added friend in WOT(EU). We can chat in the game. His account is logged in EU as well.

Mixaill commented 4 years ago

Well, need to test it on EU. Maybe it works a slightly different.

Mixaill commented 4 years ago

2020-01-02 12:41:00,776 - slixmpp.xmlstream.xmlstream - DEBUG - Connection failed: [WinError 121] The semaphore timeout period has expired that is the issue

Mixaill commented 4 years ago

It should connect at least with https://github.com/Mixaill/galaxy-integration-wargaming/commit/4763196fd3f9e9365f967af15778296fae31dd52

Still not sure about domain in wgc_constants.py, it could be

EU: c2s.xmpp-wot-eu.wargaming.net NA: c2s.xmpp-wot-na.wargaming.net ASIA: c2s.wotasia.xmpp.wargaming.net

I'll try to test it tonight.

Mixaill commented 4 years ago

fixed in 4763196fd3f9e9365f967af15778296fae31dd52 and 4f6f8a1b2b97254991a69034daeb5d5405d8da5e