question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Battery drain from YouTube Music due to Google Tag getting blocked

See original GitHub issue

First reported by XDA: https://www.xda-developers.com/psa-using-an-ad-blocker-a-bug-in-google-play-music-may-be-draining-your-battery/

It seems like this is still the case with YouTube Music: https://twitter.com/arter97/status/1397973993529823233

The app retries the connection to Google Tag without any sleep, resulting in consuming a CPU core 100% (this is a 8 core phone, so anything higher than 12.5% is consuming an entire core) and causing massive battery drains on Android.

While it seems to be the case that Google Tag is used for analytics, causing a massive battery drain over it isn’t worth it.

The issue is gone after removing:

www.googletagmanager.com
www-googletagmanager.l.google.com
googletagmanager.com
googletagservices.com
www.googletagservices.com

One thing I found weird is that the hosts file here already whitelists www.googletagservices.com for some reason, but is overridden with another non-commented entries:

# 0.0.0.0 www.googletagmanager.com #[affects ASUS]
#0.0.0.0 www.googletagservices.com              #interferes with techrepublic

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jawz101commented, May 28, 2021

@dnmTX not from @arter97. I recognize the name from XDA. They’ve been doing Android kernel stuff for 5+ years. Other blocklists can catch it for web-based traffic and whatnot but the Adaway list is specifically for mobile app things so I’d rather Adaway itself not affect Android performance.

2reactions
StevenBlackcommented, May 28, 2021

Most of those domains are included by several other curators. So this has little or no practical effect on this list.

Which is fine by me. 👀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Juhyung Park on Twitter: "This explains the additional battery ...
A Bug in Google Play Music May Be Draining Your Battery. ... Battery drain from YouTube Music due to Google Tag getting blocked...
Read more >
How to fix YouTube music battery drain?? Android app - Reddit
A little trick that seems to have worked for me though is to start playing whatever you want, YT Music will download and...
Read more >
PSA: Using an Ad Blocker? A Bug in Google Play Music May ...
A Bug in Google Play Music May Be Draining Your Battery. ... The way ad-blockers work is simple: they block all requests to...
Read more >
Battery drain - YouTube Music Community - Google Support
Only solution is to restrict the battery usage from permissions on background wich renders it unusable of course for a normal use.
Read more >
Why is Youtube draining the battery and what could we do?
Rebooting the Phone to get rid of the wakelock · Terminating the Youtube-app via the Settings -> Apps menue · Clearing Cache/Deleting Data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found