Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

OGYouTube is crashing when posting a notification #1376

Closed
FaySmash opened this issue Jul 23, 2017 · 15 comments
Closed

OGYouTube is crashing when posting a notification #1376

FaySmash opened this issue Jul 23, 2017 · 15 comments

Comments

@FaySmash
Copy link

Description
OGYouTube is crashing since N-ify version 839 when posting a notification. E.g., when I try to switch to background playback mode or try to download something, the app crashes. The change which caused this was commit #1357. The biggest problem here is, that the whitelisting function of N-ify seems to doesn't apply to OGYouTubes notification style.

Module version (build version)
Issue appears on version >838

Xposed log / logcat

  • crashlog by scoop when crashing while switching to background playback:

de.robv.android.xposed.XposedHelpers$InvocationTargetError: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
at de.robv.android.xposed.XposedHelpers.callMethod(XposedHelpers.java:1225)
at tk.wasdennnoch.androidn_ify.systemui.notifications.NotificationHooks$9.replaceHookedMethod(NotificationHooks.java:568)
at de.robv.android.xposed.XC_MethodReplacement.beforeHookedMethod(XC_MethodReplacement.java:29)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:314)
at android.app.Notification$Builder.processSmallIconAsLarge()
at android.app.Notification$Builder.applyStandardTemplate(Notification.java:3014)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
at android.app.Notification$Builder.applyStandardTemplate()
at android.app.Notification$Builder.applyStandardTemplate(Notification.java:2990)
at android.app.Notification$Builder.makeContentView(Notification.java:3186)
at android.app.Notification$Builder.buildUnstyled(Notification.java:3361)
at android.app.Notification$Builder.build(Notification.java:3686)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
at android.app.Notification$Builder.build()
at net.ogmods.youtube.remotecontrols.Lollipop.buildNotification(Lollipop.java:194)
at net.ogmods.youtube.remotecontrols.Lollipop.onPlayerChange(Lollipop.java:296)
at net.ogmods.youtube.remotecontrols.Lollipop.init(Lollipop.java:113)
at net.ogmods.youtube.remotecontrols.Lollipop.buildNotification(Lollipop.java:172)
at net.ogmods.youtube.remotecontrols.Lollipop.onTimeChange(Lollipop.java:310)
at net.ogmods.youtube.remotecontrols.Notification.onTimeChange(Notification.java:36)
at net.ogmods.youtube.OG.setTime(OG.java:504)
at net.ogmods.youtube.remotecontrols.Lollipop$Updater.run(Lollipop.java:63)
at java.util.Timer$TimerImpl.run(Timer.java:284)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
at tk.wasdennnoch.androidn_ify.utils.ResourceUtils.getColor(ResourceUtils.java:61)
at tk.wasdennnoch.androidn_ify.utils.NotificationColorUtil.resolveContrastColor(NotificationColorUtil.java:332)
at tk.wasdennnoch.androidn_ify.systemui.notifications.NotificationHooks$13.replaceHookedMethod(NotificationHooks.java:635)
at de.robv.android.xposed.XC_MethodReplacement.beforeHookedMethod(XC_MethodReplacement.java:29)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:314)
at android.app.Notification$Builder.resolveColor()
at java.lang.reflect.Method.invoke(Native Method)
at de.robv.android.xposed.XposedHelpers.callMethod(XposedHelpers.java:1217)
... 24 more

  • crashlog by scoop when crashing while trying to download something:

android.app.RemoteServiceException: Bad notification posted from package com.google.android.youtube: Couldn't expand RemoteViews for: StatusBarNotification(pkg=com.google.android.youtube user=UserHandle{0} id=-1 tag=null score=0 key=0|com.google.android.youtube|-1|null|10242: Notification(pri=0 contentView=com.google.android.youtube/0x1090087 vibrate=default sound=null tick defaults=0x6 flags=0x6b color=0x00000000 vis=PRIVATE))
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1526)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5471)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

@rvictorr
Copy link
Contributor

Android version?

@FaySmash
Copy link
Author

@numeprenume oh, sorry for not mentioning it. I'm on android 6.0.1_r74-MOB31K. to be exact, I'm running resurrection remix os 5.7.4-2016-1117 on my LG G3 D855.

@rvictorr
Copy link
Contributor

The first issue should be fixed. I'm not sure if the download crash is fixed, as I couldn't test it (OGYoutube would just load infinitely when choosing the download location)

@FaySmash
Copy link
Author

I'm afraid to report that the problem still appears :/
May we investigate further, but if it would cause a to huge inconvenience I could settle with original YouTube + XPosed modules instead.
(Side notes: I use OGYouTube 3.5 as XPosed version. YouTube Background playback XPosed modul works fine with original YouTube app but crashes with OGYouTube. So OGYR still crashes when posting any notification)

@rvictorr
Copy link
Contributor

rvictorr commented Jul 25, 2017

Does this work? (rename to .apk and install)

rvictorr added a commit to rvictorr/AndroidN-ify that referenced this issue Jul 25, 2017
@FaySmash
Copy link
Author

FaySmash commented Jul 25, 2017

@numeprenume no, sadly not... only difference I see in the crash log are the missing <Xposed> flags in the log and a few changed line numbers. but thank you for your effort, I really appreciate it!

@rvictorr
Copy link
Contributor

Well that's weird...now I can't reproduce the crash anymore, so maybe wait for the next automated build and report back?

@FaySmash
Copy link
Author

@numeprenume I will. Maybe I should reinstall OGYT..? Do you use the XPosed or MicroG version? And does this mean you were able to reproduce the crash in the beginning? Also I updated the module, not reinstalled our last build from scratch..will try this now and report back.

@rvictorr
Copy link
Contributor

Yeah, I used the Xposed version and I was actually able to reproduce the crash, but now I can't get anything. You should wait until the commit is merged and then update.

@FaySmash
Copy link
Author

@numeprenume okay, I'll keep waiting. reinstallation of OGYT and the module didn't fix it. Ty again

wasdennnoch pushed a commit that referenced this issue Jul 26, 2017
@rvictorr
Copy link
Contributor

rvictorr commented Jul 27, 2017

Still can't reproduce it. How's the latest build working for you? Can you list the specific options that you have activated in N-ify?

@FaySmash
Copy link
Author

@numeprenume I'm very sorry for the late reply :[ Installed build 847 this afternoon. I was very glad at first because it worked. tested it multiple times. but later the day it stopped working again. I now did quite a lot of testing, all xposed modules except n-ify and ogxposed are deactivated. I uploaded a video here , showing what's going on.

also the N-ify settings:

screenshot_20170728-004302
screenshot_20170728-004254
screenshot_20170728-004243
screenshot_20170728-004224
screenshot_20170728-004207
screenshot_20170728-004203
screenshot_20170728-004156
screenshot_20170728-004136
screenshot_20170728-004126
screenshot_20170728-004117

rvictorr added a commit to rvictorr/AndroidN-ify that referenced this issue Jul 28, 2017
rvictorr added a commit to rvictorr/AndroidN-ify that referenced this issue Jul 28, 2017
suphon-t pushed a commit that referenced this issue Jul 28, 2017
@FaySmash
Copy link
Author

FaySmash commented Jul 28, 2017

@numeprenume MAN I LOVE YOU! (nohomo). Also a very big thank you to @paphonb, seems like he helped. Now the important question: how to donate? :D

@rvictorr
Copy link
Contributor

Haha, I'm glad that it finally works! Well, most of the work on this module was done by @paphonb and @wasdennnoch and I'm just here polishing the rougher parts and adding some minor features, so I don't really feel like I should take the credit for this, but if you really, really want to I can set something up :D

@FaySmash
Copy link
Author

@well, the final commits which fixed it finally were mostly yours :p +you were the one handling my issue report. so mostly a appreciation for the brilliant support ^^
afaik n-ify doesn't have a donation possibility for the contributors, so @wasdennnoch and @paphonb would have to pass me donation endpoints too x)
but this issue is now finally for the archives :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants