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

Error 403 #959

Closed
TaMaGo-TTV opened this issue May 21, 2024 · 40 comments
Closed

Error 403 #959

TaMaGo-TTV opened this issue May 21, 2024 · 40 comments

Comments

@TaMaGo-TTV
Copy link

image
Am i the only one?

@0151Master
Copy link

Same for me, Crunchy probably changed something

@TaMaGo-TTV
Copy link
Author

Same for me, Crunchy probably changed something

Big F

we get more information tomorow, I guess. Its 1am in germany.

@napgiver
Copy link

Same here.

@kuriidev
Copy link

Captura de pantalla 2024-05-21 170821

@Flame-Rider
Copy link

Glad to see that i am not the only one with this problem i hope it is fixed soon

@Daigh
Copy link

Daigh commented May 22, 2024

Same problem to me :(

@hama3254
Copy link
Owner

It seems like they changes the API again.
I am not sure righ now if (or what) i can do about it.
It also may take some days for me to take a proper look at this.
grafik

@stratuma
Copy link
Contributor

@hama3254 just add 'User-Agent': 'Crunchyroll/1.8.0 Nintendo Switch/12.3.12.0 UE4/4.27' to the playlist fetch

@drunknmonkie
Copy link

@Elwador thank you

hama3254 added a commit that referenced this issue May 22, 2024
hotfix switch User-Agent #959
added 'MetroFramework.dll' and 'MyProvider.dll'
@hama3254
Copy link
Owner

v3.23.3 with the suggested fix from @stratuma is available and worked with my (limited) testing.

@acteiaa
Copy link

acteiaa commented May 22, 2024

image
I downloaded 6 videos and it stopped working

@ZioBomba
Copy link

I think there is still some problem, I tried to download a 50-episode series, but after the first 5-6 episodes it gives me error, every now and then it downloads one and many it skips with the error 420
https://i.imgur.com/apZaNMz.png

@acteiaa
Copy link

acteiaa commented May 22, 2024

Unlike the other version, this one you have to wait a while for it to work again, you can't download several episodes ç.ç

@stratuma
Copy link
Contributor

It looks like a token error, maybe refresh the user token more often

@acteiaa
Copy link

acteiaa commented May 22, 2024

The limit is 5 every 5 minutes

@acteiaa
Copy link

acteiaa commented May 22, 2024

To get it working again, you need to close the app and open it again.

@stratuma
Copy link
Contributor

@hama3254 could you please add more logging so we can see the crunchyroll response not only the error code.

@stratuma
Copy link
Contributor

stratuma commented May 22, 2024

because since the new api update the switch endpoint also has a active stream limit.
After you fetch the mpd you have to invalidate the video token:

JS example:
const response = await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${contentid}/${videotoken}/inactive', { method: 'PATCH' })

@stratuma
Copy link
Contributor

It looks like a token error, maybe refresh the user token more often

At this point its wrong, the error should be the activestream limit

@hama3254
Copy link
Owner

@hama3254 could you please add more logging so we can see the crunchyroll response not only the error code.

Last time I tried that I was unable to change the curl command to do so.

because since the new api update the switch endpoint also has a active stream limit. After you fetch the mpd you have to invalidate the video token:

JS example: const response = await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${contentid}/${videotoken}/inactive', { method: 'PATCH' })

I see, I add this after I get home from work.
This should be a simple fix.

@CarrilloTlx
Copy link

CarrilloTlx commented May 23, 2024

Hello everyone!

I want to share my Crunchyroll project, which is designed to download anime episodes. Currently, I've encountered a JSON Web Token (JWT) authentication issue. It seems that there are difficulties in authenticating access to the Crunchyroll API, preventing the download process from functioning correctly.

This project is programmed in C#.

If anyone has experience with these types of issues or is interested in contributing, it would be great to have your help in resolving this problem!

Here's the link to the project repository: Crunchyroll Project Repository

Any contributions or suggestions would be greatly appreciated! Thank you!

[Image removed]

@hama3254
Copy link
Owner

hama3254 commented May 23, 2024

@CarrilloTlx I removed the image since I am not sure about all the data that have been shown on it.
For security reasons I would recommend to check all data on a screenshot or log for any kind of authorization information.

if you get the same JSON response you might need to use the suggested by @stratuma

User-Agent: Crunchyroll/1.8.0 Nintendo Switch/12.3.12.0 UE4/4.27

It seems like they changes the API again.
I am not sure righ now if (or what) i can do about it.
It also may take some days for me to take a proper look at this.
grafik

@Elwador
Copy link

Elwador commented May 23, 2024

@CarrilloTlx i have also created a downloader in c# maybe you find a solution there

but it sounds like the original issue and you have to change the user agent

@cr-ytdlp
Copy link

cr-ytdlp commented May 23, 2024

this works also

await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${episodeId}/${videoStreamToken}', {method: 'DELETE'});

and you should see an error TOO_MANY_ACTIVE_STREAMS and at that point you can clear all active streams, if wanted
e.g.

if (exception.error === 'TOO_MANY_ACTIVE_STREAMS' && exception.activeStreams?.length) {
  for (const activeStream of exception.activeStreams) {
    await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${activeStream.contentId}/${activeStream.token}', {method: 'DELETE'});
  }
}

hama3254 added a commit that referenced this issue May 23, 2024
added token deletion #959
changed error messages
@hama3254
Copy link
Owner

v3.23.4 is now online and should add the token deletion.

@stratuma i also changed the error output
grafik

@stratuma
Copy link
Contributor

this works also

await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${episodeId}/${videoStreamToken}', {method: 'DELETE'});

and you should see an error TOO_MANY_ACTIVE_STREAMS and at that point you can clear all active streams, if wanted e.g.

if (exception.error === 'TOO_MANY_ACTIVE_STREAMS' && exception.activeStreams?.length) {
  for (const activeStream of exception.activeStreams) {
    await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${activeStream.contentId}/${activeStream.token}', {method: 'DELETE'});
  }
}

The problem here if you delete all active streams it could happen that you delete a token you are using, that results a mpd fetch error.

@acteiaa
Copy link

acteiaa commented May 24, 2024

image
I was even scared by the size of the error

@acteiaa
Copy link

acteiaa commented May 24, 2024

but it is working it was only one episode that this error appeared

@stratuma
Copy link
Contributor

image I was even scared by the size of the error

Cloudflare error, interesting. Never got one over that endpoint

@Borufanss
Copy link

Captura
Que tengo que hacer aquí? Osea que debo escribir ahí

@hama3254
Copy link
Owner

I was even scared by the size of the error

i should probably rebuild something like the .net crash message.
having the error code at the top and the details with the text.
grafik

Cloudflare error, interesting. Never got one over that endpoint

This is at the objects request which is still a rebuild of what the webbrowser does.

@hama3254
Copy link
Owner

@Borufanss due to changes on CR side the login of the webbrowser does not work anymore.
We need to fake it as a Switch app login, the downloader does that but i need the login details for that.

@stratuma
Copy link
Contributor

image

Idk what crunchyroll changed but I have so many fetch fails since the new update, maybe they added a new ratelimit.
(Failed already after downloading the audio of the 3rd video added in download list)

@hama3254
Copy link
Owner

@stratuma where do you get that message from?
I see no problem fully downloading 8 episodes within 8 minutes.
grafik

@stratuma
Copy link
Contributor

stratuma commented May 24, 2024

@stratuma where do you get that message from? I see no problem fully downloading 8 episodes within 8 minutes. grafik

No i'm speaking of the api not of your downloader, this is a error I get with my downloader.

@hama3254
Copy link
Owner

No i'm speaking of the api not of your downloader, this is a error I get with my downloader.

that is why i asked where you get the error from, both of your projects are based on the same APIs thats why i was surprised since my downloader works fine.

@stratuma
Copy link
Contributor

No i'm speaking of the api not of your downloader, this is a error I get with my downloader.

that is why i asked where you get the error from, both of your projects are based on the same APIs thats why i was surprised since my downloader works fine.

Do you check if every part gets downloaded correctly?

@hama3254
Copy link
Owner

Do you check if every part gets downloaded correctly?

My files look fine but i also still use the hls stream.

@stratuma
Copy link
Contributor

Do you check if every part gets downloaded correctly?

My files look fine but i also still use the hls stream.

Oh ok, I use the dash stream

@Daigh
Copy link

Daigh commented May 24, 2024

Captura Que tengo que hacer aquí? Osea que debo escribir ahí

e-mail and password of your chunchyroll account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests