Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Data #161

Closed
dogodogowoof opened this issue Aug 2, 2024 · 57 comments
Closed

Fatal error: Data #161

dogodogowoof opened this issue Aug 2, 2024 · 57 comments
Labels
Bug Something isn't working Critical For Critical issues that prevent the application from working Solved The issue has been resolved

Comments

@dogodogowoof
Copy link

Description

TDM Fatal error encountered when launching

To Reproduce

  1. Launch TDM

Expected behavior

TDM launches and starts looking for drops

Observed behavior

TDM encounters a Fatal error and stops functioning

Screenshots

image

Logs

14:08:31: Fatal error encountered:
14:08:31:
14:08:31: Traceback (most recent call last):
14:08:31: File "main.py", line 160, in main
14:08:31: File "twitch.py", line 772, in run
14:08:31: File "twitch.py", line 915, in _run
14:08:31: File "channel.py", line 286, in update_stream
14:08:31: File "channel.py", line 254, in get_stream
14:08:31: KeyError: 'data'
14:08:31:
14:08:31: Exiting...
14:08:31:
14:08:31: Application Terminated.
14:08:31: Close the window to exit the application.

OS

Windows 10

Build

.exe

Version/Commit

v15.8.0 (69d73be)

Additional context

First encountered the issue while running the application normally, but since then, behavior follows as above.

@dogodogowoof dogodogowoof added the Bug Something isn't working label Aug 2, 2024
@zelda0079
Copy link

me too

@Kimarnic
Copy link

Kimarnic commented Aug 2, 2024

Happens to me as well

@Serray
Copy link

Serray commented Aug 2, 2024

Same for me, I was using an older version when the error first occured. Updated to newest version and the error was gone for about 1 day, now it occurs again. Switching to an older version doesn't help. Im running on Linux.

@flamedance58
Copy link

Using the newest edition of the program and it was idling for a bit and suddenly got the same error.

13:51:48: Fatal error encountered:
13:51:48: 
13:51:48: Traceback (most recent call last):
13:51:48:   File "main.py", line 160, in main
13:51:48:   File "twitch.py", line 772, in run
13:51:48:   File "twitch.py", line 817, in _run
13:51:48:   File "twitch.py", line 1644, in fetch_inventory
13:51:48: KeyError: 'data'
13:51:48: 
13:51:48: Exiting...
13:51:49: 
13:51:49: Application Terminated.
13:51:49: Close the window to exit the application.

@chicken647
Copy link

Same issue here

13:55:21: Fatal error encountered:
13:55:21:
13:55:21: Traceback (most recent call last):
13:55:21: File "main.py", line 160, in main
13:55:21: File "twitch.py", line 772, in run
13:55:21: File "twitch.py", line 915, in _run
13:55:21: File "channel.py", line 286, in update_stream
13:55:21: File "channel.py", line 254, in get_stream
13:55:21: KeyError: 'data'
13:55:21:
13:55:21: Exiting...
13:55:22:
13:55:22: Application Terminated.
13:55:22: Close the window to exit the application.

@T4bletopG4mes
Copy link

Its either related to Xdefiant or Overwatch 2 since those are the only ones I have active.

@T4bletopG4mes
Copy link

Its 100% Xdefiant, so remove it if you have other drops till it gets fixed.

@zelda0079
Copy link

Its 100% Xdefiant, so remove it if you have other drops till it gets fixed.

No, I set it to exclude, same result, I think twitch drop is updated.

@T4bletopG4mes
Copy link

Its very likely something on twitch's end

@T4bletopG4mes
Copy link

The bug is no longer there for me but the reward shows 95% in my twitch inventory and 100% in the app so it basically cant get claimed via the app.

@zelda0079
Copy link

Work again😂

@T4bletopG4mes
Copy link

Good old twitch

@T4bletopG4mes
Copy link

App progress doesnt seem to be syncing with twitch and even though the app is counting progress up, it doesnt actually do anything (at least from what I have noticed) .

@Serray
Copy link

Serray commented Aug 3, 2024

App progress doesnt seem to be syncing with twitch and even though the app is counting progress up, it doesnt actually do anything (at least from what I have noticed) .

For me it was working again as i restarted 3 hours ago, but after 2 hours it is back to the state where i cant get it to work. I farmed Xdefiant drops, and made progress both in the TDM and on twitch, so it was neither soley Xdefiant nor twitch.

@zelda0079
Copy link

There is error again😂

@Serray
Copy link

Serray commented Aug 3, 2024

App progress doesnt seem to be syncing with twitch and even though the app is counting progress up, it doesnt actually do anything (at least from what I have noticed) .

For me it was working again as i restarted 3 hours ago, but after 2 hours it is back to the state where i cant get it to work. I farmed Xdefiant drops, and made progress both in the TDM and on twitch, so it was neither soley Xdefiant nor twitch.

And now it is working again.... Pretty strange

@Sparh4wk
Copy link

Sparh4wk commented Aug 3, 2024

still the same error

image

@zelda0079
Copy link

And now it is working again.... Pretty strange

No, it is still not working.

@wclxb
Copy link

wclxb commented Aug 3, 2024

having the same issue aswell

@DealsBeam
Copy link

07:52:18: Fatal error encountered:
07:52:18:
07:52:18: Traceback (most recent call last):
07:52:18: File "channel.py", line 250, in get_stream
07:52:18: File "twitch.py", line 1354, in gql_request
07:52:18: exceptions.MinerException: GQL error: Unauthorized: The "Authorization" token is invalid.
07:52:18:
07:52:18: The above exception was the direct cause of the following exception:
07:52:18:
07:52:18: Traceback (most recent call last):
07:52:18: File "main.py", line 153, in main
07:52:18: File "twitch.py", line 570, in run
07:52:18: File "twitch.py", line 719, in run
07:52:18: File "channel.py", line 287, in update_stream
07:52:18: File "channel.py", line 254, in get_stream
07:52:18: exceptions.MinerException: Channel: odysfox

07:52:18:
07:52:18: Exiting...
07:52:19:
07:52:19: Application Terminated.
07:52:19: Close the window to exit the application.

@Serray
Copy link

Serray commented Aug 3, 2024

And now it is working again.... Pretty strange

No, it is still not working.

It was, but only for 10 minutes...

@chicken647
Copy link

App progress doesnt seem to be syncing with twitch and even though the app is counting progress up, it doesnt actually do anything (at least from what I have noticed) .

For me it was working again as i restarted 3 hours ago, but after 2 hours it is back to the state where i cant get it to work. I farmed Xdefiant drops, and made progress both in the TDM and on twitch, so it was neither soley Xdefiant nor twitch.

While the application was errored out, I removed XDefiant from the settings and let it sit. After ~10 minutes, the application started working again on it's own. Alternatively you can try restarting the application after removing it.

here is my priority settings that are currently working:
"priority": [ "Rust", "Escape from Tarkov: Arena", "Arena Breakout: Infinite", "Arena Breakout", "Tom Clancy's Rainbow Six Siege", "Escape from Tarkov", "Call of Duty: Modern Warfare III", "Apex Legends", "VALORANT", "Sea of Thieves", "Call of Duty: Warzone", "Pok\u00e9mon GO", "Once Human", "Dying Light 2: Stay Human", "War Thunder", "PUBG: BATTLEGROUNDS", "Pok\u00e9mon Trading Card Game", "No Man's Sky", "Call of Duty: Warzone Mobile", "Destiny 2", "Far Cry 6", "Don't Starve Together", "Dead by Daylight", "Rocket League", "XERA: Survival", "Assassin's Creed Mirage", "THE FINALS", "Clash of Clans", "TerraTech Worlds", "Halo Infinite", "Halo: The Master Chief Collection", "BattleBit Remastered", "World of Warcraft", "The Elder Scrolls Online", "Brawlhalla", "BattleCore Arena", "Stream Raiders", "Overwatch 2", "Pok\u00e9mon UNITE", "Skull and Bones", "Snowbreak: Containment Zone", "Vampire: The Masquerade - Bloodhunt", "Trove", "BATTLE CRUSH", "Zombie Within", "PAYDAY 3", "The Crew: Motorfest", "Avatar: Frontiers of Pandora", "The First Descendant", "Killer Klowns from Outer Space: The Game" ],

@zelda0079
Copy link

And now it is working again.... Pretty strange

No, it is still not working.

It was, but only for 10 minutes...

It is working again now, I hope this time is really working😂

@Serray
Copy link

Serray commented Aug 3, 2024

And now it is working again.... Pretty strange

No, it is still not working.

It was, but only for 10 minutes...

It is working again now, I hope this time is really working😂

Yes, but again broke down after 2 hours...

@zelda0079
Copy link

And now it is working again.... Pretty strange

No, it is still not working.

It was, but only for 10 minutes...

It is working again now, I hope this time is really working😂

Yes, but again broke down after 2 hours...

again😭

@zelda0079
Copy link

TDM can't even get the game list now.

@chicken647
Copy link

And now it is working again.... Pretty strange

No, it is still not working.

It was, but only for 10 minutes...

It is working again now, I hope this time is really working😂

Yes, but again broke down after 2 hours...

again😭

Mine is still working after 3+ Hours of constant drop-getting; Try clearing your drops miner settings file and only selecting one drop. If it keeps failing, it could be an issue with that specific twitch drop.

It popped out this error ~30 minutes ago but, drop progress continued successfully--

10:27:08: Progress: 208/270 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
10:28:10: Progress: 209/270 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
10:28:20: ERROR: Exception in task
10:28:20: Traceback (most recent call last):
10:28:20: File "utils.py", line 139, in wrapper
10:28:20: File "twitch.py", line 1049, in _watch_loop
10:28:20: File "channel.py", line 390, in send_watch
10:28:20: KeyError: 'data'
10:50:24: TarkovRuhub goes OFFLINE, switching...
10:50:24: Watching: ewc_gold

I'm not sure what drop you are trying to progress but, try redownloading the exe and replacing it in your folder, try closing the application, deleting your settings.json file and reopening it, try only having one drop selected, try manually watching like 10 minutes of the stream, try removing the proxy (if you are using one) if all else fails-- maybe it's an issue with the drop itself or twitch etc

image
image

@T4bletopG4mes
Copy link

When having a partner channel picked, the app changes between partners-only and category-wide a lot, so thats definitely causing some problems.
image

@HiroLeWeeb
Copy link

HiroLeWeeb commented Aug 4, 2024

Here's the log I managed to get, happened yesterday for the same EFT:Arena twitch drops but was too quick to save a log of it. only seems to happen when this particular drop is being mined (at least for me, don't have anything else to farm atm to test out).
Also, sometimes it throws the second "TypeError: string indices must be integers" error at program startup, but restarting it solves it, sometimes. (50% of the time, it works every time)

16:00:00: No active campaigns to mine drops for. Waiting for an active campaign...
16:45:31: Watching: TarkovRuhub
16:45:42: Progress: 1/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:46:45: Progress: 2/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:47:48: Progress: 3/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:48:51: Progress: 4/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:49:54: Progress: 5/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:50:58: Progress: 6/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:52:01: Progress: 7/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:53:04: Progress: 8/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:54:07: Progress: 9/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:54:39: Progress: 6/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:55:52: Progress: 7/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:56:55: Progress: 8/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:57:58: Progress: 9/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
16:59:01: Progress: 10/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
17:00:04: Progress: 11/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
17:01:07: Progress: 12/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
17:02:10: Progress: 13/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
17:03:13: Progress: 14/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
17:04:16: Progress: 15/30 - Escape from Tarkov: Arena, WINLINE EPIC EFT: ARENA Play-off
17:04:26: ERROR: Exception in task
17:04:26: Traceback (most recent call last):
17:04:26:   File "utils.py", line 139, in wrapper
17:04:26:   File "twitch.py", line 1049, in _watch_loop
17:04:26:   File "channel.py", line 390, in send_watch
17:04:26: KeyError: 'data'
17:45:32: Fatal error encountered:
17:45:32: 
17:45:32: Traceback (most recent call last):
17:45:32:   File "main.py", line 160, in main
17:45:32:   File "twitch.py", line 772, in run
17:45:32:   File "twitch.py", line 817, in _run
17:45:32:   File "twitch.py", line 1670, in fetch_inventory
17:45:32:   File "asyncio\tasks.py", line 571, in _wait_for_one
17:45:32:   File "twitch.py", line 1616, in fetch_campaigns
17:45:32:   File "twitch.py", line 1617, in <dictcomp>
17:45:32: TypeError: string indices must be integers
17:45:32: 
17:45:32: Exiting...
17:45:32: 
17:45:32: Application Terminated.
17:45:32: Close the window to exit the application.```

@chicken647
Copy link

I seem to have at least temporarily fixed this issue by wrapping the code in channel.py at line 390 in a try except block like this:

try:
    signature: JsonType | None = response["data"]['streamPlaybackAccessToken']["signature"]
    value: JsonType | None = response["data"]['streamPlaybackAccessToken']["value"]
    if not signature or not value:
        return False
except KeyError:
    return False

Keep in mind I didn't look at what this part of the code actually does so maybe this is wrong? But after doing this I don't get any errors and drops are progressing.

EDIT: Yes this "works" but it basically just throws away the data when it fails there. So, it results in some watchtime being lost sometimes. But at least it works for now until the dev fully fixes it.

Could this be an error caused by the way they have their drops setup?
_As in, they have two different drops under the same drop section? I'm not 100% sure but I believe rust has done this before but, maybe it's attempting to start progressing both the "Partners Only" and "Category-Wide" drops at once? In the past when Rust has done this, the second set of drops were for anyone streaming rust so it didn't matter what channel you were watching but, in this case the drops are only available on a different set of specific twitch channels from the category-wide drops? _
image

@woctezuma
Copy link

woctezuma commented Aug 4, 2024

In my case:

  File "main.py", line 160, in main
    await client.run()
  File "twitch.py", line 772, in run
    await self._run()
  File "twitch.py", line 915, in _run
    await asyncio.gather(
  File "channel.py", line 286, in update_stream
    self._stream = await self.get_stream()
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "channel.py", line 254, in get_stream
    stream_data: JsonType | None = response["data"]["user"]
                                   ~~~~~~~~^^^^^^^^
KeyError: 'data'

@chicken647
Copy link

In my case:

  File "TwitchDropsMiner-updated\main.py", line 160, in main
    await client.run()
  File "TwitchDropsMiner-updated\twitch.py", line 772, in run
    await self._run()
  File "TwitchDropsMiner-updated\twitch.py", line 915, in _run
    await asyncio.gather(
  File "TwitchDropsMiner-updated\channel.py", line 286, in update_stream
    self._stream = await self.get_stream()
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "TwitchDropsMiner-updated\channel.py", line 254, in get_stream
    stream_data: JsonType | None = response["data"]["user"]
                                   ~~~~~~~~^^^^^^^^
KeyError: 'data'

is this using the base twitchdropsminer-updated application; or did you attempt to do the fix that Johnnycyan mentioned?

@woctezuma
Copy link

woctezuma commented Aug 4, 2024

is this using the base twitchdropsminer-updated application; or did you attempt to do the fix that Johnnycyan mentioned?

This is with the in-dev branch, which is 2 commits ahead of the master branch.
This is the branch which I have been using since the start of the fork.

@Johnnycyan
Copy link

Yeah, as I said in my post, I wasn't really looking to see what all that section of code did I was just attempting to soft catch the error I was getting. Not surprised it doesn't fix it for others tbh. But, as MuffinzCat said, the original does not have this issue so I'm currently just using that.

@chicken647
Copy link

Yeah, as I said in my post, I wasn't really looking to see what all that section of code did I was just attempting to soft catch the error I was getting. Not surprised it doesn't fix it for others tbh. But, as MuffinzCat said, the original does not have this issue so I'm currently just using that.

Interesting.. looks like DevilXD is back, if I remember correctly, the issue was with drop progress not being marked but if they are back working on the original project, I guess I will switch back to it too.

@woctezuma
Copy link

woctezuma commented Aug 4, 2024

as MuffinzCat said, the original does not have this issue so I'm currently just using that.

Probable because of the recent commits, such as DevilXD@b20f98d

@5wi5wi
Copy link

5wi5wi commented Aug 4, 2024

the original project is working for me

@zelda0079
Copy link

is this using the base twitchdropsminer-updated application; or did you attempt to do the fix that Johnnycyan mentioned?

This is with the in-dev branch, which is 2 commits ahead of the master branch. This is the branch which I have been using since the start of the fork.

Yes, the latest version of in-dev works, c44f0aa

@zelda0079
Copy link

is this using the base twitchdropsminer-updated application; or did you attempt to do the fix that Johnnycyan mentioned?

This is with the in-dev branch, which is 2 commits ahead of the master branch. This is the branch which I have been using since the start of the fork.

Yes, the latest version of in-dev works, c44f0aa

ERROR AGAIN

@5wi5wi
Copy link

5wi5wi commented Aug 5, 2024

the original project is working for me

TDM errored after the overwatch stream ended, I restarted TDM and it asked me to login again.

Working now

@Nazar1ky
Copy link

Nazar1ky commented Aug 5, 2024

Hello! I think that because this: {'error': 'Unauthorized', 'status': 401, 'message': 'The "Authorization" token is invalid.'}. Issue - DevilXD#526

Also: DevilXD#526 (comment)
I did some research, and investigate how work Twitch-Channel-Points-Miner-v2. That miner doesn't have any issues, because it use Smart TV client_id - Reference. As I see Twitch Drops Miner use Android WEB client_id. But... if miner will use Smart TV client_id campaigns GraphQL endpoint won't return campaigns: (see dropCampaigns)

{
  'currentUser': {
    'id': '',
    'login': '',
    'dropCampaigns': None,
    '__typename': 'User'
  },
  'rewardCampaignsAvailableToUser': [
    {
      ...
    }
  ]
}

Update: Android App client_id (Not Android WEB) works fine! (https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/blob/master/TwitchChannelPointsMiner/constants.py#L11)

@woctezuma
Copy link

Smart. I will try your fork of the fork at:

@Windows200000
Copy link
Owner

Windows200000 commented Aug 5, 2024

@Nazar1ky's fix is in in-dev.

Please report back if you have issues again, or if it has been working continuously for you (including mining an entire drop) for ~ 1 day.

Thanks @Nazar1ky


Don't forget to log back in!

@Windows200000 Windows200000 added Solved for the next release This is already solved for the next application release Critical For Critical issues that prevent the application from working labels Aug 5, 2024
@MuffinzCat
Copy link

MuffinzCat commented Aug 6, 2024

@Nazar1ky's fix is in in-dev.

Please report back if you have issues again, or if it has been working continuously for you (including mining an entire drop) for ~ 1 day.

Thanks @Nazar1ky

Don't forget to log back in!

I ran the indev build and got an error

06:28:54: 
06:28:54: Traceback (most recent call last):
06:28:54:   File "main.py", line 160, in main
06:28:54:   File "twitch.py", line 772, in run
06:28:54:   File "twitch.py", line 828, in _run
06:28:54:   File "inventory.py", line 238, in claim
06:28:54:   File "inventory.py", line 139, in claim
06:28:54:   File "inventory.py", line 155, in _claim
06:28:54:   File "twitch.py", line 1575, in gql_request
06:28:54: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['claimDropRewards']}]
06:28:54: 
06:28:54: Exiting...
06:28:54: 
06:28:54: Application Terminated.
06:28:54: Close the window to exit the application.```

