生产中的 React Native:Cryptojs AES 错误:格式错误的 UTF-8 数据

vad*_*ad. 5 javascript cryptojs react-native

我对我的react-native android应用程序和nodejs服务器使用了相同的aes加密代码(在https://github.com/imchintan/react-native-crypto-js#readme ),

let data = [{id: 1}, {id: 2}]
// Encrypt in react-native android app
let ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123').toString();

// Decrypt in the nodejs server
let bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
let decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
Run Code Online (Sandbox Code Playgroud)

当我的反应本机应用程序处于“JS Dev Mode”激活状态并且“JS Minify”停用时,服务器中的解密工作正常,但是当我将应用程序配置为“JS Dev Mode”停用并且“JS Minify”激活时,我无法解密服务器中的数据,

错误:Object.stringify 中的 UTF-8 数据格式错误

仅当应用程序处于生产模式时,服务器才会抛出错误,错误恰好在执行时发生:bytes.toString(CryptoJS.enc.Utf8)

有人可以向我解释我做错了什么或如何解决问题吗?