skip to Main Content

I’ve received multiple crash reports after putting this up on Google Play.

This app passed on the Huawei P40 Pro and:

Samsung SM-G960U1
Samsung SM-G981U1
Google Pixel 5
DOCOMO SH-01L
Nokia Nokia 1

However, it did not pass on the Google Pixel 6.

Info:
Memory: 8,192 MB
OpenGL ES Version: 3.2
ABI: arm64-v8a
Android Version: Android 12 (SDK 31)
Screen Size: 1080 x 2400

Error:

FATAL EXCEPTION: main
Process: com.pronner.ragtagvpn, PID: 19954
java.lang.RuntimeException: Unable to start service de.blinkt.openvpn.core.OpenVPNService@49c7caa with Intent { cmp=com.pronner.ragtagvpn/de.blinkt.openvpn.core.OpenVPNService (has extras) }: java.lang.IllegalArgumentException: com.pronner.ragtagvpn: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4657)
    at android.app.ActivityThread.access$2000(ActivityThread.java:247)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
    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:7839)
    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.IllegalArgumentException: com.pronner.ragtagvpn: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
    at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
    at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458)
    at android.app.PendingIntent.getActivity(PendingIntent.java:444)
    at android.app.PendingIntent.getActivity(PendingIntent.java:408)
    at de.blinkt.openvpn.core.OpenVPNService.getGraphPendingIntent(OpenVPNService.java:491)
    at de.blinkt.openvpn.core.OpenVPNService.showNotification(OpenVPNService.java:334)
    at de.blinkt.openvpn.core.OpenVPNService.onStartCommand(OpenVPNService.java:586)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4639)
    ... 9 more

Not sure what to do, as this has worked on my device, and I’m not sure how exactly I’m supposed to update my openssl.
Remediation for Bad OpenSSL Versions << Here’s the link I received after getting the warning from google.

4

Answers


  1. Your 3rd party library is likely out of date,

    de.blinkt.openvpn.core.OpenVPNService 
    

    You could fork the project and fix it using the logcat failure tip: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

    Alternatively follow this to make your own VPN service https://developer.android.com/guide/topics/connectivity/vpn

    Login or Signup to reply.
  2. Please check third party libs in your project,
    In my case I was using SQLCipher
    https://github.com/sqlcipher/android-database-sqlcipher
    before library update it was using defective versions: OpenSSL 1.1.1g

    After latest version i could see "OpenSSL 1.1.1q 5 Jul 2022"

    In order to verify/check openSSL version you can use below command against your apk

    unzip -p <apk_name>.apk | strings | grep "OpenSSL"

    for more info
    https://support.google.com/faqs/answer/12576638

    Login or Signup to reply.
  3. add

    implementation 'com.android.ndk.thirdparty:openssl:1.1.1l-beta-1'

    inside the android/app/build.gradle dependencies

    Login or Signup to reply.
  4. Just solved the same problem with my Android app.

    The error has nothing to do with native libraries.

    Starting with Android 12, PendingIntent flags are apparently required to contain either PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_MUTABLE (the former one seems to be adequate for most cases), otherwise the exception is thrown.

    Check the ‘flags’ argument on calls to PendingIntent methods, such as PendingIntent.getActivity() etc – for example

    PendingIntent.getActivity(applicationContext, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE)
    

    (if you pass other flags – they have to be or’ed)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search