/home/fireboltaa/node-anime-viewer/node_modules/crypto-js/cipher-core.js:728
var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
^
TypeError: Cannot read properties of undefined (reading 'ciphertext')
at Object.decrypt (/home/fireboltaa/node-anime-viewer/node_modules/crypto-js/cipher-core.js:728:83)
at Object.decrypt (/home/fireboltaa/node-anime-viewer/node_modules/crypto-js/cipher-core.js:205:59)
at generateEncryptAjaxParameters (file:///home/fireboltaa/node-anime-viewer/src/modules/anime.js:47:50)
at AnimeEpisode.getAvailableVideos (file:///home/fireboltaa/node-anime-viewer/src/modules/anime.js:150:24)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///home/fireboltaa/node-anime-viewer/src/index.js:104:34
Additional information
Through some testing, I believe that the problem is somewhere along the line, null is returned. Before the error sent, I had received an almost identical error, but with .toString() instead of ciphertext.
The error was remedied by using String(value6) as oppose to value6.toString(). Because String() will just return null for a null value, while .toString() will result in a TypeError, I believe that some value is null.
I don't know what exactly as I don't know any JavaScript myself, and because of that I am not able to investigate further.
Version
1.2.0 +
Platform
5.13.0-30-generic #33-Ubuntu SMP Fri Feb 4 17:03:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Module
Most likely
anime.js
What steps will reproduce the bug?
Search any anime, then try selecting an episode. It will crash with a TypeError.
How often does it reproduce? Is there a required condition?
There is no instance where it does not happen from what I have seen.
What is the expected behavior?
Episode should not be null/undefined.
What do you see instead?
Crash output image: https://file.garden/YK55Rqs3-AHC5Tk9/Images/crash.png
Text:
Additional information
Through some testing, I believe that the problem is somewhere along the line, null is returned. Before the error sent, I had received an almost identical error, but with
.toString()
instead ofciphertext
.The error was remedied by using
String(value6)
as oppose tovalue6.toString()
. BecauseString()
will just returnnull
for a null value, while.toString()
will result in a TypeError, I believe that some value is null.I don't know what exactly as I don't know any JavaScript myself, and because of that I am not able to investigate further.