Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Note: Could not parse aggregated battery stats. #188

Open
a1exus opened this issue Jul 25, 2019 · 29 comments
Open

Note: Could not parse aggregated battery stats. #188

a1exus opened this issue Jul 25, 2019 · 29 comments

Comments

@a1exus
Copy link

a1exus commented Jul 25, 2019

Hello

I'm trying to follow Getting Started and while analyzing new bug report from my Google Pixel 2 XL w/ Android Q, I run into following message:

Note: Could not parse aggregated battery stats.

docker container (logs):

2019/07/25 16:05:27 Trace starting analysisServer processing for: POST
2019/07/25 16:05:27 Trace starting reading uploaded file. 13146743 bytes
2019/07/25 16:05:28 failed to extract time information from bugreport dumpstate: open /usr/lib/go-1.6/lib/time/zoneinfo.zip: no such file or directory
2019/07/25 16:05:28 Trace started analyzing "bugreport-taimen-QPP5.190530.014-2019-07-25-11-55-07.zip~bugreport-taimen-QPP5.190530.014-2019-07-25-11-55-07.txt" file.
2019/07/25 16:05:29 Trace finished processing checkin.
2019/07/25 16:05:29 Trace finished generating Historian plot.
Unknown history key: Mrc / 0
Unknown history key: Wrc / 0
Unknown history key: +Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Chtp / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: SubsystemPowerState / 
Unknown history key: -Chtp / 
Unknown history key: +Chtp / 
Unknown history key: SubsystemPowerState / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: -Chtp / 
Unknown history key: +Chtp / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: -Chtp / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: Mrc / 0
Unknown history key: Wrc / 0
Unknown history key: +Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Chtp / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: SubsystemPowerState / 
Unknown history key: -Chtp / 
Unknown history key: +Chtp / 
Unknown history key: SubsystemPowerState / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: -Chtp / 
Unknown history key: +Chtp / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: -Chtp / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: SubsystemPowerState / 
Unknown history key: +Sd / 
Unknown history key: -Sd / 
Unknown history key: +Sd / 
2019/07/25 16:05:29 Trace finished processing summary data.
2019/07/25 16:05:29 Trace finished analyzing "bugreport-taimen-QPP5.190530.014-2019-07-25-11-55-07.zip~bugreport-taimen-QPP5.190530.014-2019-07-25-11-55-07.txt" file.
2019/07/25 16:05:29 Trace ended analyzing file.
2019/07/25 16:05:29 Trace finished analysisServer processing for: POST

report seems empty on my screen although Device and Android ID made it, rest is pretty empty

Please advise.

@MichaelJokAr
Copy link

same error

@alsedi
Copy link

alsedi commented Aug 27, 2019

the same error

@gagneetsachdeva
Copy link

Same error

@ashlylau
Copy link

ashlylau commented Sep 9, 2019

+1

1 similar comment
@flawnn
Copy link

flawnn commented Sep 10, 2019

+1

@Redwid
Copy link

Redwid commented Sep 13, 2019

The same error on Pixel 2 on Android 10

In additional error section from web:
error.txt

And warning:

The underlying format for bt has 1 additional field(s) that are not captured.

@wenjie-zhou
Copy link

It's working now.

@gagneetsachdeva
Copy link

@wenjie-zhou: Any update to parse Android Q battery stats?

@wenjie-zhou
Copy link

gagneetsachdeva@: the provided docker binary now works with Q bugreports correctly for me:
docker run -p :9999 gcr.io/android-battery-historian/stable:3.0 --port 9999

@gagneetsachdeva
Copy link

@wenjie-zhou :I run battery historian through command line instead of docker. Any idea what changes will required in building from source code to parse Q bugreports?

@antgustech
Copy link

@wenjie-zhou :I run battery historian through command line instead of docker. Any idea what changes will required in building from source code to parse Q bugreports?

Yeah wondering that as well, I need to know what changed in the source.

