-
Notifications
You must be signed in to change notification settings - Fork 86
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
在react-native >= 0.60.2中,Android如果启用Hermes引擎会导致程序崩溃 #35
Comments
你的安卓版可以正常打包吗?我的打包报错了 |
@MichaelHao25 我可以打包,你的情况应该是另外一个问题,我倒没遇到过 |
当时忘了是为啥,签名我还是特意加进来的呢。。😅可能自己有用到吧,不过确实不建议这么做。有什么折中的方法吗? |
@0x5e 我也不用签名,我们可以考虑换一个签名库,或者把签名的代码删除就好了。目前我在自己的项目里边把hermes禁用掉了,不是很稳定不敢用在生产环境,估计还需要一段时间 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如上图所示,原因是包依赖中的jsrsasign使用了过时的API:
RegExp.prototype.compile
,Hermes已经不再支持react-native-alipay: https://github.com/0x5e/react-native-alipay/blob/master/index.js#L3
jsrsasign: https://github.com/kjur/jsrsasign/blob/d282c71cee92000c4807bcbf2212fedf3f22bd84/src/rsasign-1.2.js#L24
临时解决方案:在
node_modules/@0x5e/react-native-alipay/index.js
把jsressign和Alipay.sign删除,我没有在客户端中进行签名(你也不应该这样做),所以删除这个方法也不会造成影响补充:如果在开发模式中开启Debug JS Remotely,这个错误不会发生,很奇怪
The text was updated successfully, but these errors were encountered: