Skip to content
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

Harmonry Next (API12 Beta3) crashed in release mode due to obfuscation #1385

Open
xiaoyaoyouzi163com opened this issue Aug 20, 2024 · 13 comments

Comments

@xiaoyaoyouzi163com
Copy link

xiaoyaoyouzi163com commented Aug 20, 2024

Device info:emulator
Build info:emulator 5.0.0.36(SP1DEVC00E36R4P11log)
Fingerprint:9a7a625fe04bd5585d59ccd743ecae5659a88160429be94bc73c89cca57e4149
Module name:(这是我们的包名,请忽略)
Version:1.0.0
VersionCode:1000000
PreInstalled:No
Foreground:Yes
Pid:12515
Uid:20020050
Reason:TypeError
Error name:TypeError
Error message:is not callable
Stacktrace:
Cannot get SourceMap info, dump raw stack:
    at defaultMMKV (entry|@tencent/mmkv|1.3.9|src/main/ets/utils/MMKV.ts:47:1)
    at userId (entry|user|1.0.0|src/main/ets/user/j4.ts:64:1)
    at d110 (entry|contacts|1.0.0|src/main/ets/m5/m6.ts:14:1)
    at func_main_0 (entry|contacts|1.0.0|src/main/ets/m5/m6.ts:37:1)

Harmonry Next API12 Beta3版本 debug模式下使用正常,release模式下APP启动闪退。FaultLog日志如上所示,请帮忙查看一下,非常感谢

@xiaoyaoyouzi163com
Copy link
Author

工程release模式下开启了混淆所致

@lingol
Copy link
Collaborator

lingol commented Aug 20, 2024

Now how do you solve this problem, in the end you still need obfuscation right?

@limuyang2
Copy link

你怎么处理的混淆?

@tanranran
Copy link

+1。请问如何处理混淆导致的问题

@lingol lingol reopened this Aug 26, 2024
@zhouqj1414657557
Copy link

同问

@lingol lingol changed the title Harmonry Next API12 Beta3版本 debug模式下使用正常,release模式下APP启动闪退 Harmonry Next (API12 Beta3) crashed in release mode due to obfuscation Aug 29, 2024
@hrp-ai
Copy link

hrp-ai commented Sep 2, 2024

-keep-global-name
MMKV
native

-keep-property-name
getDefaultMMKV

-keep
./**/MMKV.ets
我这么写没有这个错误了,没有测试是哪个配置有用(entry 和使用的模块都配置了)

@sunwen0402
Copy link

我昨天也遇到了同样的问题, 排查到大半夜,还好来着看了眼

@lingol
Copy link
Collaborator

lingol commented Sep 9, 2024

The official support of obfuscation has just been added to the dev branch. You guys can copy from it. 934b7fc
In the next version (v2.0.0) you won't need to copy it manually, it will be handled by IDE automatically.

@lingol
Copy link
Collaborator

lingol commented Sep 23, 2024

A beta version that fix this problem has been released in the ohpm, v2.0.0-SNAPSHOT.

@Er3c
Copy link

Er3c commented Sep 25, 2024

A beta version that fix this problem has been released in the ohpm, v2.0.0-SNAPSHOT.
why it still crached in v2.0.0-SNAPSHOT? what should I do anything else?
image

@lingol
Copy link
Collaborator

lingol commented Sep 25, 2024

Looks like obfuscation.txt is not correctly packed into the MMKV.har.
I will investigate it later.

@lingol
Copy link
Collaborator

lingol commented Sep 25, 2024

I have tried both turning on & off the obfuscation switch of the MMKV module, but both are not working for Apps that download MMKV from the OHPM.

I guess you guys will have to manually copy and paste the obfuscation configuration from MMKV.

@bluesky0506
Copy link

等待官方回复吧,我把混淆都去掉了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants