DevilXD / TwitchDropsMiner

An app that allows you to AFK mine timed Twitch drops, with automatic drop claiming and channel switching.
MIT License
1.44k stars 149 forks source link

GQL "service error" #347

Closed LeaLangley closed 6 months ago

LeaLangley commented 8 months ago

Version: d780445

Error:

21:04:30: Fatal error encountered: 21:04:30: 21:04:30: Traceback (most recent call last): 21:04:30: File "main.py", line 158, in main 21:04:30: File "twitch.py", line 764, in run 21:04:30: File "twitch.py", line 806, in _run 21:04:30: File "twitch.py", line 1599, in fetch_inventory 21:04:30: File "twitch.py", line 1548, in gql_request 21:04:30: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['currentUser', 'inventory', 'gameEventDrops']}, {'message': 'service error', 'path': ['currentUser', 'inventory', 'dropCampaignsInProgress']}] 21:04:30: 21:04:30: Exiting... 21:04:31: 21:04:31: Application Terminated. 21:04:31: Close the window to exit the application.

Note: Happens now on every start , cleared the folder and re extracted the app but getting still the error.

JonJaded commented 8 months ago

16:06:12: Fatal error encountered: 16:06:12: 16:06:12: Traceback (most recent call last): 16:06:12: File "main.py", line 158, in main 16:06:12: File "twitch.py", line 764, in run 16:06:12: File "twitch.py", line 806, in _run 16:06:12: File "twitch.py", line 1599, in fetch_inventory 16:06:12: File "twitch.py", line 1548, in gql_request 16:06:12: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['currentUser', 'inventory', 'gameEventDrops']}, {'message': 'service error', 'path': ['currentUser', 'inventory', 'dropCampaignsInProgress']}]

Came to report the exact same issue. I think the app keeps some cache data somewhere, I'll try clearing that too.

LeaLangley commented 8 months ago

i think twitch changed something

Screenshot 2023-11-01 at 21-20-11 Twitch Screenshot 2023-11-01 at 21-21-05 Twitch

GialAckbar commented 8 months ago

Twitch Drops were simply down. Restart your bots, and it should work again.

LeaLangley commented 8 months ago

Twitch Drops were simply down. Restart your bots, and it should work again.

yep u are right , its back now Screenshot 2023-11-01 at 21-22-29 Twitch

JonJaded commented 8 months ago

Could it be feasable to add a catch for whenever this occurs? ANd then a retry timer in like... say every 5 minutes?

EDIT: Also could, would it be possible to add a switch that makes the app close itself on error? Don't think I would've known if I hadn't been tinkering with the settings.

DevilXD commented 8 months ago

Hello. "Service error" means the service is temporarily down, and there isn't much I can do about it. Handling such an error isn't as simple as retrying the request, as downtimes usually last longer than mere seconds, or even minutes. The miner's internal logic isn't prepared to just "go idle" and recheck every so often. Such a functionality would require a dynamic timeouts system, instead of the current static one.

This seems as one of the things that #220 should take care of, but that puts it into a far future. For now, the solution is to just verify the drops system is available again, and then restart the miner manually.

epsgerry02 commented 8 months ago

Twitch Drops were simply down. Restart your bots, and it should work again.

yep u are right , its back now Screenshot 2023-11-01 at 21-22-29 Twitch

Excuse me. How do I restart? I restarted my computer and the drops miner, but the page is still empty.

DevilXD commented 8 months ago

@epsgerry02 I think you've misunderstood. The error means that the Twitch website itself is having server issues, and there's nothing you can do on your side to help it, other than waiting and checking https://www.twitch.tv/drops/inventory every so often, to see if the list of drops you've claimed loads again. If it does, and does so reliably (don't rely on the page loading correctly only once, refresh 2-3 times to be sure), then restarting the miner will "fix" the issue. Restarting it before that won't help.

allanf181 commented 8 months ago
22:54:24: Fatal error encountered:
22:54:24: 
22:54:24: Traceback (most recent call last):
22:54:24:   File "main.py", line 158, in main
22:54:24:   File "twitch.py", line 764, in run
22:54:24:   File "twitch.py", line 817, in _run
22:54:24:   File "inventory.py", line 225, in claim
22:54:24:   File "inventory.py", line 131, in claim
22:54:24:   File "inventory.py", line 147, in _claim
22:54:24:   File "twitch.py", line 1548, in gql_request
22:54:24: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['claimDropRewards']}]
22:54:24: 
22:54:24: Exiting...
22:54:24: 
22:54:24: Application Terminated.
22:54:24: Close the window to exit the application.

on start app version https://github.com/DevilXD/TwitchDropsMiner/commit/725d54a1ca29405013e52649671ac25003453694

epsgerry02 commented 8 months ago
22:54:24: Fatal error encountered:
22:54:24: 
22:54:24: Traceback (most recent call last):
22:54:24:   File "main.py", line 158, in main
22:54:24:   File "twitch.py", line 764, in run
22:54:24:   File "twitch.py", line 817, in _run
22:54:24:   File "inventory.py", line 225, in claim
22:54:24:   File "inventory.py", line 131, in claim
22:54:24:   File "inventory.py", line 147, in _claim
22:54:24:   File "twitch.py", line 1548, in gql_request
22:54:24: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['claimDropRewards']}]
22:54:24: 
22:54:24: Exiting...
22:54:24: 
22:54:24: Application Terminated.
22:54:24: Close the window to exit the application.

on start app version 725d54a

same error

Daiidalus commented 7 months ago

The bug is still prevalent btw

11:57:42: Fatal error encountered: 11:57:42: 11:57:42: Traceback (most recent call last): 11:57:42: File "main.py", line 175, in 11:57:42: client.print(_("status", "terminated")) 11:57:42: File "asyncio\base_events.py", line 616, in run_until_complete 11:57:42: File "twitch.py", line 759, in run 11:57:42: return -1 11:57:42: File "twitch.py", line 812, in _run 11:57:42: self.save() 11:57:42: File "inventory.py", line 202, in claim 11:57:42: ( 11:57:42: File "inventory.py", line 120, in claim 11:57:42: File "inventory.py", line 136, in _claim 11:57:42: self.campaign._on_claim() 11:57:42: File "twitch.py", line 1534, in gql_request 11:57:42: json=ops, 11:57:42: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['claimDropRewards']}] 11:57:42: 11:57:42: Exiting... 11:57:43: 11:57:43: Application Terminated. 11:57:43: Close the window to exit the application.

matarife123 commented 7 months ago

work now for me :S

Kimarnic commented 7 months ago

23:04:14: Fatal error encountered: 23:04:14: 23:04:14: Traceback (most recent call last): 23:04:14: File "main.py", line 158, in main 23:04:14: File "twitch.py", line 764, in run 23:04:14: File "twitch.py", line 820, in _run 23:04:14: File "inventory.py", line 225, in claim 23:04:14: File "inventory.py", line 131, in claim 23:04:14: File "inventory.py", line 147, in _claim 23:04:14: File "twitch.py", line 1563, in gql_request 23:04:14: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['claimDropRewards']}] 23:04:14: 23:04:14: Exiting... 23:04:14: 23:04:14: Application Terminated. 23:04:14: Close the window to exit the application.

Doesn't work for me... v16.dev.1e31957

DevilXD commented 7 months ago

Just as a note here, this will keep happening, until there are steps taken to mitigate it. There's no value in having this reported 5 times to me, if the reason is already know, and a fix idea already planned. The only thing that'd help me now, is having enough time to sit down to this properly, which I don't have now.

For now, as mentioned higher up here, use these as mitigation steps: https://github.com/DevilXD/TwitchDropsMiner/issues/347#issuecomment-1790384525

DevilXD commented 7 months ago

I was able to reproduce this issue on my end. Based on the findings, it seems to be caused not only by server instabilities, but also by a new directive from here: https://help.twitch.tv/s/article/mission-based-drops?language=en_US#claiming

If you are unable to claim the Drop in time, you will be able to claim it from the Drops Inventory page until 24 hours after the Drops campaign has ended.

https://github.com/DevilXD/TwitchDropsMiner/commit/21ad099696ad1ebe8ea67726e9556473cf7b4d18 attempts to take this information into account, so you should see less "service error" crashes in the latest development build.

DevilXD commented 6 months ago

Since no more reports are present, I think I can close this one now.