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

Error: download file trace error #96

Open
Alexmego opened this issue Jul 27, 2023 · 3 comments
Open

Error: download file trace error #96

Alexmego opened this issue Jul 27, 2023 · 3 comments

Comments

@Alexmego
Copy link

  • command

java -jar rhea-trace-shell.jar -a com.example.myapplication2 -t 3 -o output.pb -debug -r rhea.all sched -fullClassName

  • environment

AGP:7.4.2, rhea-gradle-plugin:2.0.3-rc02

  • log info

➜ ~ java -jar rhea-trace-shell.jar -a com.example.myapplication2 -t 3 -o output.pb -debug -r rhea.all sched -fullClassName
07-27 16:54:19.728 D RheaTrace : Run adb devices
07-27 16:54:19.729 D RheaTrace : Got adb path: /usr/local/bin/adb
07-27 16:54:19.750 I RheaTrace : workspace clear: /Users/panchow/rheatrace.workspace
07-27 16:54:19.750 D RheaTrace : Run adb shell setprop persist.traced.enable 1
07-27 16:54:19.774 D RheaTrace : check port free: 8074
07-27 16:54:19.809 D RheaTrace : Run adb shell netstat -tunlp
07-27 16:54:19.842 D RheaTrace : port 8074 is free
07-27 16:54:19.842 D RheaTrace : Run adb shell setprop debug.rhea.httpServerPort 8074
07-27 16:54:19.863 D RheaTrace : Run adb shell setprop debug.rhea.startWhenAppLaunch 1
07-27 16:54:19.883 D RheaTrace : Run adb shell setprop debug.rhea.mainThreadOnly 0
07-27 16:54:19.902 D RheaTrace : Run adb shell setprop debug.rhea.methodIdMaxSize 500000000
07-27 16:54:19.923 D RheaTrace : Run adb shell setprop debug.rhea.category.all 1
07-27 16:54:19.942 D RheaTrace : Run adb shell getprop ro.build.version.sdk
07-27 16:54:19.962 I RheaTrace : os version is 30. default capture is PerfettoCapture
07-27 16:54:19.962 D RheaTrace : system level capture: PerfettoCapture
07-27 16:54:19.967 D RheaTrace : record_android_trace ready: /Users/panchow/rheatrace.workspace/record_android_trace
07-27 16:54:19.967 D RheaTrace : /Users/panchow/rheatrace.workspace/record_android_trace -no_open -a com.example.myapplication2 -t 4s -o /Users/panchow/rheatrace.workspace/systemTrace.trace sched -b 100mb
07-27 16:54:20.127 D RheaTrace : --------- beginning of main
07-27 16:54:20.127 D RheaTrace : I/perfetto( 1384): probes_producer.cc:230 Ftrace setup (target_buf=5)
07-27 16:54:20.127 D RheaTrace : I/perfetto( 1384): ftrace_procfs.cc:176 enabled ftrace
07-27 16:54:20.127 RheaTrace : start tracing...
07-27 16:54:20.127 D RheaTrace : Run adb shell am force-stop com.example.myapplication2
07-27 16:54:20.159 D RheaTrace : Run adb shell dumpsys package com.example.myapplication2
07-27 16:54:20.202 D RheaTrace : Run adb shell am start -n com.example.myapplication2/com.example.daynightdemo.MainActivity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
07-27 16:54:20.247 D RheaTrace : Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.myapplication2/com.example.daynightdemo.MainActivity }
07-27 16:54:23.252 RheaTrace : stop tracing...
07-27 16:54:23.253 D RheaTrace : Run adb shell am broadcast -a com.bytedance.rheatrace.switch.stop com.example.myapplication2
07-27 16:54:23.315 D RheaTrace : Broadcasting: Intent { act=com.bytedance.rheatrace.switch.stop flg=0x400000 pkg=com.example.myapplication2 }
07-27 16:54:23.316 D RheaTrace : Broadcast completed: result=0
07-27 16:54:24.096 D RheaTrace : I/perfetto( 1384): probes_producer.cc:329 Producer stop (id=9)
07-27 16:54:24.096 D RheaTrace : I/perfetto( 1384): ftrace_procfs.cc:183 disabled ftrace
07-27 16:54:24.119 D RheaTrace : I/perfetto( 1384): probes_producer.cc:329 Producer stop (id=10)
07-27 16:54:24.129 D RheaTrace : I/perfetto( 2894): perfetto_cmd.cc:810 Wrote 1894052 bytes into /data/misc/perfetto-traces/2023-07-27_16-54-8fc3a5.pftrace
07-27 16:54:24.131 D RheaTrace : I/perfetto( 1385): ng_service_impl.cc:1948 Tracing session 5 ended, total sessions:0
07-27 16:54:24.548 D RheaTrace : /data/misc/perfetto-traces/2023-07-27_16-54-8fc3a5.pftrace: 1 file pulled, 0 skipped. 36.7 MB/s (1894052 bytes in 0.049s)
07-27 16:54:24.586 D RheaTrace :
07-27 16:54:24.586 D RheaTrace :
07-27 16:54:24.586 D RheaTrace : Pulling into /Users/panchow/rheatrace.workspace/systemTrace.trace
07-27 16:54:24.599 D RheaTrace : Run adb forward tcp:8074 tcp:8074
07-27 16:54:24.622 D RheaTrace : 8074
java.net.SocketException: Unexpected end of file from server
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:900)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:723)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:897)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:723)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at java.base/java.net.URL.openStream(URL.java:1165)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:2953)
at com.bytedance.rheatrace.processor.Adb$Http.get(Adb.java:164)
at com.bytedance.rheatrace.processor.Main.showBufferUsage(Main.java:158)
at com.bytedance.rheatrace.processor.Main.main(Main.java:104)
07-27 16:54:24.650 D RheaTrace : Run adb shell pidof com.example.myapplication2
07-27 16:54:24.682 D RheaTrace : 2946
07-27 16:54:24.690 D RheaTrace : Run adb shell pm path com.example.myapplication2
07-27 16:54:24.720 D RheaTrace : Run adb pull /data/app/~~dbupoqLVORpEnJmBfs5SBA==/com.example.myapplication2-Uy1Zs-Xh7Cj_r-zT045UCg==/base.apk /Users/panchow/.113d0dfa-fdff-411e-99ba-12daac0d25d6.apk
07-27 16:54:24.951 D RheaTrace : /data/app/~~dbupoqLVORpEnJmBfs5SBA==/com.example.myapplication2-Uy1Zs-Xh7Cj_r-zT045UCg==/base.apk: 1 file pulled, 0 skipped. 40.5 MB/s (8981856 bytes in 0.211s)
07-27 16:54:24.981 E RheaTrace : Error: download file trace error
07-27 16:54:24.981 E RheaTrace : Tips: check your app is integrated with btrace2.0 and is running.
com.bytedance.rheatrace.processor.core.TraceError: download file trace error
at com.bytedance.rheatrace.processor.Adb$Http.download(Adb.java:158)
at com.bytedance.rheatrace.processor.Main.main(Main.java:105)
Caused by: java.net.SocketException: Unexpected end of file from server
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:900)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:723)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:897)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:723)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at java.base/java.net.URL.openStream(URL.java:1165)
at com.bytedance.rheatrace.processor.Adb$Http.download(Adb.java:154)
... 1 more
07-27 16:54:26.105 D RheaTrace : Run adb shell setprop debug.rhea.startWhenAppLaunch 0
07-27 16:54:26.152 D RheaTrace : Run adb shell setprop debug.rhea.mainThreadOnly 0
07-27 16:54:26.185 D RheaTrace : Run adb shell setprop debug.rhea.methodDurThreshold 0
07-27 16:54:26.216 D RheaTrace : Run adb shell setprop debug.rhea.category.all 0
➜ ~

@kmfish
Copy link

kmfish commented Oct 18, 2023

遇到同样问题,怎么解决呢?

1 similar comment
@YellowQC
Copy link

遇到同样问题,怎么解决呢?

@Codey7
Copy link

Codey7 commented Dec 12, 2023

遇到同样问题,怎么解决呢?

用1.0吧,超哥

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

4 participants