@Redwid
Copy link

Redwid commented Sep 18, 2019

@wenjie-zhou how that supposed to be working now for you, as there are no changes for 2 years in this repo?

@wenjie-zhou
Copy link

I just used the docker version. Not sure about the source code part.

@Redwid
Copy link

Redwid commented Sep 18, 2019

What device are you using? Pixel? On Android 10? Could you please share batterystat file?

@kevinisbest
Copy link

Hi all, I think "Sd" means screenDoze and it only appears in the version after Android M.
So add this condition to this line might solve this kind of error.

case "S": // screen

@kevinisbest
Copy link

Sorry, I am wrong, the condition of screenDoze needs more processing to distinguish from screen.

@kevinisbest
Copy link

Hi all, according to the reply, the error comes from the mismatch of "0.0" and "0".
My solution is adding an if statement before line

tm, err := strconv.Atoi(t)

if t == "0.0" {
	t = "0"
}

Hope this will help you guys!

@Redwid
Copy link

Redwid commented Oct 15, 2019

@kevinisbest do you know if we need to modify current code from master to make it work?
Looks like for me nothing happened after selecting bugreport for upload.

@kevinisbest
Copy link

@Redwid if the version of the android devices are lower than Q, you don't need to change anything. As far as I know, the error only happens in version Q and need to modify the source code.

@Redwid
Copy link

Redwid commented Oct 15, 2019

@kevinisbest, understood. I've android Q.
With or without modification that you provided not able to make battery-historian works from the source code. Looks like it's running fine, no exception in console, web page is up, I'm able to select my bug-report , but nothing happened after.

@Redwid
Copy link

Redwid commented Oct 16, 2019

OK, I've sorted not uploading issue. Solution is here: #183

go run setup.go (this fails)
cd third_party/closure-library/
git reset --hard v20170409
cd -
go run setup.go (this passes)

@kevinisbest, but your fix with t = "0" didn't work for me. The same can't parse error.
And with that error log in console:
TypeError: a is null[Learn More] historian-optimized.js:200:65 historian.appstats.initialize http://localhost:9999/compiled/historian-optimized.js:200:65 historian.initialize http://localhost:9999/compiled/historian-optimized.js:662:44 historian.requests.uploadComplete http://localhost:9999/compiled/historian-optimized.js:665:304 e.fn.ajaxSubmit/t.complete http://www.gstatic.com/external_hosted/jquery_form/jquery.form.min.js:13:10175 j http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:2:27290 fireWith http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:2:28108 x http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:4:22187 b http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:4:25980

@JosielManzonni
Copy link

@Redwid if the version of the android devices are lower than Q, you don't need to change anything. As far as I know, the error only happens in version Q and need to modify the source code.

I´ve tried and does not work.
if t == "0.0" { t = "0" }

@ShineMeng
Copy link

+1 the same error

@Riven0108
Copy link

You can pull the battery logs from bugreport In Android 10/Q without using battery historian which is no longer working in 10.

See: https://www.reddit.com/r/GooglePixel/comments/ehmuwc/comment/fcn0uvp

@ShineMeng
Copy link

This issues in Linux fixed,executed the latest image: $ docker run -p 9999:9999 gcr.io/android-battery-historian/stable:3.0 --port 9999

@JosielManzonni
Copy link

sure, as you can looking in the issues.. the docker image work properly but if you want customize your own battery-historian and build the source-code inside of docker image it won't work.
only if u use docker image

@parkerlreed
Copy link

+1 for please fix upstream. docker is not an ideal solution for many people.

@BlackZheng
Copy link

+1 for please fix upstream. docker is not an ideal solution for many people.

Maybe you can try my solution

@lilydjwg
Copy link

I fixed the code myself: lilydjwg@a912fa0

Fly-in-Free added a commit to Fly-in-Free/battery-historian that referenced this issue Dec 20, 2022
fix android 10 according to google#188
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests