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

System.text.json.jsonexception: '<' is an invalid start of a value #965

Open
2 tasks done
taimi7364 opened this issue Feb 1, 2024 · 4 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@taimi7364
Copy link

taimi7364 commented Feb 1, 2024

Checklist

Edition

Windows GUI Application

Describe your issue here

When trying to download kick chat from a VOD (I download the full stream chat so no cropping) for example https://kick.com/video/6701079e-017d-4e75-a283-6b642f018e60, it throws an error like one of these:
error
kick error
kick error2
kick error3

Latest picture pops up the most. Also I have static ip if that matters.

Downloading JSON files from kick dot com works some days and doesn't work for somedays/multiple days. Somedays using phones internet to download chats it works fine. I download the full stream chat so no cropping.

I have build from the latest kick branch v1.54.0. But I had to delete one line of code because it didn't build properly. Could this be the problem?

I have tried to clear the temp files in twitchdownloader, but it didn't help.

Add any related files or extra information here

No response

@taimi7364 taimi7364 added the bug Something isn't working label Feb 1, 2024
@ScrubN
Copy link
Collaborator

ScrubN commented Feb 1, 2024

If I had to guess I would say your IP is being rate limited, and it seems we aren't checking our kick responses to ensure they are actually valid JSON responses.

How many chat download threads are you using? I've had good success with only 4, but I know it is very slow that way.

@ScrubN
Copy link
Collaborator

ScrubN commented Feb 1, 2024

But I had to delete one line of code because it didn't build properly. Could this be the problem?

Also, which line of code would this be? It builds just fine on my machine

@ScrubN
Copy link
Collaborator

ScrubN commented Feb 1, 2024

How many chat download threads are you using? I've had good success with only 4, but I know it is very slow that way.

I left a download running in the background and a while I managed to reproduce with just 4 threads. The response is a bad gateway error formatted as an HTML page. I guess I could add a check for <!DOCTYPE html> and freeze all downloads for a minute?
image

@taimi7364
Copy link
Author

taimi7364 commented Feb 2, 2024

Also, which line of code would this be?

Ok so I tried to build the kick branch today and now it builds fine with only this error:
Z:\kickdownloader\TwitchDownloader-kick-support\TwitchDownloader-kick-support\TwitchDownloaderCore\VideoPlatforms\Kick
Downloaders\KickChatDownloader.cs(272,17): warning CS0162: Unreachable code detected [Z:\kickdownloader\TwitchDownloade
r-kick-support\TwitchDownloader-kick-support\TwitchDownloaderCore\TwitchDownloaderCore.csproj]

Before it had some errors but I don't remember what exactly.

How many chat download threads are you using?

If you mean connections I use 20. If you mean maximum thread bandwidth I have it unselected.

I guess I could add a check for !DOCTYPE html and freeze all downloads for a minute?

Yeah I think stopping the download for a 60 second would be fine.

edit:
I tried with phones internet with 4 connections and it downloaded the json file without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants