Closed HeyItsJono closed 1 year ago
I am unable to reproduce, leaving open to see if anyone else is.
For some more information I just tried clearing the data of Revanced YouTube and now when I open it, it immediately force-quits. Scoop catches the following error:
FATAL EXCEPTION: DG
Process: com.google.android.youtube, PID: 5821
java.lang.SecurityException: GoogleCertificatesRslt: not
allowed: pkg=com.google.android.youtube, sha256= [02098571b297ad71d9fe637a407c5e80bf7f516a161288a5bef0231e6e8b0534], atk=false, ver=230617044.true (go/gsrlt)
at
android.os.Parcel.createExceptionOrNull(Parcel.java:2426)
at android.os.Parcel.createException(Parcel.java:2410)
at android.os.Parcel.readException(Parcel.java:2393)
at android.os.Parcel.readException(Parcel.java:2335)
at nmo.A(PG:16)
at nml.a(PG:1)
at nmn.c(PG:1)
at nme.d(PG:1)
at nmh.handleMessage(PG:36)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)`
Apologies I accidentally hit "Close with comment".
The mount fails to bypass validation, my best bet would be that Google is rolling out a fix for bypassing verification check via root, will require other users to report too to confirm
@HeyItsJono Can you try logging in with a different YouTube account, and see if the issue persists?
Also try logging in while using a VPN to a different region.
@HeyItsJono Can you try logging in with a different YouTube account, and see if the issue persists?
Also try logging in while using a VPN to a different region.
Hi thanks for the reply. I tried a reinstall for this, a different account didn't work unfortunately, and neither did using a VPN to change continent. Interestingly after each fresh root install Revanced YT works until I reboot.
Scoop is now also detecting a different error on YT crashing when opening:
FATAL EXCEPTION: main
Process: com.google.android.youtube, PID: 4828
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.youtube/com.google.android.apps.youtube.app.watchwhile.WatchWhileActivity}: java.lang.RuntimeException: EntityStore failed loading from .so
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3707)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.RuntimeException: EntityStore failed loading from .so
at wcj.d(PG:4)
at wcj.a(PG:1)
at fzi.b(PG:1)
at fzi.<init>(PG:1)
at fxj.j(PG:1)
at fea.o(PG:61)
at fea.a(PG:1)
at asvf.a(PG:1)
at fea.o(PG:64)
at fea.a(PG:1)
at fea.o(PG:65)
at fea.a(PG:1)
at asvf.a(PG:1)
at fcw.e(PG:13)
at fcw.a(PG:29)
at asvf.a(PG:1)
at fcw.b(PG:75)
at fcw.a(PG:40)
at asvf.a(PG:1)
at fcw.b(PG:6)
at fcw.a(PG:40)
at asvf.a(PG:1)
at fcw.m(PG:41)
at fcw.a(PG:35)
at asvf.a(PG:1)
at fcw.m(PG:42)
at fcw.a(PG:35)
at asvf.a(PG:1)
at fcw.o(PG:69)
at fcw.a(PG:33)
at asvf.a(PG:1)
at com.google.android.apps.youtube.app.watchwhile.WatchWhileActivity.o(PG:16)
at kdi.a(PG:28)
at qv.onCreate(PG:3)
at bu.onCreate(PG:1)
at fob.onCreate(PG:8)
at mcr.onCreate(PG:1)
at app.revanced.integrations.swipecontrols.SwipeControlsHostActivity.onCreate(SwipeControlsHostActivity.kt:1)
at com.google.android.apps.youtube.app.watchwhile.WatchWhileActivity.onCreate(PG:4)
at android.app.Activity.performCreate(Activity.java:8057)
at android.app.Activity.performCreate(Activity.java:8037)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3688)
... 12 more
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsapi.so" not found: needed by /data/data/com.google.android.youtube/app_lib/libelements.so.18.03.36 in namespace classloader-namespace
at java.lang.Runtime.load0(Runtime.java:929)
at java.lang.System.load(System.java:1625)
at fcl.X(PG:48)
at tyn.ag(PG:7)
at ffg.a(PG:1)
at ahvl.e(PG:8)
at ahvl.f(PG:5)
at ahvl.c(PG:1)
at pat.a(PG:3)
at wcf.<init>(PG:1)
at wcm.<init>(PG:6)
at wcj.g(PG:4)
at wcj.d(PG:1)
at wcj.a(PG:1)
at fzi.b(PG:1)
at fzi.<init>(PG:1)
at fxj.j(PG:1)
at fea.o(PG:61)
at fea.a(PG:1)
at asvf.a(PG:1)
at feb.A(PG:1)
at feb.yE(PG:1)
at feb.de(PG:1)
at fea.o(PG:11)
at fea.a(PG:1)
at asvf.a(PG:1)
at abcf.c(PG:6)
at ffk.run(PG:57)
at ulq.run(PG:7)
at afvw.run(PG:3)
at oxg.run(PG:5)
at oxk.run(PG:23)
at owj.run(PG:50)
at java.lang.Thread.run(Thread.java:1012)
at oxp.run(PG:5)
Please record the following in full and exact detail:
Ok, here's a video of the process. I censored my accounts and snipped irrelevant chunks of waiting out of the video for speed purposes but the whole actual process is shown here.
I start with Revanced Manager (and all patched apps) uninstalled, YT + YT Music in their stock state (after doing "uninstall updates" from App Info), and having deleted the leftover revanced bash scripts from the post-fs and service.d directories.
Then you can see me install Revanced Manager, update YT/Music to the appropriate versions using stock APKs from APKmirror, then you see me show that they both function appropriately as stock, then I patch YT. After patching, I show YT Revanced works initially, then I reboot and demonstrate the "Couldn't sign in" error. Then, after clearing data, we get the force-quit/certificate error. Unfortunately for some reason Scoop wasn't capturing the thrown error like it usually does, so I just show the youtube-specific logcat instead, and I've attached that log here too.
https://user-images.githubusercontent.com/4620093/223604106-78393d13-8c37-41d6-86de-edf7b479f9ce.mp4
ReVanced Manager drops scripts in the service.d
directory. Try adding a delay in the script by prepending sleep 20
. Reboot and wait 20s before launching again, check if the issue is still occuring.
ReVanced Manager drops scripts in the
service.d
directory. Try adding a delay in the script by prependingsleep 20
. Reboot and wait 20s before launching again, check if the issue is still occuring.
Unfortunately, the issues persist. Should I add it to the post-fs script too? I've just done the service.d script so far.
In that case, remove the mount script from service.d
. After a reboot manually run the mount script and check for anomalies in the process of mounting. In the recording, the initial mount succeeded, check how the mount process differs when doing it manually.
I removed the mount script from service.d, then attempted to run the script line by line in Termux, and got no shell output to indicate anything had failed, however Youtube has not mounted, and remains in stock form. I would have expected some kind of error to throw in Termux but the commands run without issue. I tried both as user and root.
Running mount
shows me it seems to have actually mounted, but this hasn't manifested in YT Revanced actually showing up on my system.
/dev/block/dm-34 on /data/app/~~XhLp3E_-as0AzQsY5gQaJg==/com.google.android.youtube-FW8-VlJ9ca61UEQpaE4jhw==/base.apk type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier)
Initially, the mount worked via the ReVanced Manager in your video, reproduce that manually. Check what causes it to work, and what causes it to not work anymore.
Initially, the mount worked via the ReVanced Manager in your video, reproduce that manually. Check what causes it to work, and what causes it to not work anymore.
Apologies, I'm confused; I figured that in my video after installing the patched app the mount always succeeds, since even after restart it's clear that it's Revanced YT (as indicated by the icon) that's present, not stock. I thought the issue was that this mounted app doesn't seem to pass this certificate check. When I manually run the script I can't get the app to mount, in this scenario the app remains as stock YT and runs fine (albeit without any revanced features obviously). What makes you say the mount process fails on reboot?
The way I understand it is that the mount succeeds but if you do it manually, it does not. Also if the mount succeeds, on reboot it crashes. The first question would be to solve why the mount fails if you do it manually. The second question to solve would be to understand why it initially does not crash.
Huh weird, I got the mount to work by running it manually when I ssh into my phone as root
via the SSH for Magisk module.
Steps (as root user via ssh):
service.d
mount script, I called mine ytmount.sh
$PREFIX/bin
folder (/data/data/com.termux/files/usr/bin
) to allow executionchmod +x
.sh /data/data/com.termux/files/usr/bin/ytmount.sh
mount | grep youtube
, output is: /dev/block/dm-34 on /data/app/~~XhLp3E_-as0AzQsY5gQaJg==/com.google.android.youtube-FW8-VlJ9ca61UEQpaE4jhw==/base.apk type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier)
And this works! The app doesn't force quit when started and has all the Revanced features! Unfortunately, it seems like this must be done via the root user of the Magisk SSH module, which requires my laptop to be handy. It didn't work before when I was running as root via Termux directly, even though mount
via Termux confirms that the mount is successful, with an identical output of mount | grep youtube
when done via Termux or ssh.
I thought at first this was because Termux might be using its own mount
binary (since one exists in the aforementioned bin
folder), but I've added which mount
to the start of the mount script and it confirms that as long as you start a root shell with su
in Termux before running the mount script, it uses /system/bin/mount
.
I'll continue investigating but any ideas you guys might have would be much appreciated because so far we know:
service.d
, the mount succeeds but the app force-quits due to cert failuremount
shows that the mount exists, but the YT app doesn't change to Revanced, and remains stockmount
shows the mount exists, and the YT app does change to Revanced, and it doesn't crash or force-quit, it works normally.Still no closer to the root cause of all this, but as a small added convenience I can confirm that it's possible to use Termux as a client to SSH into my phone itself and run the mount script from there, and this also works, removing the need for a separate device to act as an SSH client. Still really roundabout though. Obviously this all needs to be done after removing the mount script from the Magisk service.d
folder so it doesn't run at startup and cause the error-prone mount.
Steps:
$PREFIX/etc/ssh
ssh-keygen -t rsa 2048 -f USERNAME_id_rsa
su
, then cat USERNAME_id_rsa.pub >> /data/ssh/root/.ssh/authorized_keys
, then cat USERNAME_id_rsa.pub >> /data/ssh/shell/.ssh/authorized_keys
, then exit
to step back into the regular userssh root@localhost -i $PREFIX/etc/ssh/USERNAME_id_rsa
sh /data/data/com.termux/files/usr/bin/ytmount.sh
(where ytmount.sh
is my mount script from the prev. post)exit
, exit
to close TermuxThis can be condensed into a single shell script once the initial setup above is done, so it can just be run quickly after each boot. For example, where ytmount.sh
is your mount script, name the following ytssh.sh
:
#!/system/bin/sh
ssh root@localhost -i $PREFIX/etc/ssh/USERNAME_id_rsa 'sh /data/data/com.termux/files/usr/bin/ytmount.sh'
Put it in /data/data/com.termux/files/usr/bin
, and chmod +x
to make it executable, then on each reboot you just have to open Termux and run ytssh.sh
, then force-stop Youtube and restart it, it should be Revanced. You can use the Termux:Boot app to run the script at startup, making the whole process effectively automatic/seamless, but very much a jerry-rigged solution.
Using SSH is kinda unelegant. You can elevate to a root user in the script directly. Have you tried that?
Using SSH is kinda unelegant. You can elevate to a root user in the script directly. Have you tried that?
I tried both of the following and neither worked, SSH seems to be the only way to get it to work for some reason.
#!/system/bin/sh
sudo sh /data/data/com.termux/files/usr/bin/ytmount.sh
and
#!/system/bin/sh
su -c 'sh /data/data/com.termux/files/usr/bin/ytmount.sh'
I also still have no idea what's different about manually mounting vs. the script mounting.
The SSH server is still opening a shell for the user you login as. There's no difference in running the command with that user directly on the host, or over ssh via the same user.
The SSH server is still opening a shell for the user you login as. There's no difference in running the command with that user directly on the host, or over ssh via the same user.
I'm aware there shouldn't be, but in practice there is. I can't explain why. Even if I just use su
to open a shell as root then manually run the command straight from the terminal (or use sh script.sh
), it doesn't work.
There's also the question of why the mount works fine when the script runs manually, vs. force-quitting when run as a magisk service.d script.
Well, it doesn't make much sense, check if the user is different in the ssh shell
id
in each shell (via SSH, and directly on phone Termux) prints the same: uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
In that case you are likely doing something wrong, as the commands are executed by the same user. Try recording both, via SSH and via normal shell.
I faced this problem a while ago, and I thought that I should share it here, if anything is of worth to any of you. Basically problem was the same signin for both the apps was not working and I was having root version installed. Alongside the root version, I was also using yt revanced non root with microg. But, I was not signed in to the non root version. I played with some options here and there, like uninstalling reinstalling and repatching apps. Finally, tried uninstalling non root version and to my surprise, it worked.
Btw, Thanks for your time to build such good apps and all others pieces of software.
Closing since no further reports of this issue exist.
Type
Error at runtime
Bug description
Neither YT not YT Music are functioning.
YouTube: Upon opening, immediately shows a screen stating my account could not be signed into. If I go to the account picker it is blank. If I uninstall Revanced and just use vanilla YouTube everything works.
YouTube Music: Loads the front page fine and appears to work. After selecting a song however, I am met with the error "There was a problem signing in to your account".
Steps to reproduce
Relevant log output
Screenshots or videos
Solution
I have yet to find a solution, but I can say that I've tried uninstalling and reinstalling plenty of times without success.
Additional context
Version: 0.0.56 Model: Pixel 5 Android Version: 12 Arch: arm64-v8a
Acknowledgements