TeamNewPipe / NewPipe-legacy

NewPipe with support for older devices
GNU General Public License v3.0
130 stars 36 forks source link

LogCat - it doesn't run when you have fuc*ed GApps (SGS3, 4.3 JB Official, Rooted + Xposed) #39

Closed drogga closed 3 years ago

drogga commented 4 years ago

"NewPipe Legacy" never worked for me - any version, from wherever - GitHub, F-Droid or a Modded one from 4PDA ! Here's the crash log captured with "Logcat Extreme Pro" (I don't know what "ACRA" is, is it a "firebase" analytics issue or whatever, or maybe the issue is in the build-in updates check):

---- Sep 13, 2020 8:11:21 PM ----

09-13 20:10:09.830  2454  3905 D Prevent : allow start activity org.schabi.newpipelegacy/.MainActivity

09-13 20:10:09.885  2454  3900 V Prevent : launch, current: [org.schabi.newpipelegacy]

09-13 20:10:09.890  2454  3900 D Prevent : action: start activity, package: org.schabi.newpipelegacy, count: 1

09-13 20:10:10.135  6125  6125 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.setUpUpdateNotificationChannel

09-13 20:10:10.140  6125  6125 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.initNotificationChannel

09-13 20:10:10.205  6125  6125 I ACRA    : ACRA is enabled for org.schabi.newpipelegacy, initializing...

09-13 20:10:10.945  6125  6125 E ACRA    : ACRA caught a RuntimeException for org.schabi.newpipelegacy

09-13 20:10:10.945  6125  6125 E ACRA    : java.lang.RuntimeException: Unable to create application org.schabi.newpipelegacy.App: java.lang.NullPointerException

09-13 20:10:10.945  6125  6125 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.getCertificateSHA1Fingerprint(Unknown Source)

09-13 20:10:10.945  6125  6125 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.isGithubApk(Unknown Source)

09-13 20:10:10.945  6125  6125 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.onPreExecute(Unknown Source)

09-13 20:10:10.945  6125  6125 E ACRA    :  at org.schabi.newpipelegacy.App.onCreate(Unknown Source)

09-13 20:10:11.090  2454  3564 D Prevent : action: app died, package: org.schabi.newpipelegacy--org.schabi.newpipelegacy, count: 1

09-13 20:10:11.090  2454  3564 D Prevent : allow start activity org.schabi.newpipelegacy/.MainActivity

09-13 20:10:11.090  2454  3564 I ActivityManager: Process org.schabi.newpipelegacy (pid 6125) (adj 0) has died.

09-13 20:10:11.125  2454 12209 V Prevent : launch, current: [org.schabi.newpipelegacy]

09-13 20:10:11.130  2454 12209 V Prevent : pid 6125 is not for org.schabi.newpipelegacy

09-13 20:10:11.130  2454 12209 D Prevent : action: start activity, package: org.schabi.newpipelegacy, count: 1

09-13 20:10:11.230  6170  6170 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.setUpUpdateNotificationChannel

09-13 20:10:11.235  6170  6170 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.initNotificationChannel

09-13 20:10:11.260  6183  6183 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.setUpUpdateNotificationChannel

09-13 20:10:11.260  6183  6183 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.initNotificationChannel

09-13 20:10:11.325  6183  6183 I ACRA    : ACRA is enabled for org.schabi.newpipelegacy, initializing...

09-13 20:10:11.445  6170  6170 E AndroidRuntime: java.lang.RuntimeException: Unable to create application org.schabi.newpipelegacy.App: java.lang.NullPointerException

09-13 20:10:11.445  6170  6170 E AndroidRuntime:    at org.schabi.newpipelegacy.CheckForNewAppVersionTask.getCertificateSHA1Fingerprint(Unknown Source)

09-13 20:10:11.445  6170  6170 E AndroidRuntime:    at org.schabi.newpipelegacy.CheckForNewAppVersionTask.isGithubApk(Unknown Source)

09-13 20:10:11.445  6170  6170 E AndroidRuntime:    at org.schabi.newpipelegacy.CheckForNewAppVersionTask.onPreExecute(Unknown Source)

09-13 20:10:11.445  6170  6170 E AndroidRuntime:    at org.schabi.newpipelegacy.App.onCreate(Unknown Source)

09-13 20:10:19.400  6183  6183 E ACRA    : ACRA caught a RuntimeException for org.schabi.newpipelegacy

09-13 20:10:19.400  6183  6183 E ACRA    : java.lang.RuntimeException: Unable to create application org.schabi.newpipelegacy.App: java.lang.NullPointerException

09-13 20:10:19.400  6183  6183 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.getCertificateSHA1Fingerprint(Unknown Source)

09-13 20:10:19.400  6183  6183 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.isGithubApk(Unknown Source)

09-13 20:10:19.400  6183  6183 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.onPreExecute(Unknown Source)

09-13 20:10:19.400  6183  6183 E ACRA    :  at org.schabi.newpipelegacy.App.onCreate(Unknown Source)

09-13 20:10:19.415  2454  2637 D CrashAnrDetector: processName: org.schabi.newpipelegacy:acra

09-13 20:10:19.705  2454  2464 D Prevent : action: app died, package: org.schabi.newpipelegacy--org.schabi.newpipelegacy, count: 1

09-13 20:10:19.705  2454  2464 I ActivityManager: Process org.schabi.newpipelegacy (pid 6183) (adj 0) has died.

09-13 20:10:19.840  2454  2464 D Prevent : allow start activity org.schabi.newpipelegacy/.MainActivity

09-13 20:10:19.905  2454  4548 V Prevent : launch, current: [org.schabi.newpipelegacy]

09-13 20:10:19.905  2454  4548 V Prevent : pid 6183 is not for org.schabi.newpipelegacy

