ani-cli icon indicating copy to clipboard operation
ani-cli copied to clipboard

ani-cli stopped working again

Open Reinami opened this issue 4 months ago • 21 comments

Make sure you are on the latest version by running ani-cli -U

Metadata (please complete the following information) Version: 4.14.5 OS: Windows 11 Shell: windows cmd Anime: Everything

Describe the bug Can't seem to fetch any anime,

Steps To Reproduce

  1. Run ani-cli
  2. Choose Any show
  3. Choose any episode
  4. Get error: "Episode is released, but no valid sources!"

Expected behavior It should work

Reinami avatar Jul 17 '26 05:07 Reinami

Make sure you are on the latest version by running ani-cli -U

Metadata (please complete the following information) Version: 4.14.5 OS: Windows 11 Shell: windows cmd Anime: Everything

Describe the bug Can't seem to fetch any anime,

Steps To Reproduce

  1. Run ani-cli
  2. Choose Any show
  3. Choose any episode
  4. Get error: "Episode is released, but no valid sources!"

Expected behavior It should work

   This seems to be caused by AllAnime adding/changing the required `aaReq` crypto token for
 episode source requests. Search still works, but fetching episode sources returns
 `AA_CRYPTO_MISSING`, which leads to:

   `Episode is released, but no valid sources!`

   A local workaround is to update the AllAnime key/epoch/build values and include a
 generated `aaReq` in the episode API request. PR #1792 appears to address this by updating
 the key/epoch/build id.

   So this is not a player/mpv issue — it’s the source API request failing before playback.

coderFPV avatar Jul 17 '26 05:07 coderFPV

Make sure you are on the latest version by running ani-cli -U

Metadata (please complete the following information) Version: 4.14.5 OS: Windows 11 Shell: windows cmd Anime: Everything Describe the bug Can't seem to fetch any anime, Steps To Reproduce

  1. Run ani-cli
  2. Choose Any show
  3. Choose any episode
  4. Get error: "Episode is released, but no valid sources!"

Expected behavior It should work

This seems to be caused by AllAnime adding/changing the required aaReq crypto token for episode source requests. Search still works, but fetching episode sources returns AA_CRYPTO_MISSING, which leads to:

Episode is released, but no valid sources!

A local workaround is to update the AllAnime key/epoch/build values and include a generated aaReq in the episode API request. PR #1792 appears to address this by updating the key/epoch/build id.

So this is not a player/mpv issue — it’s the source API request failing before playback.

Yeah i figured, i tried changing it to the same as that PR, but i still get the same error, but the version on master seems to be very different than the one that it is merging to, is there a way to install the one on that branch?

Reinami avatar Jul 17 '26 05:07 Reinami

yeah now its throwing the same error even if i use vpn :(

Sumit-DevX avatar Jul 17 '26 13:07 Sumit-DevX

Trying to pull the episodes gives the error {"errors":[{"message":"AACRYPTOMISSING","locations":[{"line":7,"column":1}],"path":["episode"],"extensions":{"code":"AACRYPTOMISSING"}}],"data":{"episode":null}}

sentrisable avatar Jul 17 '26 14:07 sentrisable

I think the epoch/key got updated, I'm trying to solve it on both my tauri and cli app (golang) and will relay what I find - since my tauri app has access to webview2 I think it'll be easier to grab current epoc and key and programmatically solve it for future, but it's a bit of a big headache figuring it on the cli side of things since we can't really deal with turnstile/cloudflare.

stl3 avatar Jul 17 '26 16:07 stl3

Issues here as well. Had this error after attempting to play dragonball, ''Specified quality not found, defaulting to best Episode is released, but no valid sources!''

Lost-Shadow99 avatar Jul 17 '26 20:07 Lost-Shadow99

Image Image

yup same issue here but i can see different messages

J-mefdaoui avatar Jul 17 '26 21:07 J-mefdaoui

Same here (macOS 10.6 / macOS 10.15)

barracuda156 avatar Jul 18 '26 03:07 barracuda156

another day, another patch

Image

veromikka avatar Jul 18 '26 08:07 veromikka

Since there seems to be some kind of in-fighting drama between the allanime and mkissa (I have no idea what is going on really) which kind of messed up lots of stuff on my end, we need to be aware of changes on cdn.allanime.day/cdn.mkissa.net (there are now two places serving)- for now I kind of wanted to test the waters with cdn.mkissa.net/chunks/CVCiaUda.js

  • mkissa.to Link headers → 16 chunk URLs
  • CVCiaUda.js → mask cd7f14dbf40734836eb46eb14758e49ef9d81e61686d84d467b2e32063ef4af9, build_id 44
  • mkissa.to HTML → epoch 4130, partB AjhjboON...
  • New mask XOR partB = cf4777b5778aeadc9449e12769ea545d00c43cd8ff65d482364586cde204f359

I'm just testing for now in my tauri/webview2 app to automatically refresh (am able to play anime now), but now I need to find a way to get it working via my cli, will chime in once i get it working.

stl3 avatar Jul 18 '26 17:07 stl3

I'm just testing for now in my tauri/webview2 app to automatically refresh (am able to play anime now), but now I need to find a way to get it working via my cli, will chime in once i get it working.

I'm doing same thing basically in my own electron/ts app.

I am able to get all the data fetched dynamically per episode request.

all data im getting:

  "crypto": {
    "source": "dynamic",
    "epoch": 4130,
    "buildId": "44",
    "partA": "cd7f14dbf40734836eb46eb14758e49ef9d81e61686d84d467b2e32063ef4af9",
    "partB": "AjhjboON3l/6/Y+WLrKww/kcIrmXCFBWUfdl7YHruaA=",
    "derivedKeyHex": "cf4777b5778aeadc9449e12769ea545d00c43cd8ff65d482364586cde204f359",
    "queryHash": "d405d0edd690624b66baba3068e0edc3ac90f1597d898a1ec8db4e5c43c00fec",
    "apiUrl": "https://api.allanime.day",
    "referer": "https://youtu-chan.com",
    "appJsUrl": "https://cdn.mkissa.net/all/mk/_app/immutable/entry/app.D_sfA4pp.js",
    "fetchedAt": "2026-07-18T17:53:15.992Z",
    "cacheExpiresAt": "2026-07-18T18:23:16.516Z",
    "legacyCtr": false
  },

vorlie avatar Jul 18 '26 17:07 vorlie

I'm doing same thing basically in my own electron/ts app.

I am able to get all the data fetched dynamically per episode request.

I hope things calm down for the most part, I'm less concerned about the source as long as there is a source to fetch from :o but this also means that ani-cli should also consider other more stable alternate src or some kind of fallback.

stl3 avatar Jul 18 '26 18:07 stl3

Forgive me for a wall of text in advance (┬┬﹏┬┬). However, I do hope this will be useful for someone here reading


I hope things calm down for the most part. I am less concerned about which source is used as long as there is still a source available, but this also means that ani-cli should consider more stable alternatives or some kind of fallback.

For reference, this is how I handle AllAnime sources in AniPlay.

AniPlay resolves sources only when they are needed. It does not download a source catalog for every anime in advance. Each lookup uses a show ID, translation type, and episode number.

1. Anime search

The UI sends the query and selected provider through Electron IPC. The main process validates the request and passes it to the scraper.

Sources: browse UI, preload bridge, IPC handler

2. AllAnime catalog lookup

For AllAnime, searchAnime() sends a GraphQL shows query to https://api.allanime.day/api. It requests up to 40 results for the selected sub or dub mode, then normalizes each result into a show ID, title, episode count, and provider identifier.

Source: catalog lookup

3. Episode list

Opening a show triggers another GraphQL query for availableEpisodesDetail. AniPlay selects the requested sub or dub list, converts the episode identifiers to strings, and sorts them numerically.

Sources: episode request, episode parsing

4. Source lookup

Source resolution starts when an episode is selected. AnimePage calls invokeLinks(showId, episode, mode, "allanime") and passes successful results to the player. The request crosses the preload bridge and is validated by the main process before it reaches getEpisodeLinks().

Sources: player request, renderer API, links IPC handler

5. Crypto bootstrap

AniPlay reads AllAnime's current epoch and partB value from the frontend page. It locates the application bundle and crypto chunk, extracts the mask and build ID, and derives the AES key by XORing the mask with partB. Dynamic values are cached for 30 minutes. Bundled constants are used as a short-lived fallback.

Source: crypto bootstrap

6. Authenticated episode query

A five-minute timestamp bucket, epoch, build ID, and persisted-query hash are packed into an AES-GCM aaReq token. AniPlay first tries the persisted GraphQL GET request with the dynamic and fallback build values. If that fails, it retries with a full GraphQL POST request.

Sources: request token, episode query

7. Response decoding

Responses that already contain sourceUrls are accepted directly. Encrypted tobeparsed payloads are Base64-decoded and decrypted with AES-GCM. A fallback response key and a legacy AES-CTR path are also available for compatibility. The decoded entries are normalized into sourceUrl and sourceName pairs.

Sources: response decryption, source parsing

8. Provider expansion

URLs beginning with -- are decoded with the cipher map. AniPlay then handles MP4Upload embeds, direct media URLs, and AllAnime's internal /apivtwo/ or /apiv2/ endpoints. Internal /clock endpoints are changed to /clock.json, fetched, and expanded into separate HLS or video qualities.

Source: provider expansion

9. Final links

The links are converted to absolute URLs, deduplicated, marked as downloadable, and sorted by provider, resolution, and HLS status. HLS links are loaded through Hls.js. Other links are assigned directly to the video element.

Sources: link normalization, link sorting, player loading

The URL substitution map can also be refreshed from the latest pystardust/ani-cli release. The refreshed map is saved to ciphermap.json and loaded into the running scraper without requiring a restart.

Source: cipher map refresh

Summary

search -> show ID -> episode list -> selected episode -> crypto bootstrap -> authenticated GraphQL query -> decode sourceUrls -> expand providers -> deduplicate and sort -> player

vorlie avatar Jul 18 '26 18:07 vorlie

I think the issue is a bunch of drama related to AllAnime (upstream host where ani-cli fetches its data from), which apparently involves a hostile takeover of the site, that is currently unavailable.

Not sure if we will be recovering from this one anytime soon :(

fcoelhomrc avatar Jul 18 '26 18:07 fcoelhomrc

Forgive me for a wall of text in advance (┬┬﹏┬┬). However, I do hope this will be useful for someone here reading

I hope things calm down for the most part. I am less concerned about which source is used as long as there is still a source available, but this also means that ani-cli should consider more stable alternatives or some kind of fallback.

For reference, this is how I handle AllAnime sources in AniPlay.

AniPlay resolves sources only when they are needed. It does not download a source catalog for every anime in advance. Each lookup uses a show ID, translation type, and episode number.

1. Anime search

The UI sends the query and selected provider through Electron IPC. The main process validates the request and passes it to the scraper.

Sources: browse UI, preload bridge, IPC handler

2. AllAnime catalog lookup

For AllAnime, searchAnime() sends a GraphQL shows query to https://api.allanime.day/api. It requests up to 40 results for the selected sub or dub mode, then normalizes each result into a show ID, title, episode count, and provider identifier.

Source: catalog lookup

3. Episode list

Opening a show triggers another GraphQL query for availableEpisodesDetail. AniPlay selects the requested sub or dub list, converts the episode identifiers to strings, and sorts them numerically.

Sources: episode request, episode parsing

4. Source lookup

Source resolution starts when an episode is selected. AnimePage calls invokeLinks(showId, episode, mode, "allanime") and passes successful results to the player. The request crosses the preload bridge and is validated by the main process before it reaches getEpisodeLinks().

Sources: player request, renderer API, links IPC handler

5. Crypto bootstrap

AniPlay reads AllAnime's current epoch and partB value from the frontend page. It locates the application bundle and crypto chunk, extracts the mask and build ID, and derives the AES key by XORing the mask with partB. Dynamic values are cached for 30 minutes. Bundled constants are used as a short-lived fallback.

Source: crypto bootstrap

6. Authenticated episode query

A five-minute timestamp bucket, epoch, build ID, and persisted-query hash are packed into an AES-GCM aaReq token. AniPlay first tries the persisted GraphQL GET request with the dynamic and fallback build values. If that fails, it retries with a full GraphQL POST request.

Sources: request token, episode query

7. Response decoding

Responses that already contain sourceUrls are accepted directly. Encrypted tobeparsed payloads are Base64-decoded and decrypted with AES-GCM. A fallback response key and a legacy AES-CTR path are also available for compatibility. The decoded entries are normalized into sourceUrl and sourceName pairs.

Sources: response decryption, source parsing

8. Provider expansion

URLs beginning with -- are decoded with the cipher map. AniPlay then handles MP4Upload embeds, direct media URLs, and AllAnime's internal /apivtwo/ or /apiv2/ endpoints. Internal /clock endpoints are changed to /clock.json, fetched, and expanded into separate HLS or video qualities.

Source: provider expansion

9. Final links

The links are converted to absolute URLs, deduplicated, marked as downloadable, and sorted by provider, resolution, and HLS status. HLS links are loaded through Hls.js. Other links are assigned directly to the video element.

Sources: link normalization, link sorting, player loading

The URL substitution map can also be refreshed from the latest pystardust/ani-cli release. The refreshed map is saved to ciphermap.json and loaded into the running scraper without requiring a restart.

Source: cipher map refresh

Summary

search -> show ID -> episode list -> selected episode -> crypto bootstrap -> authenticated GraphQL query -> decode sourceUrls -> expand providers -> deduplicate and sort -> player

Thanks for the information. Don't know if it can help though because allanime side has turnstile (i could not get past) but the mkissa side I did not have a problem getting through with cli. Managed to get my cli app working again but through cdn.mkissa.net chunk cdn and using mkissa.to for __aaCrypto SSR data

stl3 avatar Jul 18 '26 18:07 stl3

I think the issue is a bunch of drama related to AllAnime (upstream host where ani-cli fetches its data from), which apparently involves a hostile takeover of the site, that is currently unavailable.

Not sure if we will be recovering from this one anytime soon :(

it can work again but have to change a small few things, like not use cdn.allanime.day but cdn.mkissa.net

stl3 avatar Jul 18 '26 19:07 stl3

I think the issue is a bunch of drama related to AllAnime (upstream host where ani-cli fetches its data from), which apparently involves a hostile takeover of the site, that is currently unavailable.

Not sure if we will be recovering from this one anytime soon :(

Can you elaborate and/or point to a source? This sounds like valuable intel for us

port19x avatar Jul 18 '26 19:07 port19x

/r/allanimesite or something

stl3 avatar Jul 18 '26 20:07 stl3

I think the issue is a bunch of drama related to AllAnime (upstream host where ani-cli fetches its data from), which apparently involves a hostile takeover of the site, that is currently unavailable.

Not sure if we will be recovering from this one anytime soon :(

Can you elaborate and/or point to a source? This sounds like valuable intel for us

Their Reddit, specifically this post: https://www.reddit.com/r/allanimesite/s/CuL5G50u7L

And this seems to be the latest update: https://www.reddit.com/r/allanimesite/s/MjxK4FMerA

But for some arcane reason, there is a bunch of (AI generated?) suggestive Korra art littering the relevant posts, and it all reads a bit convolutedly, with tons of screenshots.

I couldn't be bothered to dig too much into this...

fcoelhomrc avatar Jul 18 '26 20:07 fcoelhomrc

in the mean time if you have claude or pi agent(or any type of harness), they should be able to resolve the issue, until the main fix is released

coderFPV avatar Jul 19 '26 04:07 coderFPV