This was an annoying issue plaguing me for the past year or so. I don't know exactly when it started happening or why, but there are numerous posts and issue trackers for it scattered around the internet without a solid fix.
The problem
The official YouTube app suddenly decides to stop working about 2 days after rebooting the phone. There's no real information available (as a user) to figure out what's wrong.
All it says is "There was an error while playing. Touch to Retry".
Oh but not to worry, you're still able to watch YouTube ads before the actual video itself.
For those more technically inclined, here's what the stack trace looks like when YouTube freaks the hell out:
? E/OMX: FAILED to allocate omx component 'OMX.qcom.video.decoder.avc' err=InsufficientResources(0x80001000) | |
? W/ACodec: Allocating component 'OMX.qcom.video.decoder.avc' failed, try next one. | |
? E/ACodec: Unable to instantiate codec 'OMX.qcom.video.decoder.avc' with err 0xfffffff4. | |
? E/ACodec: signalError(omxError 0xfffffff4, internalError -12) | |
? E/MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 1 | |
? E/ResourceManagerService: getLowestPriorityBiggestClient_l: lowest priority 2 vs caller priority 2 | |
? D/MediaOutputController: detach(0xacbc5a10) | |
? W/MediaOutputPolicy: No callback found for owner: 0xacbc5a10 | |
? W/MediaCodec-JNI: try to release MediaCodec from JMediaCodec::~JMediaCodec()... | |
? W/MediaCodec-JNI: done releasing MediaCodec from JMediaCodec::~JMediaCodec(). | |
? E/ExoPlayerImplInternal: Internal track renderer error. | |
dsw: dtq: Decoder init failed: OMX.qcom.video.decoder.avc, MediaFormat(1, video/avc, -1, -1, 250, 144, 0, 1.0, -1, -1, null, 148166666, false, 626, 360) | |
at dtm.a(SourceFile:375) | |
at dtm.n(SourceFile:361) | |
at dtm.a(SourceFile:723) | |
at dty.a(SourceFile:328) | |
at dtm.a(SourceFile:5484) | |
at lyu.a(SourceFile:164) | |
at dtd.handleMessage(SourceFile:1431) | |
at android.os.Handler.dispatchMessage(Handler.java:98) | |
at android.os.Looper.loop(Looper.java:224) | |
at android.os.HandlerThread.run(HandlerThread.java:61) | |
at eeq.run(SourceFile:40) | |
Caused by: dtq: Decoder init failed: OMX.qcom.video.decoder.avc, MediaFormat(1, video/avc, -1, -1, 250, 144, 0, 1.0, -1, -1, null, 148166666, false, 626, 360) | |
at dtm.n(SourceFile:361) | |
at dtm.a(SourceFile:723) | |
at dty.a(SourceFile:328) | |
at dtm.a(SourceFile:5484) | |
at lyu.a(SourceFile:164) | |
at dtd.handleMessage(SourceFile:1431) | |
at android.os.Handler.dispatchMessage(Handler.java:98) | |
at android.os.Looper.loop(Looper.java:224) | |
at android.os.HandlerThread.run(HandlerThread.java:61) | |
at eeq.run(SourceFile:40) | |
Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.avc, error 0xfffffff4 | |
at android.media.MediaCodec.native_setup(Native Method) | |
at android.media.MediaCodec.<init>(MediaCodec.java:1675) | |
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1656) | |
at dtm.n(SourceFile:346) | |
at dtm.a(SourceFile:723) | |
at dty.a(SourceFile:328) | |
at dtm.a(SourceFile:5484) | |
at lyu.a(SourceFile:164) | |
at dtd.handleMessage(SourceFile:1431) | |
at android.os.Handler.dispatchMessage(Handler.java:98) | |
at android.os.Looper.loop(Looper.java:224) | |
at android.os.HandlerThread.run(HandlerThread.java:61) | |
at eeq.run(SourceFile:40) | |
? D/MediaOutputController: detach(0xacdb3cd0) | |
? E/YouTube: (unknown) Error with ExoPlayer video decoder initialization. | |
dtq: Decoder init failed: OMX.qcom.video.decoder.avc, MediaFormat(1, video/avc, -1, -1, 250, 144, 0, 1.0, -1, -1, null, 148166666, false, 626, 360) | |
at dtm.n(SourceFile:361) | |
at dtm.a(SourceFile:723) | |
at dty.a(SourceFile:328) | |
at dtm.a(SourceFile:5484) | |
at lyu.a(SourceFile:164) | |
at dtd.handleMessage(SourceFile:1431) | |
at android.os.Handler.dispatchMessage(Handler.java:98) | |
at android.os.Looper.loop(Looper.java:224) | |
at android.os.HandlerThread.run(HandlerThread.java:61) | |
at eeq.run(SourceFile:40) | |
Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.avc, error 0xfffffff4 | |
at android.media.MediaCodec.native_setup(Native Method) | |
at android.media.MediaCodec.<init>(MediaCodec.java:1675) | |
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1656) | |
at dtm.n(SourceFile:346) | |
at dtm.a(SourceFile:723) | |
at dty.a(SourceFile:328) | |
at dtm.a(SourceFile:5484) | |
at lyu.a(SourceFile:164) | |
at dtd.handleMessage(SourceFile:1431) | |
at android.os.Handler.dispatchMessage(Handler.java:98) | |
at android.os.Looper.loop(Looper.java:224) | |
at android.os.HandlerThread.run(HandlerThread.java:61) | |
at eeq.run(SourceFile:40) |
Fixes that I've tried
Over the year, nothing I tried works aside from restarting the phone. That was the only thing that kept YouTube working, other than just watching it via the browser which bypasses the app altogether.
In case you've stumbled upon this guide while running into an entirely different issue, here are a few things that may get YouTube working again:
Clearing cache and data for YouTube | didn't work |
Uninstalling and reinstalling YouTube | didn't work |
Downgrading to an older version of YouTube | didn't work - I went all the way back from v11 to v6 |
Removing current WiFi details and adding it back | didn't work - some people believe this works |
As mentioned above, restarting the phone | works for about 2 days. You'll find it frustrating after putting up with an ad and it doesn't work again |
Using a web browser to play the video | Works consistently, but it's not as good as the app |
The Solution!
Only until last week did I manage to find a new suggestion on XDA forums. I tried it out, gave it a few days and surprisingly it still works!
Unfortunately, it requires you to have root access to your Android device. I guess there's only so much you can do before you have to dig deeper to fix these sort of issues.
What you need to do is rename a few system files and restart the phone.
- Open up a file explorer capable of browsing system folders. If your phone doesn't have one, I recommend FX File Explorer as it comes with root explorer mode.
- Navigate your way to /system/etc/firmware/
- Rename the following files to add ".bak":
tzwidevine.b00 tzwidevine.b00.bak tzwidevine.b01 tzwidevine.b01.bak tzwidevine.b02 tzwidevine.b02.bak tzwidevine.b03 tzwidevine.b03.bak tzwidevine.mdt tzwidevine.mdt.bak - Restart your phone.
- Make YouTube great again! You shouldn't have any more issues with watching silly videos again after doing this.