Skip to content

RequestReviewFlow throws exceptions with Automatic Integrity Protection enabled #12

@kreys

Description

@kreys

Hello,

there are 3 different ways to test Review dialog for my app:

  1. Upload AAB via Internal-App-Sharing page, where Automatic Integrity Protection is disabled (https://play.google.com/console/internal-app-sharing)
  2. Upload AAB via any track, e.g. Internal Testing track with Automatic Integrity Protection disabled
  3. Upload AAB via any track, e.g. Internal Testing track with Automatic Integrity Protection enabled

When I do option 1) or 2) and then install my build from google play, then everything is working fine, trigerring Review dialog works fine.

However, when I upload AAB with Automatic Integrity Protection enabled (doesn't matter if it's newest enigma or previous api dynamite, checked both), then trigerring RequestReviewFlow on ReviewManager throws exception, which on logcat looks like this:

10-15 14:50:55.695: I/PlayCore(4741): UID: [10605]  PID: [4741] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
10-15 14:50:55.697: I/PlayCore(4741): UID: [10605]  PID: [4741] ReviewService : linkToDeath
10-15 14:50:56.059: I/System.out(29487): Caught a exception encoding the public key: com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse jzw.a
10-15 14:50:56.059: W/System.err(29487): com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse jzw.a
(...)
10-15 14:50:56.096: W/System.err(29487): Caused by: com.android.apksig.internal.asn1.Asn1BerParser$Asn1UnexpectedTagException: Tag mismatch. Expected: UNIVERSAL BIT STRING, but found UNIVERSAL SEQUENCE
10-15 14:50:56.125: I/PlayCore(4741): UID: [10605]  PID: [4741] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
10-15 14:50:56.128: I/PlayCore(4741): UID: [10605]  PID: [4741] ReviewService : Unbind from service.

On the contrary, while playing build uploaded with option 1) or 2), then the same log looks just like this:

10-15 16:27:36.206: I/PlayCore(16567): UID: [10607]  PID: [16567] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
10-15 16:27:36.208: I/PlayCore(16567): UID: [10607]  PID: [16567] ReviewService : linkToDeath
10-15 16:27:36.232: I/PlayCore(16567): UID: [10607]  PID: [16567] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
10-15 16:27:36.233: I/PlayCore(16567): UID: [10607]  PID: [16567] ReviewService : Unbind from service.

Then, when I LaunchReviewFrom on the builds with integrity protection disabled the native review panel shows nicely, and on the build with protection enabled nothing is happening, there are also no logs on logcat.

This is 100% reproducible for any build I do, Review popup showing depends on the enabling of Automatic Integrity Protection.

I did follow your guides, included keep entries into proguard file and so on.

Attaching bigger log with the exception.

review-exception.txt

Development on Unity 2022.3.44f1

Google packages versions:

    "com.google.android.appbundle": "https://github.com/google-unity/android-app-bundle.git#1.9.0",
    "com.google.external-dependency-manager": "file:../ExternalPackages/com.google.external-dependency-manager-1.2.183.tgz",
    "com.google.play.assetdelivery": "file:../ExternalPackages/com.google.play.assetdelivery-1.9.2.tgz",
    "com.google.play.common": "file:../ExternalPackages/com.google.play.common-1.9.2.tgz",
    "com.google.play.core": "file:../ExternalPackages/com.google.play.core-1.8.5.tgz",
    "com.google.play.review": "file:../ExternalPackages/com.google.play.review-1.8.3.tgz",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions