oasisfeng / island

Island for Android
https://play.google.com/store/apps/details?id=com.oasisfeng.island
Apache License 2.0
2.73k stars 203 forks source link

Youtube (and Youtube Music) won't start in work profile #148

Open DioVayne opened 4 years ago

DioVayne commented 4 years ago

Device: Realme X2 pro OS: Android 10 / RealUI 1.0 Root: yes

Youtube and YTM are both native on the phone and work as expected. The cloned versions only show the startup-logo and then 'freeze'. Nothing happens.

Extra info: It used to work and I'm not sure what changed. I uninstalled Island and tried again from scratch but to no avail. Other app in Island work just fine.

Update: I just noticed Google Home won't start either.

oasisfeng commented 4 years ago

Have you frozen Google Play services in Island?

Check the state of Google-related system apps and ensure they are unfrozen. You can search "google" in Island and check "Show hidden apps".

DioVayne commented 4 years ago

None of the apps in Island are frozen (also system/hidden app). Is there a way I can see in a log what happens when I start Youtube Music? The app opens to the logo (just that). Using the back button does nothing. I tried clearing data and cache for both YTM and GPS. Uninstalling wasn't possible because it's a system-app.

oasisfeng commented 4 years ago

You can always grab logcat or create a bug-report in development settings to digg.

DioVayne commented 4 years ago

I found this in the logcat:

FATAL EXCEPTION: main Process: com.google.android.apps.youtube.music, PID: 31075 java.lang.RuntimeException: Unable to create application com.google.android.apps.youtube.music.application.YouTubeMusicApplication: java.lang.SecurityException: query intent receivers: Neither user 1210113 nor current process has android.permission.INTERACT_ACROSS_USERS. at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6868) at android.app.ActivityThread.access$1700(ActivityThread.java:239) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2084) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:227) at android.app.ActivityThread.main(ActivityThread.java:7842) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980) Caused by: java.lang.SecurityException: query intent receivers: Neither user 1210113 nor current process has android.permission.INTERACT_ACROSS_USERS. at android.os.Parcel.createException(Parcel.java:2087) at android.os.Parcel.readException(Parcel.java:2055) at android.os.Parcel.readException(Parcel.java:2003) at android.media.IAudioService$Stub$Proxy.getStreamVolume(IAudioService.java:2429) at android.media.MediaRouter$RouteInfo.getVolume(MediaRouter.java:1948) at ars.a(PG:1) at asx.a(PG:51) at asy.a(PG:5) at asz.a(PG:5) at ast.a(PG:2) at asx.a(PG:144) at asx.j(PG:27) at asx.h(PG:152) at asx.<init>(PG:18) at asy.<init>(PG:1) at asz.<init>(PG:1) at ast.<init>(PG:1) at arf.<init>(PG:26) at aro.a(PG:27) at dhj.fK(PG:4201) at dhi.c(PG:1486) at dhi.get(PG:341) at did.a(PG:81) at dks.onCreate(PG:77) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1190) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6863) ... 8 more Caused by: android.os.RemoteException: Remote stack trace: at android.app.ContextImpl.enforce(ContextImpl.java:1954) at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1982) at com.android.server.pm.permission.PermissionManagerService.enforceCrossUserPermission(PermissionManagerService.java:3049) at com.android.server.pm.permission.PermissionManagerService.access$2100(PermissionManagerService.java:130) at com.android.server.pm.permission.PermissionManagerService$PermissionManagerServiceInternalImpl.enforceCrossUserPermission(PermissionManagerService.java:3264)

I'm guessing this is the culprid? Neither user 1210113 nor current process has android.permission.INTERACT_ACROSS_USER

DioVayne commented 4 years ago

I tried running this command too:

pm grant com.oasisfeng.island android.permission.INTERACT_ACROSS_USERS

oasisfeng commented 4 years ago

It's never about INTERACT_ACROSS_USERS, but seems like a bug in your ROM. As AOSP has no such routine reflected by the crash stack.

Please report the issue to your ROM maintainer or device manufacturer.

BTW, YouTube & YT Music work fine on my test devices.