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

ani-cli suddenly stopped working.

Open razrab1337 opened this issue 7 months ago • 26 comments

Metadata (please complete the following information) Version: ❯ ani-cli -V 4.11.0 OS: Linux 6.19.12-1-cachyos Shell: bash Anime: All

Describe the bug

❯ ani-cli -c
Specified quality not found, defaulting to best
Episode is released, but no valid sources!
 
❯ ani-cli kumo desu ka nani ka
Specified quality not found, defaulting to best
Episode is released, but no valid sources!

Steps To Reproduce

  1. Run ani-cli -c

  2. Choose any anime

  3. Run 'ani-cli whatever-anime'

  4. Choose any episode

Expected behavior Should get the episode into MPV player

Additional context

It stopped working today, as soon as I woke up.

razrab1337 avatar Apr 16 '26 02:04 razrab1337

Confirmed same issue on Bazzite and Termux

Checking website, the videos play fine.

thevanwulf avatar Apr 16 '26 02:04 thevanwulf

I ran the steps and I still cant get it to work, I tried uninstalling and then reinstalling, but ive had it updated to v.11 for a while. Im on linux

Rfidlifts avatar Apr 16 '26 03:04 Rfidlifts

experiencing the same problem on windows

HecckkerCode avatar Apr 16 '26 03:04 HecckkerCode

Experiencing the exact same issue on MacOS with MPV as of today, I cannot get anything to play, I receive "Episode is released, but no valid sources!" on everything I tried.

typingweb10 avatar Apr 16 '26 03:04 typingweb10

allanime apis are currently down/not reachable, this is what the program uses to fetch the episode

Galenoo avatar Apr 16 '26 04:04 Galenoo

https://cdn.allanime.day/all/manga/a10191a.js

specifically this part: ait y(e,{method:"POST",body:JSON.stringify(data)},t)}async function O(e,t){try{if(!e||!e.data)return;let n;const r=JSON.parse(e.data);return n="anbbpo".split("").reverse().join(""),r.data&&r.data.tobeparsed&&t.isClient&&(r.data=await Object(l.a)(r.data.tobeparsed)),r}catch(t){console.error("err parse api Result",t,e)}}function j(e,t){if(t){try{e=JSON.stringify(e)}catch(e){console.error("error json Encode",e)}return e}return encodeURIComponent(e)}async function C({query:e,variables:t,key:n,noCache:r,cacheTime:o,withAuth:l,noAuth:d},f=h,m,y,C){let k=function(e){return Object(c.a)(e)}(e);n=n+"-"+(t=j(t,!0));let _=!m,S=j({persistedQuery:{versio ofc this is just a snippet read shi yourself :sob:

The failure was happening because the episode GraphQL call is no longer always returning plain JSON

madss-bin avatar Apr 16 '26 04:04 madss-bin

Im also having this issue

ghost avatar Apr 16 '26 05:04 ghost

The same thing happened to me. Already tested it on my PC and Android.

tamarian13 avatar Apr 16 '26 06:04 tamarian13

https://cdn.allanime.day/all/manga/a10191a.js

specifically this part: ait y(e,{method:"POST",body:JSON.stringify(data)},t)}async function O(e,t){try{if(!e||!e.data)return;let n;const r=JSON.parse(e.data);return n="anbbpo".split("").reverse().join(""),r.data&&r.data.tobeparsed&&t.isClient&&(r.data=await Object(l.a)(r.data.tobeparsed)),r}catch(t){console.error("err parse api Result",t,e)}}function j(e,t){if(t){try{e=JSON.stringify(e)}catch(e){console.error("error json Encode",e)}return e}return encodeURIComponent(e)}async function C({query:e,variables:t,key:n,noCache:r,cacheTime:o,withAuth:l,noAuth:d},f=h,m,y,C){let k=function(e){return Object(c.a)(e)}(e);n=n+"-"+(t=j(t,!0));let _=!m,S=j({persistedQuery:{versio ofc this is just a snippet read shi yourself 😭

The failure was happening because the episode GraphQL call is no longer always returning plain JSON

Thanks for sharing the JS bundle. After looking at it (and doing some unminification), I managed to get the AllAnime provider working again in my project that also uses this API.

What changed:

AllAnime now encrypts GraphQL responses for episode data). Instead of plain JSON, they return a tobeparsed field with base64 encrypted data.Fix: Add decryption for the tobeparsed field using AES-256-GCM.
Secret key: "anbbpo" reversed, then SHA-256 hashed.
Base64 format: first 12 bytes = IV, last 16 bytes = auth tag, middle = ciphertext.
After every axios.post to the AllAnime API, check if tobeparsed exists, decrypt it, and overwrite the data with the decrypted result.

This matches the exact client-side decryption logic found in their JS bundle: https://cdn.allanime.day/all/manga/a10191a.js

Episode fetching is now working again. For now....

serifpersia avatar Apr 16 '26 12:04 serifpersia

so is the issue has bee fixed or not

ghost avatar Apr 16 '26 12:04 ghost

should be fixed in https://github.com/pystardust/ani-cli/pull/1650

justchokingaround avatar Apr 16 '26 12:04 justchokingaround

Thanks! It's working!

razrab1337 avatar Apr 16 '26 13:04 razrab1337

how to fix it please do tell

ghost avatar Apr 16 '26 17:04 ghost

@razrab1337 can you help me fix this?

ghost avatar Apr 16 '26 17:04 ghost

@Blackgamingz

If you're on a Unix base OS you can clone the specific branch with the fix. I personally use Mac, so I know the Mac commands here work 100%. Not fully sure on linux commands, but they should function.

First remove the old version. Mac: rm "$(brew --prefix)/bin/ani-cli" Linux: sudo rm "/usr/local/bin/ani-cli"

Then to clone the branch with JustChokingAround's fix. Mac: git clone "https://github.com/justchokingaround/ani-cli.git" -b "allanime-fix" && cd ./ani-cli cp ./ani-cli "$(brew --prefix)"/bin cd .. && rm -rf ./ani-cli

Linux: git clone "https://github.com/justchokingaround/ani-cli.git" -b "allanime-fix" sudo cp ani-cli/ani-cli /usr/local/bin rm -rf ani-cli

FlaccidJim avatar Apr 17 '26 01:04 FlaccidJim

How to fix in iphone ISH app?

Chesetr avatar Apr 17 '26 04:04 Chesetr

Run this in terminal to fix it. It will say: version 4.12.0 if it worked

git clone -b allanime-fix https://github.com/justchokingaround/ani-cli.git ani-cli-fix
sudo install -m 755 ./ani-cli-fix/ani-cli "$(which ani-cli)"
hash -r
ani-cli --version

Luvvydev avatar Apr 17 '26 05:04 Luvvydev

This is what it said after pasting the script into iSH, it apparently went to version 4.11.0:

localhost:~# git clone -b allanime-fix https://git hub.com/justchokingaround/ani-cli.git ani-cli-fix fatal: destination path 'ani-cli-fix' already exists and is not an empty directory. localhost:~# sudo install -m 755 ./ani-cli-fix/ani -cli "$(which ani-cli)" -ash: sudo: not found localhost:~# hash -r localhost:~# ani-cli --version 4.11.0

I tested to see if it worked again by inputing ani-cli konosuba but it still says episode released but no valid sources

Chesetr avatar Apr 17 '26 05:04 Chesetr

@Chesetr

You should be able to run these commands on iOS ISH to have the branch fix installed: git clone "https://github.com/justchokingaround/ani-cli.git" -b "allanime-fix" ~/.ani-cli cp ~/.ani-cli/ani-cli /usr/local/bin/ani-cli chmod +x /usr/local/bin/ani-cli rm -rf ~/.ani-cli

Finally, an "ani-cli -V" should return "4.12.0"

edit: Tested on my iPhone 16, this installed and returned the correct version number.

FlaccidJim avatar Apr 17 '26 10:04 FlaccidJim

Android with Termux:

Make sure you've installed git and openssl-tools

pkg install git openssl-tools

git clone "https://github.com/justchokingaround/ani-cli.git" -b "allanime-fix"

cp ani-cli/ani-cli /data/data/com.termux/files/usr/bin/ani-cli

rm -rf ani-cli

Magnamura avatar Apr 19 '26 04:04 Magnamura