Windows200000 / TwitchDropsMiner-updated

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

MinerException: GQL error: [{'message': 'PersistedQueryNotFound'}] #143

Closed axi92 closed 3 months ago

axi92 commented 4 months ago

Description

Runs for weeks and then exits random. commit: 84f4882

To Reproduce

Random

Expected behavior

Should not exit

Observed behavior

Exits

Screenshots

No response

Logs

01:50:44: Fatal error encountered: 01:50:44: 01:50:44: Traceback (most recent call last): 01:50:44: File "main.py", line 160, in main 01:50:44: File "twitch.py", line 772, in run 01:50:44: File "twitch.py", line 817, in _run 01:50:44: File "twitch.py", line 1670, in fetch_inventory 01:50:44: File "asyncio\tasks.py", line 571, in _wait_for_one 01:50:44: File "twitch.py", line 1608, in fetch_campaigns 01:50:44: File "twitch.py", line 1575, in gql_request 01:50:44: exceptions.MinerException: GQL error: [{'message': 'PersistedQueryNotFound'}] 01:50:44: 01:50:44: Exiting... 01:50:45: 01:50:45: Application Terminated. 01:50:45: Close the window to exit the application.

OS

Ubuntu 22 with Wine using windows Exe

Build

.exe

Version/Commit

84f4882

Additional context

No response

5wi5wi commented 4 months ago

same on windows 11

weltonbraga commented 3 months ago

On windows 10. Same error appears on start:

2024-07-22 15:26:30: Starting: Twitch Drops Miner
2024-07-22 15:26:35: Fatal error encountered:

2024-07-22 15:26:35: Traceback (most recent call last):
  File "C:\TwitchDropsMiner-updated\main.py", line 160, in main
    await client.run()
  File "C:\TwitchDropsMiner-updated\twitch.py", line 772, in run
    await self._run()
  File "C:\TwitchDropsMiner-updated\twitch.py", line 817, in _run
    await self.fetch_inventory()
  File "C:\TwitchDropsMiner-updated\twitch.py", line 1670, in fetch_inventory
    chunk_campaigns_data = await chunk_coro
  File "C:\Python\Python310\lib\asyncio\tasks.py", line 571, in _wait_for_one
    return f.result()  # May raise f.exception().
  File "C:\TwitchDropsMiner-updated\twitch.py", line 1608, in fetch_campaigns
    response_list: list[JsonType] = await self.gql_request(
  File "C:\TwitchDropsMiner-updated\twitch.py", line 1575, in gql_request
    raise MinerException(f"GQL error: {response_json['errors']}")
exceptions.MinerException: GQL error: [{'message': 'PersistedQueryNotFound'}]

2024-07-22 15:26:35: Exiting...
2024-07-22 15:26:35:
Application Terminated.
Close the window to exit the application.
Windows200000 commented 3 months ago

yeah, it used to be occasional, but not I could reproduce it and find a fix. I'm adding the fix now, I will make an entire release for it, but it should be in in-dev within like 5mins.

axi92 commented 3 months ago

Release with fix https://github.com/Windows200000/TwitchDropsMiner-updated/releases/tag/v15.8.0