google / play-unity-plugins

The Google Play Plugins for Unity provide C# APIs for accessing various Play services
Other
441 stars 115 forks source link

Google Play In-App Review API - Error posting review "Expected UNIVERSAL BIT STRING, but found UNIVERSAL SEQUENCE" #228

Open arslanaligamesgear opened 12 months ago

arslanaligamesgear commented 12 months ago

i am encountering some issue in unity In APP Review system, i imported, google core, google review packages, called the review dialog using this IEnumerator RequestReview() { _reviewManager = new ReviewManager(); var requestFlowOperation = _reviewManager.RequestReviewFlow(); yield return requestFlowOperation; if (requestFlowOperation.Error != ReviewErrorCode.NoError) { // Log error. For example, using requestFlowOperation.Error.ToString(). yield break; } _playReviewInfo = requestFlowOperation.GetResult(); var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo); yield return launchFlowOperation; _playReviewInfo = null; // Reset the object if (launchFlowOperation.Error != ReviewErrorCode.NoError) { // Log error. For example, using requestFlowOperation.Error.ToString(). yield break; } // The flow has finished. The API does not indicate whether the user // reviewed or not, or even whether the review dialog was shown. Thus, no // matter the result, we continue our app flow.

}  then 

1.made the test user account added it in play console ,

  1. i published the .aab package to internal test
  2. i made sure test user account has never rate this application before
  3. i installed the game using google play
  4. after launching i am getting error in console let me give you log as well
  5. 2023/11/21 16:46:43.042 11145 22623 Info PlayCore UID: [10645] PID: [11145] ReviewService : requestInAppReview 2023/11/21 16:46:43.043 11145 23216 Info PlayCore UID: [10645] PID: [11145] ReviewService : Initiate binding to the service. 2023/11/21 16:46:43.051 4662 5228 Warn OplusExSystemServiceHelper checkOplusExSystemService intent getComponent is null 2023/11/21 16:46:43.061 11145 11145 Info PlayCore UID: [10645] PID: [11145] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService}) 2023/11/21 16:46:43.062 11145 23216 Info PlayCore UID: [10645] PID: [11145] ReviewService : linkToDeath 2023/11/21 16:46:43.113 2046 2728 Debug ColorAutomaticBrightnessController MSG_PROXIMITY_CHANGE near 2023/11/21 16:46:43.113 2046 2728 Debug OplusSmartBrightnessController lock AIBrightnessModel, because of proximity near 2023/11/21 16:46:43.304 4180 4502 Info Athena CommonAction: 24,1929,280,2519,5120,51,367,705,1682,1902,733,933,19.2,22 2023/11/21 16:46:43.314 9200 8943 Warn libc Access denied finding property "vendor.oplus.media.vpp.stutter" 2023/11/21 16:46:43.320 9200 8942 Warn libc Access denied finding property "vendor.oplus.media.vpp.stutter" 2023/11/21 16:46:43.395 4662 4966 Info System.out Caught a exception encoding the public key: com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.396 4662 4966 Warn System.err com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.396 4662 4966 Warn System.err at iqf.h(PG:211) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at iqf.f(PG:2) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at iqf.d(PG:103) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at iqf.b(PG:13) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at ipx.b(PG:44) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at ros.W(PG:466) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at ros.z(PG:81) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at ros.y(PG:21) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at agix.ht(PG:74) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at agix.ft(PG:88) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at nyv.call(PG:721) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at aqqm.a(PG:3) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at aqpr.run(PG:21) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at aqqn.run(PG:5) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at ocm.run(PG:139) 2023/11/21 16:46:43.396 4662 4966 Warn System.err at java.lang.Thread.run(Thread.java:1012) 2023/11/21 16:46:43.397 4662 4966 Warn System.err Caused by: com.android.apksig.internal.asn1.Asn1BerParser$Asn1UnexpectedTagException: Tag mismatch. Expected: UNIVERSAL BIT STRING, but found UNIVERSAL SEQUENCE 2023/11/21 16:46:43.397 4662 4966 Warn System.err at aagh.a(PG:49) 2023/11/21 16:46:43.397 4662 4966 Warn System.err at iqf.h(PG:170) 2023/11/21 16:46:43.397 4662 4966 Warn System.err ... 17 more 2023/11/21 16:46:43.403 4662 4966 Info System.out Caught a exception encoding the public key: com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.403 4662 4966 Warn System.err com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.403 4662 4966 Warn System.err at iqf.h(PG:211) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at iqf.f(PG:2) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at iqf.d(PG:103) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at iqf.b(PG:13) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at ipx.b(PG:44) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at hpb.L(PG:367) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at hpb.h(PG:66) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at agix.ht(PG:66) 2023/11/21 16:46:43.403 4662 4966 Warn System.err at agix.ft(PG:117) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at nyv.call(PG:721) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at aqqm.a(PG:3) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at aqpr.run(PG:21) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at aqqn.run(PG:5) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at ocm.run(PG:139) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at java.lang.Thread.run(Thread.java:1012) 2023/11/21 16:46:43.404 4662 4966 Warn System.err Caused by: com.android.apksig.internal.asn1.Asn1BerParser$Asn1UnexpectedTagException: Tag mismatch. Expected: UNIVERSAL BIT STRING, but found UNIVERSAL SEQUENCE 2023/11/21 16:46:43.404 4662 4966 Warn System.err at aagh.a(PG:49) 2023/11/21 16:46:43.404 4662 4966 Warn System.err at iqf.h(PG:170) 2023/11/21 16:46:43.404 4662 4966 Warn System.err ... 16 more 2023/11/21 16:46:43.427 4662 4966 Info System.out Caught a exception encoding the public key: com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.427 4662 4966 Warn System.err com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.427 4662 4966 Warn System.err at iqf.h(PG:211) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at iqf.f(PG:2) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at iqf.d(PG:103) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at iqf.b(PG:13) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at ipx.b(PG:44) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at ros.W(PG:466) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at ros.z(PG:81) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at ros.y(PG:21) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at agix.ht(PG:74) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at agix.ft(PG:88) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at nyv.call(PG:721) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at aqqm.a(PG:3) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at aqpr.run(PG:21) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at aqqn.run(PG:5) 2023/11/21 16:46:43.427 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 2023/11/21 16:46:43.428 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 2023/11/21 16:46:43.428 4662 4966 Warn System.err at ocm.run(PG:139) 2023/11/21 16:46:43.428 4662 4966 Warn System.err at java.lang.Thread.run(Thread.java:1012) 2023/11/21 16:46:43.428 4662 4966 Warn System.err Caused by: com.android.apksig.internal.asn1.Asn1BerParser$Asn1UnexpectedTagException: Tag mismatch. Expected: UNIVERSAL BIT STRING, but found UNIVERSAL SEQUENCE 2023/11/21 16:46:43.428 4662 4966 Warn System.err at aagh.a(PG:49) 2023/11/21 16:46:43.428 4662 4966 Warn System.err at iqf.h(PG:170) 2023/11/21 16:46:43.428 4662 4966 Warn System.err ... 17 more 2023/11/21 16:46:43.432 4662 4966 Info System.out Caught a exception encoding the public key: com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.432 4662 4966 Warn System.err com.android.apksig.internal.asn1.Asn1DecodingException: Failed to parse iqv.a 2023/11/21 16:46:43.432 4662 4966 Warn System.err at iqf.h(PG:211) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at iqf.f(PG:2) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at iqf.d(PG:103) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at iqf.b(PG:13) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at ipx.b(PG:44) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at hpb.L(PG:367) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at hpb.h(PG:66) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at agix.ht(PG:66) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at agix.ft(PG:117) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at nyv.call(PG:721) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at aqqm.a(PG:3) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at aqpr.run(PG:21) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at aqqn.run(PG:5) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at ocm.run(PG:139) 2023/11/21 16:46:43.432 4662 4966 Warn System.err at java.lang.Thread.run(Thread.java:1012) 2023/11/21 16:46:43.433 4662 4966 Warn System.err Caused by: com.android.apksig.internal.asn1.Asn1BerParser$Asn1UnexpectedTagException: Tag mismatch. Expected: UNIVERSAL BIT STRING, but found UNIVERSAL SEQUENCE 2023/11/21 16:46:43.433 4662 4966 Warn System.err at aagh.a(PG:49) 2023/11/21 16:46:43.433 4662 4966 Warn System.err at iqf.h(PG:170) 2023/11/21 16:46:43.433 4662 4966 Warn System.err ... 16 more 2023/11/21 16:46:43.440 11145 22735 Info PlayCore UID: [10645] PID: [11145] OnRequestInstallCallback
nith666 commented 3 months ago

I've got the same error and no idea how to solve it..

mihanovak1024 commented 2 months ago

Same issue on version com.google.android.play:review:2.0.1 with the following code:

suspend fun instantShow(activity: Activity): Boolean {
    val result = load(activity)
    if (result != InAppReviewState.LOADED) {
        return false
    }
    show(activity)
    return true
}
private suspend fun load(context: Context) = suspendCoroutine { cont ->
    if (state != InAppReviewState.IDLE) {
        Logger.debug(TAG, "load - not IDLE state, but is [$state]. Returning...")
        cont.resume(state)
        return@suspendCoroutine
    }
    state = InAppReviewState.LOADING
    manager = ReviewManagerFactory.create(context).apply {
        requestReviewFlow()
            .addOnFailureListener { e ->
                Logger.error("load", e)
                state = InAppReviewState.IDLE
                cont.resume(state)
            }
            .addOnCompleteListener { task ->
                if (task.isSuccessful) {
                    Logger.debug(TAG, "load - success")
                    reviewInfo = task.result
                    state = InAppReviewState.LOADED
                    cont.resume(state)
                } else {
                    @ReviewErrorCode val reviewErrorCode = (task.exception as ReviewException).errorCode
                    Logger.warning(TAG, "load - error - $reviewErrorCode")
                    state = InAppReviewState.IDLE
                    cont.resume(state)
                }
            }
    }
}
private suspend fun show(activity: Activity) = suspendCoroutine { cont ->
    if (state != InAppReviewState.LOADED) {
        Logger.debug(TAG, "show - not LOADED state, but is [$state]. Returning...")
        cont.resume(state)
        return@suspendCoroutine
    }
    state = InAppReviewState.SHOWING
    manager!!.launchReviewFlow(activity, reviewInfo!!)
        .addOnFailureListener { e ->
            Logger.error("show", e)
            state = InAppReviewState.IDLE
            cont.resume(state)
        }
        .addOnCompleteListener { task ->
            Logger.debug(TAG, "show - completed - isSuccessful = ${task.isSuccessful}")
            if (!task.isSuccessful) {
                @ReviewErrorCode val reviewErrorCode = (task.exception as ReviewException).errorCode
                Logger.warning(TAG, "show - error - $reviewErrorCode")
            }
            state = InAppReviewState.IDLE
            cont.resume(state)
        }
}

Logs show the following:

[...error same as in the comment above....]
load - success
show - completed - isSuccessful = true