LordBoos / discord_game

Home Assistant custom component to get online and game status of Discord users
MIT License
57 stars 9 forks source link

HA Restarts with Errors #36

Closed riotm0de closed 2 years ago

riotm0de commented 3 years ago

As soon as i insert the discord_game in config. i get randomly "crashes" of HA and ends in auto. restarts. :(

also it had problems with status etc. a friend was online but showed offline in HA. online friends showed offline as soon as i got into the edit mode of a button card.

Latest release, installed a fresh HA.

Any suggestions ? Thanks!

LordBoos commented 3 years ago

Hello, I have not encountered this issue and nobody else reported it. Can you enable DEBUG logging level in HA and post log here?

riotm0de commented 3 years ago

hi, thanks for quick response! i cleared some errors out of HA and will come back with updates regarding my restarts.

but for my second problem. HA always see the state of friends Offline, although he is playing/online and i see the game he's playing.

see here: https://ibb.co/yYkN4pP https://ibb.co/GQBhd8H

2021-08-31 20:05:07 INFO (MainThread) [discord.gateway] Shard ID None has sent the IDENTIFY payload.
2021-08-31 20:05:08 INFO (MainThread) [discord.gateway] Shard ID None has connected to Gateway: ["gateway-prd-main-bbhc",{"micros":172842,"calls":["discord-sessions-blue-prd-2-175",{"micros":171573,"calls":["start_session",{"micros":164419,"calls":["api-prd-main-9l79",{"micros":160784,"calls":["get_user",{"micros":118303},"add_authorized_ip",{"micros":2433},"get_guilds",{"micros":5134},"coros_wait",{"micros":0}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":6406,"calls":[]}]}]}] (Session ID: 061aa5c64bffc072a05bc1760ba17686).
2021-08-31 20:05:12 DEBUG (MainThread) [custom_components.discord_game.sensor] FOUND discord app by name = [{'description': '', 'developers': [{'id': 'xxxxxxxxxxxxxxxxxxxx', 'name': 'Crytek GmbH'}], 'executables': [{'is_launcher': False, 'name': 'hunt showdown/hunt.exe', 'os': 'win32'}], 'guild_id': '350201607788429323', 'hook': True, 'icon': '52ae10d11da1104b8081bfd9c4b1f803', 'id': '422169383972896768', 'name': 'Hunt: Showdown', 'publishers': [{'id': '521816652262670336', 'name': 'Crytek GmbH'}], 'summary': '', 'third_party_skus': [{'distributor': 'steam', 'id': '594650', 'sku': '594650'}], 'verify_key': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}]
2021-08-31 20:05:12 DEBUG (MainThread) [custom_components.discord_game.sensor] FOUND Steam app by name = {'appid': 594650, 'name': 'Hunt: Showdown'}
2021-08-31 20:05:12 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_231x87.jpg?t=1630433112] exists
2021-08-31 20:05:14 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_231x87.jpg?t=1630433112] response status = 200
2021-08-31 20:05:14 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_467x181.jpg?t=1630433112] exists
2021-08-31 20:05:15 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_467x181.jpg?t=1630433112] response status = 200
2021-08-31 20:05:15 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_616x353.jpg?t=1630433112] exists
2021-08-31 20:05:17 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
2021-08-31 20:05:17 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_616x353.jpg?t=1630433112] response status = 200
2021-08-31 20:05:17 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/header.jpg?t=1630433112] exists
2021-08-31 20:05:18 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/header.jpg?t=1630433112] response status = 200
2021-08-31 20:05:18 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/hero_capsule.jpg?t=1630433112] exists
2021-08-31 20:05:18 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/hero_capsule.jpg?t=1630433112] response status = 200
2021-08-31 20:05:18 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_600x900.jpg?t=1630433112] exists
2021-08-31 20:05:20 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_600x900.jpg?t=1630433112] response status = 200
2021-08-31 20:05:20 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_hero.jpg?t=1630433112] exists
2021-08-31 20:05:21 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_hero.jpg?t=1630433112] response status = 200
2021-08-31 20:05:21 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/logo.jpg?t=1630433112] exists
2021-08-31 20:05:22 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/logo.jpg?t=1630433112] response status = 404
2021-08-31 20:05:22 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/page_bg_raw.jpg?t=1630433112] exists
2021-08-31 20:05:23 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/page_bg_raw.jpg?t=1630433112] response status = 200
2021-08-31 20:05:23 DEBUG (MainThread) [custom_components.discord_game.sensor] FOUND discord app by application_id = [{'aliases': ['Diablo 3', ' 
디아블로 III'], 'description': 'Diablo III returns to the world of Sanctuary twenty years after the events of Diablo II with a new generation of 
heroes that must defeat the demonic threat from Hell.', 'developers': [{'id': '521816523430428673', 'name': 'Blizzard Entertainment'}], 'executables': [{'is_launcher': False, 'name': 'diablo iii.exe', 'os': 'win32'}, {'is_launcher': False, 'name': 'diablo iii.app', 'os': 'darwin'}, {'is_launcher': False, 'name': 'diablo iii64.exe', 'os': 'win32'}], 'hook': True, 'icon': 'ea12a992732b0b6d521b109b88e60b9b', 'id': '358425751197974528', 'name': 'Diablo III', 'overlay': True, 'publishers': [{'id': '521816523430428673', 'name': 'Blizzard Entertainment'}], 'splash': '3ceef15c08000c6c0272dc22a29616cb', 'summary': 'Diablo III returns to the world of Sanctuary twenty years after the events of Diablo II with a new generation of heroes that must defeat the demonic threat from Hell.', 'third_party_skus': [{'distributor': 'battlenet', 'id': None, 'sku': None}, {'distributor': 'battlenet', 'id': 'D3', 'sku': 'D3'}], 'verify_key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}]
2021-08-31 20:05:23 DEBUG (MainThread) [custom_components.discord_game.sensor] FOUND discord app by name = [{'aliases': ['Diablo 3', '디아블로 III'], 'description': 'Diablo III returns to the world of Sanctuary twenty years after the events of Diablo II with a new generation of heroes that must defeat the demonic threat from Hell.', 'developers': [{'id': '521816523430428673', 'name': 'Blizzard Entertainment'}], 'executables': [{'is_launcher': False, 'name': 'diablo iii.exe', 'os': 'win32'}, {'is_launcher': False, 'name': 'diablo iii.app', 'os': 'darwin'}, {'is_launcher': False, 'name': 'diablo iii64.exe', 'os': 'win32'}], 'hook': True, 'icon': 'ea12a992732b0b6d521b109b88e60b9b', 'id': '358425751197974528', 'name': 'Diablo III', 'overlay': True, 'publishers': [{'id': '521816523430428673', 'name': 'Blizzard Entertainment'}], 'splash': '3ceef15c08000c6c0272dc22a29616cb', 'summary': 'Diablo III returns to the world of Sanctuary twenty years after the events of Diablo II with a new generation of heroes that must defeat the demonic threat from Hell.', 'third_party_skus': [{'distributor': 'battlenet', 'id': None, 'sku': None}, {'distributor': 'battlenet', 'id': 'D3', 'sku': 'D3'}], 'verify_key': '81dbd2d08e257433cb2fc8548c1dd63e0a02fbfd4a59059c1c0a4af5b62766b0'}]
2021-08-31 20:05:24 DEBUG (MainThread) [custom_components.discord_game.sensor] FOUND discord app by name = [{'description': '', 'developers': [{'id': '521816652262670336', 'name': 'Crytek GmbH'}], 'executables': [{'is_launcher': False, 'name': 'hunt showdown/hunt.exe', 'os': 'win32'}], 'guild_id': '350201607788429323', 'hook': True, 'icon': '52ae10d11da1104b8081bfd9c4b1f803', 'id': '422169383972896768', 'name': 'Hunt: Showdown', 'publishers': [{'id': '521816652262670336', 'name': 'Crytek GmbH'}], 'summary': '', 'third_party_skus': [{'distributor': 'steam', 'id': '594650', 'sku': '594650'}], 'verify_key': '23bbb989a4dc2e7a416595bd7999e8e6d5fbbc920fd873739a191b0735426510'}]
2021-08-31 20:05:24 DEBUG (MainThread) [custom_components.discord_game.sensor] FOUND Steam app by name = {'appid': 594650, 'name': 'Hunt: Showdown'}
2021-08-31 20:05:24 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_231x87.jpg?t=1630433124] exists
2021-08-31 20:05:25 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_231x87.jpg?t=1630433124] response status = 200
2021-08-31 20:05:25 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_467x181.jpg?t=1630433124] exists
2021-08-31 20:05:27 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_467x181.jpg?t=1630433124] response status = 200
2021-08-31 20:05:27 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_616x353.jpg?t=1630433124] exists
2021-08-31 20:05:28 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/capsule_616x353.jpg?t=1630433124] response status = 200
2021-08-31 20:05:28 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/header.jpg?t=1630433124] exists
2021-08-31 20:05:29 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/header.jpg?t=1630433124] response status = 200
2021-08-31 20:05:29 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/hero_capsule.jpg?t=1630433124] exists
2021-08-31 20:05:30 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/hero_capsule.jpg?t=1630433124] response status = 200
2021-08-31 20:05:30 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_600x900.jpg?t=1630433124] exists
2021-08-31 20:05:31 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_600x900.jpg?t=1630433124] response status = 200
2021-08-31 20:05:31 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_hero.jpg?t=1630433124] exists
2021-08-31 20:05:32 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/library_hero.jpg?t=1630433124] response status = 200
2021-08-31 20:05:32 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/logo.jpg?t=1630433124] exists
2021-08-31 20:05:32 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/logo.jpg?t=1630433124] response status = 404
2021-08-31 20:05:32 DEBUG (MainThread) [custom_components.discord_game.sensor] Checking if web resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/page_bg_raw.jpg?t=1630433124] exists
2021-08-31 20:05:33 DEBUG (MainThread) [custom_components.discord_game.sensor] Resource [https://cdn.cloudflare.steamstatic.com/steam/apps/594650/page_bg_raw.jpg?t=1630433124] response status = 200
riotm0de commented 3 years ago

i commented out discord-game in the configuration.yaml and i have no restarts so far. something is happening... the whole gui is way more responsive again. i would love to use discord-game but dunno why the restarts occur.

LordBoos commented 3 years ago

Is the bot present on your server when it reports your friend as offline? Did you gave the bot required Privileged Gateway Intents as stated in the readme?

riotm0de commented 3 years ago

yes the bot is present on the server / online and my friend is offline. i gave him Presence Intent and Memebers Intent (Gateway)

LordBoos commented 3 years ago

Can you enable debug logging form whole home assistant to see if there are any errors? I cannot reproduce your issues myself.

riotm0de commented 3 years ago

i sent you an email! Info: i added "discord_game" config again and restarted and it ends in constant boot-loops. i see lovelace 2 seconds and then crash/restart. without discord_game no problems for 12h.

LordBoos commented 2 years ago

This was resolved in email communication. Users device running HA was behaving incorrectly, he upgraded and issue is resolved.