[Moto G 2015 Original Android Development] FNetV1:
Alright, I powered on my Moto G3 (it's no longer my daily driver phone) to see how I can help you with your YouTube app not loading problem.

Upon connecting it to my WiFi network, I performed the following experiments:

ROM: Stock, Rooted, Android version 6

Experiment #1: Run the YouTube app, the version that's on the device, without updating it. (few years obsolete):

Result: The very old YouTube app loaded without crashing, but right away it displayed a banner with the following message: "A new version of YouTube is available. Install it now from Google Play". There was no way to just acknowledge that message to continue to use the old version of YouTube, just one option: Install Now, which takes you to the Google Play store to update the app.

Experiment #2: I went ahead and updated the YouTube app through the Playstore.

Results: Once the update completed, I clicked on "Open" right from the Google Playstore, the app took like 5 seconds displaying the YouTube "Red Play" logo, then it asked me to pick one of my YouTube channel names to start the YouTube app under, it displayed the list (all of my four channels) for me to pick one. I picked one, then the YouTube app finished starting successfully.

Picking a YouTube video to play:

I searched for "HD Demo" then pressed the green magnifying glass. No problems so far...

I picked the second video on the search results titled "Samsung HD Demo - Colour Of China 1080P". There were three seconds of ad, click I clicked "Skipped Ad", then the video started playing just fine. I was still holding the phone in portrait mode.

Horizontal/Full-screen test of the same video playing:

I rotated the phone horizontally as the video was playing, nothing happened, it remained in portrait mode, and I did have screen rotation turned on in the notification bar. I manually tapped on the lower right corner full screen (square) symbol and then the video went full screen, taking the whole entire screen.

So far, no problems.

I rotated the phone in portrait mode, and the video auto-scaled itself back to portrait orientation. I flipped the phone in horizontal and the video this time went to full screen by itself, without me having to manually enter it in full screen, I once again rotated the phone in portrait mode, and the video exited full screen once again, just fine.

Power off/Restart the phone test, to see if the YouTube app will load just fine, or if I will be able to reproduce the problem that you are experiencing on your Moto G3:

After the phone restarted, I started the YouTube app it started just fine, I played another video and it played just fine, with no crashes.

I was unable to reproduce on my Moto G3 the YouTube crashing issue you are experiencing on your Moto G3.

Here's some helpful information that *MIGHT* be of help for you:

Phone: Moto G3

Android Version: 6.0 (Stock)

Android security patch level: December 1, 2015

Kernel-Version: 3.10.49-g88eb8b3

System version: 24.11.25.osprey_retla_na.retla.en.01.sprint

Rooted? Yes

Root method: SuperSU

SuperSU version: 2.78-SR1

TWRP version: 3.0.2-r5

Info: I have a total of three Moto G3 with me. All of them have their bootloader unlocked, two of them are rooted, one of them was left not rooted.

Additional info:

Moto G3 #1: The test that I just explained

Moto G3 #2: This one is running Android 7.1.1

ROM: LineageOS 14.1-20170316-NIGHTLY-osprey

LineageOS API level: Guava (7)

Baseband version: M8916_2020632.44.03.21.54R

Build date: Thu Mar 16 06:28:07 PDT 2017

Build number

lineage_osprey-userdebug 7.1.1 NOF27B

71s2961158

Test: I ran the same exact test. I didn't have the YouTube app installed previously on this phone, so I opened up the Google Playstore and I installed it freshly.

Result: When I opened the YouTube app, it opened just fine, and when I was getting ready to tap on the search magnifying glass to type the name of a test youtube video, I got a popup that said "Update Google Play services. YouTube won't run unless you update Google Play services". I tap on "update".

After Google Play Services finished updating, I tried to start the YouTube app again, and this time the app started without any further complaints.

I proceeded to play a youtube video, it played just fine. I was able to screen rotate it to full screen just fine. no issues.

So, here, on my second Moto G3 running LineageOS 14.1-20170316-NIGHTLY-osprey I had no issues running YouTube.

You said that you have run the following LineageOS versions: "lineage-14.1-20210829 and lineage-14.1-20210818".

You said that you are running TWRP version twrp-3.4.0-0 and that LineageOS was installed using that version of TWRP. You have indicated that you have used TWRP version twrp-3.5.2_9-0 before and that this particular more recent version of TWRP did not play ball with the installation of LineageOS, that's why you downgraded to TWRP version 3.4.0-0 where the installation of that rom was finally successful, albeit, with the YouTube problem you are currently having.

My take based on all the available data and my tests results ran on both: rooted and unrooted stocks and rooted LineageOS 14.1-20170316-NIGHTLY-osprey and recovery: TWRP version: 3.0.2-r5

Explanation #1: The TWRP version that you are running, version 3.4.0-0 *MAY* still be causing issues that may not be noticeable during the installation of the ROM phase, since probably no errors occurred, but something still happened that's affecting the YouTube app from loading correctly. *POSSIBLY* further downgrading your TWRP version down to my version that I am running on my test device: TWRP 3.0.2-r5 MIGHT solve the issue. So this is what I want you to do:

1. Download TWRP 3.0.2-r5 and flash that using fastboot to your Moto G3 If you are not able to find it anywhere, I MIGHT be able to supply you a copy, if I still have it on my hard drive, and I probably have it saved somewhere being a data packrat that I am.

2. After flashing this particular version of TWRP and performing a full backup of all of your important data, including important apps that you use (with titanium backup and restore) with all of its data, and Tripple checking that you are not about to lose any important unsaved information.

On TWRP, click on WIPE, then enter Advanced Wipe, check the following:

[ ] Dalvik / ART Cache

[ ] System

[ ] Data

* Only if you think you may not have enough space for the installation of the rom, then also check [ ] Internal Storage: Warning: This will erase all of your personal data off your phone's internal storage, make sure you have that info backup first ESPECIALLY the LineageOS Rom .zip that you are about to flash to your phone. Better yet, copy it over to a Micro SD card and later on flash the rom from the SD card, freeing up all that space from the already very limited 4GB internal storage.

[ ] Cache

Then swipe on the bottom (green bar) where it says "Swipe to Wipe" to wipe all those partitions you selected.

Right after the wipe is finished, go back and click on "Install" and go ahead, flash your (LineageOS) rom.

Once the rom is flashed, restart the phone, finish setting up your phone, and see if this time, the YouTube app works.

IF it still does not work, I would need you to make sure that you reproduce the same exact setup I have here: running the same exact version of LineageOS revision that I am currently running on my test Moto G3 phone: LineageOS 14.1-20170316-NIGHTLY-osprey

Download that particular EXACT version. If you are not able to source it, I MIGHT be able to provide a copy to you, provided that its still somewhere on my hard drive.

Repeat the TWRP advanced wiping and flashing procedure as before, but this time when it comes time to flash the rom, flash my version: LineageOS 14.1-20170316-NIGHTLY-osprey

Once flashing finishes, restart the phone, once the phone restart, finish setting it up, and go ahead, download and install the YouTube app and let me know if this time YouTube isn't crashing.

Oh, I forgot to mention the gapps version I am running:

The gapps that was installed on this particular setup that I used to perform these tests is: open_gapps-arm-7.1-micro-20170317.zip

Good news: since I had to hunt for these files since there was no way of knowing what gapps version I installed without looking for the source file, I was not only able to find a copy of that particular gapps on my computer but also a copy of the same exact revision of LineageOS rom I am running on this particular device.

For your reference, the original file names of both of these files are:

ROM: lineage-14.1-20170316-nightly-osprey-signed.zip file size: 355,277 KB

open_gapps-arm-7.1-micro-20170317.zip file size: 165,557 KB

TWRP: twrp-osprey-3.0.2-r5.img file size: 7,538 KB

These are the two files you would need to hunt in order to reproduce the same exact setup of mines, WITH HOPEFULLY the same exact result of me: of YouTube NOT crashing.

This is the experiment I would like you to run in order to rule out any potential issues with your device, issues that I am pretty sure could be corrected, but I first need to figure out if it's your much recent version of TWRP that you have at fault? If it's the much recent version of gapps that you flashed at fault? Is it the much recent revision of LineageOS that you flashed that has a really bad bug affecting the way the YouTube app runs? Any of the combinations of the above? By running the same exact setup as me, you are increasing the possibility of having the same exact results as me, and if this is not the case, then we can proceed with more experimentations, until, hopefully, a solution is found that would allow you to run the YouTube app just fine.

* Let me know if you would like me to provide for you those three files listed above, and if so, I will zip them and upload them somewhere on a file-sharing site for you to download later on.