Unable to view HTML trace report generated by Systrace tool in Android SDK
Asked Answered
C

12

31

I am trying to generate trace reports with Systrace tool in the Android SDK, but I cant view the report in the browser. It is blank and does not contain any information. I read in some forums that I need to open the report in Chrome browser, I opened it with Chrome as well but the report is blank.

I have enabled USB Debugging from the Developer Options and device is running Android 4.2 and I am using DDMS tool from the Android SDK to generate the traces.

http://developer.android.com/tools/help/systrace.html

Cavit answered 20/5, 2013 at 6:53 Comment(7)
have You tried Chrome browser? Seems it's available only in it.Heptamerous
Hi sandrstar, I have opened the trace.html file in Chrome broswer aswell, but It is blank and there is nothing in the report.Cavit
What size the file have? I've faced some issues with opening big files.Heptamerous
I have generated two reports with different --set-tags , one of them is 446 KB and the other is 2446KBs. They both are blank.Cavit
Hi Sandrstar, I installed Android SDK on Ubuntu and generated the trace file there through the systrace.py script, I can view the HTML reports in ubuntu now, but I cant figure out why the report was blank on Windows.Cavit
Mine is blank as well..Knorring
This answer worked for me: https://mcmap.net/q/470586/-react-native-android-systrace-html-is-blank-in-ubuntu-14-04Color
C
70

Firstly, if anyone is using Chrome v50.0+ on OS X or Windows, just try this please.

  1. open chrome browser and go to "chrome://tracing"

  2. in the tracing page, click load and select the systrace generated html file.

Secondly, I think it's a bug which is confirmed by Google.

It looks like this is because modern versions of Chrome have deprecated the Object.observe function[1][2].

For more information, please see this, https://code.google.com/p/android/issues/detail?id=57135

Coagulum answered 23/5, 2016 at 12:39 Comment(8)
Mine is Version 50.0.2661.102 (64-bit) on Mac. It works.Kurd
This is the only solution that worked for me on windows!Pericycle
@Pericycle thanks for your information. I'll edit my answer and hope it help more people.Coagulum
@Coagulum Thanks for the information it was very help full.Manlove
Nice workaround. But I wish the Systrace tool worked out of the box without this hack.Hoopla
Thanks! Opening html from "chrome://tracking" solved the issue.Daybreak
This workaround seems to work with any chromium based browsers, I was able to open trace report in Opera as well as Chrome.Nephogram
you are a geniusToboggan
I
4

I also have this problem running chrome on linux.

It seems they have bug in the implementation of javascript drawing the results.

Check JavaScript console. Mine says.

Uncaught TypeError: undefined is not a function

Incrocci answered 19/7, 2013 at 15:52 Comment(1)
developer.mozilla.org/en-US/docs/Web/API/Document/… Chrome and Opera are the only ones that support the function that causes that error in other browsersSpinach
W
3

On Windows , I just can see the result by doing this:

  1. get the trace.html
  2. open trace.html with chrome browser and open the chrome's developer tools then i find out there is 3 error in trace.html showing like this
  3. go to the error line ,then comment the error function like this
  4. save the modified html then refresh chrome , you can see the trace result

This is just not the best solution, but any way we can see the result.

Warthog answered 23/5, 2016 at 15:5 Comment(0)
F
1

I was having the same issue when capturing through eclipse on Ubuntu 12.04.

Worked around it by running the tool directly from the systrace folder (sdk/tools/systrace/)

./systrace.py -t 5 -o trace.html
Fm answered 12/8, 2013 at 14:10 Comment(0)
L
0

Update your SDK using SDK manager, select tools and platforms tools to be updated. Follow the normal procedure, and that's it. Chrome is recomended to see results.

Leukemia answered 2/9, 2013 at 18:23 Comment(0)
L
0

I solved this issue just by updating the SDK, use the SDK manager select tools and platform tools for update and you're done. Python script doesn't work on Windows. However even if the trace.html is generated and it can be seen, when data overflows, it is not possible to see the bottom part of the page. This because wasd navigation is not enough making the use of the scroll bar needed.

To do this you need to:

  • If you're in Linux modify the Python script and eliminate the overflow:hidden wherever is found.
  • If you're using SDK, edit the trace.html and eliminate the overflow:hidden wherever is found.

Hope it helps, it'll be nice that someone in Google can fix this on the source.

Leukemia answered 4/9, 2013 at 15:52 Comment(0)
S
0

I just found the my trace.html, which failed to open in IE/Firefox/Chrome, opened fine in the latest Opera (on my Windows PC).

Scamander answered 14/7, 2014 at 21:12 Comment(0)
B
0

For me, it didn't work on Firefox v34 but worked in Chrome v37 and I am on Ubuntu 12.04.

Bandage answered 22/2, 2015 at 18:6 Comment(0)
C
0

I also faced similar issues while trying to open a Systrace generated html file (around 10 MB ) on Firefox 37.0.1. However the same file works brilliantly on Chromium Version 37.0.2062.120 Ubuntu 12.04 (281580) (64-bit).

Cayser answered 8/4, 2015 at 13:27 Comment(0)
S
0

I've done following:

cd $ANDROID_HOME/platform-tools

git clone https://android.googlesource.com/platform/external/chromium-trace/

mv systrace old-systrace

ln -s chromium-trace/catapult/systrace/systrace/ systrace

that fixed my systrace issue

systrace report work in latest chrome at least

Speechless answered 2/6, 2016 at 1:49 Comment(0)
N
0

You can try my sample trace.html file to check if your Chrome version is okay or not. https://github.com/tngotran/systrace-android/blob/master/trace.html

Also here is a link to the official trace.html sample from Google https://source.android.com/devices/tech/debug/perf_traces.zip

By the way, from my experience, the command tool python systrace.py can create an output file trace.html without error, but result is an empty file (even the file size is larger than 5Mb or more).

We have to:

  1. Run the command adb root from your terminal to restart adbd as root
  2. Run the python systrace.py again

Then check your created report .html file in Chrome :)

Nuremberg answered 18/9, 2018 at 5:34 Comment(0)
S
0

Suggestion: Try to trace an emulator (they are for development)


The issue may be manufacture customization to the Android OS, making the problem potentially a device configuration issue caused by the manufacture.

There are several answers that may be helpful here.

None of these worked for me... but because of answer https://mcmap.net/q/460225/-unable-to-view-html-trace-report-generated-by-systrace-tool-in-android-sdk

I found that it would load data by using the linked trace files:

Also here is a link to the official trace.html sample from Google https://source.android.com/devices/tech/debug/perf_traces.zip

Using adb root did not work.

On a different device it worked flawlessly right off as well as using an emulator.

Spinach answered 16/10, 2018 at 13:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.