09-13 20:10:19.905  2454  4548 D Prevent : action: start activity, package: org.schabi.newpipelegacy, count: 1

09-13 20:10:20.050  6348  6348 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.setUpUpdateNotificationChannel

09-13 20:10:20.050  6348  6348 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.initNotificationChannel

09-13 20:10:20.100  6348  6348 I ACRA    : ACRA is enabled for org.schabi.newpipelegacy, initializing...

09-13 20:10:20.565  6348  6348 E ACRA    : ACRA caught a RuntimeException for org.schabi.newpipelegacy

09-13 20:10:20.565  6348  6348 E ACRA    : java.lang.RuntimeException: Unable to create application org.schabi.newpipelegacy.App: java.lang.NullPointerException

09-13 20:10:20.565  6348  6348 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.getCertificateSHA1Fingerprint(Unknown Source)

09-13 20:10:20.565  6348  6348 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.isGithubApk(Unknown Source)

09-13 20:10:20.565  6348  6348 E ACRA    :  at org.schabi.newpipelegacy.CheckForNewAppVersionTask.onPreExecute(Unknown Source)

09-13 20:10:20.565  6348  6348 E ACRA    :  at org.schabi.newpipelegacy.App.onCreate(Unknown Source)

09-13 20:10:20.700  2454  2464 D Prevent : action: app died, package: org.schabi.newpipelegacy--org.schabi.newpipelegacy, count: 1

09-13 20:10:20.700  2454  2464 I ActivityManager: Process org.schabi.newpipelegacy (pid 6348) (adj 0) has died.

09-13 20:10:20.700  2454  2464 W ActivityManager: Force removing ActivityRecord{444d5c68 u0 org.schabi.newpipelegacy/.MainActivity}: app died, no saved state

09-13 20:10:21.485  2454  3906 V Prevent : pid 6348 is not for org.schabi.newpipelegacy

09-13 20:10:21.485  2454  3906 D Prevent : action: app died, package: org.schabi.newpipelegacy--org.schabi.newpipelegacy, count: 0

09-13 20:10:21.485  2454  3906 I ActivityManager: Process org.schabi.newpipelegacy:acra (pid 6170) (adj 0) has died.

09-13 20:10:42.600  6449  6449 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.setUpUpdateNotificationChannel

09-13 20:10:42.600  6449  6449 E dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method org.schabi.newpipelegacy.App.initNotificationChannel

09-13 20:10:42.825  6449  6449 E AndroidRuntime: java.lang.RuntimeException: Unable to create application org.schabi.newpipelegacy.App: java.lang.NullPointerException

09-13 20:10:42.825  6449  6449 E AndroidRuntime:    at org.schabi.newpipelegacy.CheckForNewAppVersionTask.getCertificateSHA1Fingerprint(Unknown Source)

09-13 20:10:42.825  6449  6449 E AndroidRuntime:    at org.schabi.newpipelegacy.CheckForNewAppVersionTask.isGithubApk(Unknown Source)

09-13 20:10:42.825  6449  6449 E AndroidRuntime:    at org.schabi.newpipelegacy.CheckForNewAppVersionTask.onPreExecute(Unknown Source)

09-13 20:10:42.825  6449  6449 E AndroidRuntime:    at org.schabi.newpipelegacy.App.onCreate(Unknown Source)

09-13 20:10:50.775  2454  2637 D CrashAnrDetector: processName: org.schabi.newpipelegacy:acra

09-13 20:10:52.380  2454  4586 D Prevent : action: app died, package: org.schabi.newpipelegacy--org.schabi.newpipelegacy, count: 0

09-13 20:10:52.380  2454  4586 I ActivityManager: Process org.schabi.newpipelegacy:acra (pid 6449) (adj 0) has died.

09-13 20:10:52.385  2454  4586 W ActivityManager: Service crashed 2 times, stopping: ServiceRecord{44a8cc78 u0 org.schabi.newpipelegacy/org.acra.sender.LegacySenderService}

---- Sep 13, 2020 8:11:21 PM ----
drogga commented 3 years ago

With an amazing help from a friend we got this solved/figured out, the problem is here: https://github.com/TeamNewPipe/NewPipe-legacy/blob/0fd3f9b81e107907db22d458c36a8bb3da640af9/app/src/main/java/org/schabi/newpipelegacy/CheckForNewAppVersionTask.java#L58

Problem: The 'getCertificateSHA1Fingerprint()' doesn't exit/break on any of the catches, but continues executing code, therefore calling null variables. This gives the 'nullpointerexception'.

FIX:

  1. The return string (hexString, line #87) needs to be declared as an empty string ("") and not 'null' AND declared at line #63 (before any try/catch)
  2. Each catch needs to break code execution by including 'return hexString'

Please use this one for this "legacy" git repo too and push a fix ASAP with the new version: https://github.com/TeamNewPipe/NewPipe/blob/db9f20a22f6093468fb79961a87812225109a258/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersion.java#L60

Thanks in advance and please Leave this open for the time being... @friendlyanon @TobiGr

ShareASmile commented 3 years ago

Please use this one for this "legacy" git repo too and push a fix ASAP with the new version

@friendlyanon when next release is planned!

In v20.2 Comments are not being loaded for a while, Main NewPipe has been already updated including Comments, YouTube Music search fix & also above fix also needs to included.

Honestly New v20 UI is a pain to use on legacy devices having performance issues with old hardware and other multiple issue like can't use background player separately from main player, can't use separate queues, Let alone bugs.:

Seprate background player was big plus NewPipe19 have that stood it apart, even better than those from other yt apps including YouTube official app. I feel it is retrograde step for Legacy repo to go that way{Unified}. @TobiGr what do you think?