ReVanced / revanced-manager

💊 Application to use ReVanced on Android
https://revanced.app
GNU General Public License v3.0
18.19k stars 748 forks source link

bug: app crashes when listing apps/selecting apk on android 7.1 #144

Closed Delphox closed 2 years ago

Delphox commented 2 years ago

Type

Error while running the manager

Branch

flutter

Bug description

When trying to select applications, either if a compatible app is already installed, or selecting an apk, Manager immediately crashes.

Steps to reproduce

  1. Open ReVanced Manager
  2. Navigate to Patcher
  3. Tap Select Application (if you already have a compatible app installed such a Youtube/Twitter/Reddit, it'll instantly crash on this spot)
  4. Select an APK for patching (it should also crash)

Relevant log output

FATAL EXCEPTION: main
Process: app.revanced.manager.flutter, PID: 4973
java.lang.NoSuchFieldError: No field splitNames of type [Ljava/lang/String; in class Landroid/content/pm/ApplicationInfo; or its superclasses (declaration of 'android.content.pm.ApplicationInfo' appears in /system/framework/framework.jar)
    at fr.g123k.deviceapps.DeviceAppsPlugin.getAppData(DeviceAppsPlugin.java:289)
    at fr.g123k.deviceapps.DeviceAppsPlugin.getAppFromStorage(DeviceAppsPlugin.java:264)
    at fr.g123k.deviceapps.DeviceAppsPlugin.onMethodCall(DeviceAppsPlugin.java:113)
    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
    at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
    at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
    at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6121)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

Screenshots or videos

https://user-images.githubusercontent.com/5883538/190722058-eb7965b8-af48-45f5-9ada-d2dce60dc3c5.mp4

Solution

No response

Additional context

Manager version is 0.0.7. Tested both on a phone running 7.1 as well as MEmu emulator, so I'm assuming Manager uses a method not available on 7.1 and under.

pietryszak commented 2 years ago

C'mon you expected the ALPHA version of the app to run on a 6 year old android....

Delphox commented 2 years ago

That's why I'm reporting it with logs and repro steps, so it can be fixed eventually (even if it's low priority). That's what the alpha is for, for reporting issues so they can be fixed before the app hits Stable. If they don't intend to support versions under 8.0 they'd just set the minSdk level to 26 so it wouldn't install on 7.1 and under.

pietryszak commented 2 years ago

That's why I'm reporting it with logs and repro steps, so it can be fixed eventually (even if it's low priority). That's what the alpha is for, for reporting issues so they can be fixed before the app hits Stable. If they don't intend to support versions under 8.0 they'd just set the minSdk level to 26 so it wouldn't install on 7.1 and under.

I think that 6 years old android should not be supported by any app, not only this.

Delphox commented 2 years ago

That's fair, but it's up to the devs. Youtube itself supports 6.0 minimum, alongside the rest of Google's app suite.

theuserwhoisnotadeveloper commented 2 years ago

similar thing happens on my device with android 7.1.2

FATAL EXCEPTION: main Process: app.revanced.manager.flutter, PID: 25477 java.lang.NoSuchFieldError: No field splitNames of type [Ljava/lang/String; in class Landroid/content/pm/ApplicationInfo; or its superclasses (declaration of 'android.content.pm.ApplicationInfo' appears in /system/framework/framework.jar) at fr.g123k.deviceapps.DeviceAppsPlugin.getAppData(DeviceAppsPlugin.java:289) at fr.g123k.deviceapps.DeviceAppsPlugin.getApp(DeviceAppsPlugin.java:248) at fr.g123k.deviceapps.DeviceAppsPlugin.onMethodCall(DeviceAppsPlugin.java:104) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6186) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

theuserwhoisnotadeveloper commented 2 years ago

That's why I'm reporting it with logs and repro steps, so it can be fixed eventually (even if it's low priority). That's what the alpha is for, for reporting issues so they can be fixed before the app hits Stable. If they don't intend to support versions under 8.0 they'd just set the minSdk level to 26 so it wouldn't install on 7.1 and under.

I think that 6 years old android should not be supported by any app, not only this.

I do not agree. revanced manager should support the minimum version that youtube itself supports. releasing revanced manager with minimum android 10 requirement while youtube supporting android 6.0 would not be a nice move.

reisxd commented 2 years ago

I do not agree. revanced manager should support the minimum version that youtube itself supports. releasing revanced manager with minimum android 10 requirement while youtube supporting android 6.0 would not be a nice move.

Actually, YouTube now targets A8, check YouTube (latest) on APKMirror.

theuserwhoisnotadeveloper commented 2 years ago

I do not agree. revanced manager should support the minimum version that youtube itself supports. releasing revanced manager with minimum android 10 requirement while youtube supporting android 6.0 would not be a nice move.

Actually, YouTube now targets A8, check YouTube (latest) on APKMirror.

Well, you are right. then I will be stuck with youtube revanced 17.33.42 then. sadly 17.33.42 is not even stable, if I swtich to incognito mode and play the media on the background, after reopening youtube, background playback stops and closes itself. do you know what was the last version that did not have this problem?

Delphox commented 2 years ago

Actually, YouTube now targets A8, check YouTube (latest) on APKMirror.

Oh wow, that's interesting. Considering the last Android 6 version is still from 2 weeks ago, I wonder if they're already cutting off support, or they'll just get less frequent updates (maybe only critical updates for a few months and then get cut off?). The other google apps still have 6.0 minimum as of now.

Well, you are right. then I will be stuck with youtube revanced 17.33.42 then. sadly 17.33.42 is not even stable, if I swtich to incognito mode and play the media on the background, after reopening youtube, background playback stops and closes itself. do you know what was the last version that did not have this problem?

That's probably an issue with the patches rather than that version itself. The patches still support multiple versions of the app (most patches work on versions starting from 17.2x) so when the patches get fixed it they should cover 17.33.42 also.

Delphox commented 2 years ago

If they don't intend to support versions under 8.0 they'd just set the minSdk level to 26 so it wouldn't install on 7.1 and under.

Well seems like they just did it on 952217a3eaede26efeeae58c3847d830913c2733, Manager will only install on 8.0+ now. That gives it closure. Makes sense in case youtube will only support 8.0+ from now on anyway.

TheW0LVERIN3 commented 2 years ago

If they don't intend to support versions under 8.0 they'd just set the minSdk level to 26 so it wouldn't install on 7.1 and under.

Well seems like they just did it on 952217a, Manager will only install on 8.0+ now. That gives it closure. Makes sense in case youtube will only support 8.0+ from now on anyway.

Considering that the latest version of youtube music still supports android 5.0+, it would be a shame if revanced never brings back support for older android versions in the future.

reisxd commented 2 years ago

If they don't intend to support versions under 8.0 they'd just set the minSdk level to 26 so it wouldn't install on 7.1 and under.

Well seems like they just did it on 952217a, Manager will only install on 8.0+ now. That gives it closure. Makes sense in case youtube will only support 8.0+ from now on anyway.

Considering that the latest version of youtube music still supports android 5.0+, it would be a shame if revanced never brings back support for older android versions in the future.

YTM might support it, but keep in mind that Manager doesn't support A7 and below because as can you see in this entire issue, it'd crash. And now that YT is also now targetting A8, it's not really a problem. Downgrading API levels are not just as simple as changing a number.