bytedance / bytedance/btrace

集成RheaTrace 2.0之后, 仍然提示: We detect your app is not integrate with RheaTrace 2.0. Please have a check.

Open
#145 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
335
PR merge metrics
No merged PRs in 30d

Description

环境配置如下:
gradle wrapper 版本: **gradle-7.4-bin**
AGP版本: **7.3.1**
kotlin版本: **1.7.20**

集成btrace版本:
插件版本: `com.bytedance.btrace:rhea-gradle-plugin:2.0.3-rc02`
core版本: `com.bytedance.btrace:rhea-core:2.0.3-rc02`
配置:
```
rheaTrace {
compilation {
traceFilterFilePath = "${project.rootDir}/trace-filter/traceFilter.txt"
needPackageWithMethodMap = false
}
}
```

这样配置之后出来的apk, 可以看到插桩是已经成功的:
![Image](https://github.com/user-attachments/assets/117e59e5-f6a7-4e0a-b22b-1c6f50b03f97)

然后运行脚本:
**java -jar rhea-trace-shell.jar -a com.demo.btracedemo -t 10 -o output.pb -r rhea.all sched -fullClassName**

可以看到应用重启

但是最终导出trace文件出错:
```
02-06 16:12:13.384 I RheaTrace : os version is 30. default capture is PerfettoCapture
02-06 16:12:13.822 RheaTrace : start tracing...
02-06 16:12:24.009 RheaTrace : stop tracing...
02-06 16:12:25.363 E RheaTrace : /data/misc/perfetto-traces/2025-02-06_16-12-853c72.pftrace: 1 file pulled, 0 skipped. 40.4 MB/s (5961139 bytes in 0.141s)
02-06 16:12:25.841 E RheaTrace : We detect your app is not integrate with RheaTrace 2.0. Please have a check.
02-06 16:12:25.844 E RheaTrace : Error: download file trace error
02-06 16:12:25.844 E RheaTrace : Tips: check your app is integrated with btrace2.0 and is running.
```

更换了root的手机, 还是有上面的错误

然后我自己使用原生的perfetto, 是可以抓取 `trace_file.perfetto-trace` 文件的.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.