Happened directly after gathering drops iirc

@Nazar1ky
Copy link

Nazar1ky commented Aug 6, 2024

@Nazar1ky's fix is in in-dev.
Please report back if you have issues again, or if it has been working continuously for you (including mining an entire drop) for ~ 1 day.
Thanks @Nazar1ky

Don't forget to log back in!

I ran the indev build and got an error

06:28:54: 
06:28:54: Traceback (most recent call last):
06:28:54:   File "main.py", line 160, in main
06:28:54:   File "twitch.py", line 772, in run
06:28:54:   File "twitch.py", line 828, in _run
06:28:54:   File "inventory.py", line 238, in claim
06:28:54:   File "inventory.py", line 139, in claim
06:28:54:   File "inventory.py", line 155, in _claim
06:28:54:   File "twitch.py", line 1575, in gql_request
06:28:54: exceptions.MinerException: GQL error: [{'message': 'service error', 'path': ['claimDropRewards']}]
06:28:54: 
06:28:54: Exiting...
06:28:54: 
06:28:54: Application Terminated.
06:28:54: Close the window to exit the application.```

Happened directly after gathering drops iirc

That not auth issue, that’s random error answer from Twitch which should be skipped / retried. Is it often?

@woctezuma
Copy link

That not auth issue, that’s random error answer from Twitch which should be skipped / retried. Is it often?

Right. See:

@MuffinzCat
Copy link

That not auth issue, that’s random error answer from Twitch which should be skipped / retried. Is it often?

Right. See:

I have been getting this error for a few tries, but I'm gonna try again now.

@MuffinzCat
Copy link

It does seem to work now, my bad

@Nazar1ky
Copy link

Nazar1ky commented Aug 6, 2024

Hmmm, DevilXD#526 (comment) there more information.

@Windows200000
Copy link
Owner

@MuffinzCat service error is #86

@Windows200000 Windows200000 added Solved The issue has been resolved and removed Solved for the next release This is already solved for the next application release labels Aug 6, 2024
@Windows200000
Copy link
Owner

Windows200000 commented Aug 6, 2024

The fix is in Master and in release v15.8.1

@FomaDima
Copy link

FomaDima commented Aug 7, 2024

Now you need to log in again. Or is it a version bug. (sorry, I read above but didn’t understand)

@woctezuma
Copy link

Now you need to log in again. Or is it a version bug. (sorry, I read above but didn’t understand)

Yes, because it is as if you were using a new device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Critical For Critical issues that prevent the application from working Solved The issue has been resolved
Projects
None yet
Development

No branches or pull requests