Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such proxy method: GoogleMobileAds.Ump.Android.OnConsentFormDismissedListener.onConsentFormDismissed(null) #2826

Closed
majidkh opened this issue Jul 19, 2023 · 26 comments
Assignees
Labels
P1 Priority issue. Plugin Issue with the Unity plugin. SDK Sdk engineering issue.

Comments

@majidkh
Copy link

majidkh commented Jul 19, 2023

Step 0: Are you in the right place?

  • For general technical questions, or help with project-specific issues like setting up ads in
    your app, reach out to our support team on the
    Developer Forum.

  • For assistance with your AdMob account, reach out to
    AdMob Support.

  • For feedback on our documentation,
    send your feedback by pressing the Send Feedback button at the top right of the
    documentation page you are on.

  • For issues related to the code in this repository, continue filing this GitHub issue.

  • Once you've read this section and determined that your issue is appropriate for
    this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Unity version: 2022.3.5.f1
  • Google Mobile Ads Unity plugin version: 8.4.1
  • Platform: _____ (iOS, Android, Unity Editor) Android
  • Platform OS version: _____ (eg iOS 10, Android 9) Android 13
  • Any specific devices issue occurs on: _____ Google Pixel 6a
  • Mediation ad networks used, and their versions: _____ N/A

[REQUIRED] Step 2: Describe the problem

After user dismissed the consent form, following error appears:

2023/07/19 11:04:25.078 345 345 Error Unity Exception: No such proxy method: GoogleMobileAds.Ump.Android.OnConsentFormDismissedListener.onConsentFormDismissed(null)

Steps to reproduce:

What happened? How can we make the problem occur?

Delete the game and reinstall it, After loading the consent form and showing it, close it and the above error happens.

Please share a downloadable sample project that reproduces the bug, if
available. This greatly helps us to diagnose and fix the issue faster.

Relevant Code:

// TODO(you): code here to reproduce the problem
@majidkh majidkh changed the title 2023/07/19 11:03:01.205 32078 32078 Error Unity Exception: No such proxy method: GoogleMobileAds.Ump.Android.OnConsentFormDismissedListener.onConsentFormDismissed(null) No such proxy method: GoogleMobileAds.Ump.Android.OnConsentFormDismissedListener.onConsentFormDismissed(null) Jul 19, 2023
@majidkh
Copy link
Author

majidkh commented Jul 19, 2023

Same error happens also when building the Sample project in the repository.

Screenshot_20230719-174113

@NVentimiglia
Copy link
Member

@majidkh

I did not replicate the issue, please double check my steps to make sure I did not miss anything.

  1. export gradle project.
  2. build / run project on device.
  3. Goto UMP scene, set debug to EEA
  4. reset information, request update, load form, show form.
  5. exit app, open settings, uninstall app.
  6. open gradle project output/apk directory. Drag apk onto simulator.
  7. reopen app.
  8. Goto UMP scene, set debug to EEA
  9. request update, load form, show form.

@NVentimiglia NVentimiglia self-assigned this Jul 20, 2023
@NVentimiglia NVentimiglia added P2 Issue. Plugin Issue with the Unity plugin. labels Jul 20, 2023
@majidkh
Copy link
Author

majidkh commented Jul 20, 2023

It happens even with the Sample project, I am on Unity version: 2022.3.5.f1 and use GoogleAds Unity plugin version: 8.4.1.

Happens all the time at my end.

I made my own plugin now to use the UMP Android and it works fine using my own plugin, the error happens only in Google Ads UMP Unity and only when running on an Android device. in Editor works fine.

The steps:

  • Git clone the repository
  • Open the sample project in Unity
  • import google mobile ads Unity SDK (8.4.1)
  • Delete the app on the android if you already built it
  • Build and run on the Android Device ( do not export gradle, just build and run in unity )
  • Tap on the update consent button, load form and show form
  • Close the form

If still unable to produce , I can upload the sample project here.

@majidkh
Copy link
Author

majidkh commented Jul 21, 2023

It might have been patched with the following commit:

adcb8e6

@NVentimiglia
Copy link
Member

@majidkh No, I think this issue is separate from the commit linked.

I am still unable to replicate this. I switched to Unity 2022 and did a direct from editor install this time.

#2829

As part of the above changes, I have an updated UMP controller. Please try it out, if this fails, please send me an APK and/or project.

@luizjunior
Copy link

I'm seeing this error showing on my last google play's build

Exception: No such proxy method: GoogleMobileAds.Ump.Android.OnConsentFormDismissedListener.onConsentFormDismissed(null)

@luizjunior
Copy link

It happens even with the Sample project, I am on Unity version: 2022.3.5.f1 and use GoogleAds Unity plugin version: 8.4.1.

Happens all the time at my end.

I made my own plugin now to use the UMP Android and it works fine using my own plugin, the error happens only in Google Ads UMP Unity and only when running on an Android device. in Editor works fine.

The steps:

  • Git clone the repository
  • Open the sample project in Unity
  • import google mobile ads Unity SDK (8.4.1)
  • Delete the app on the android if you already built it
  • Build and run on the Android Device ( do not export gradle, just build and run in unity )
  • Tap on the update consent button, load form and show form
  • Close the form

If still unable to produce , I can upload the sample project here.

can you please share your plugin? I'm getting a lot of this error on a production build

@NVentimiglia
Copy link
Member

@luizjunior

This may be caused by a missing android dependency. Please make sure that the external dependency manager is pulling in com.google.android.ump.user-messaging-platform-2.1.0.aar.

@luizjunior
Copy link

@luizjunior

This may be caused by a missing android dependency. Please make sure that the external dependency manager is pulling in com.google.android.ump.user-messaging-platform-2.1.0.aar.

Hi @NVentimiglia thanks for your reply...

I've just install Unity 2022.3.7f1 LTS, Google Mobile Ads Unity Plugin v8.5.1 and I've implemented the new form method ConsentForm.LoadAndShowConsentFormIfRequired.

The form is displayed, but when I choose the CONSENT option, then a error is displayed on the logcat:

Error Unity Exception: No such proxy method: GoogleMobileAds.Ump.Android.OnConsentFormDismissedListener.onConsentFormDismissed(null)

I'm attaching a screen shot for the Android plugins folder and my GDPR message setup

my_form_setup
my_android_plugins
unity_exception

@Nyankoo
Copy link

Nyankoo commented Aug 12, 2023

@NVentimiglia Facing the same issue with v8.5.1. It seems that is has nothing to do with a missing android dependency, similar to #2866, but with a lot of things missing in the latest wrapper.

@majidkh
Copy link
Author

majidkh commented Aug 14, 2023

@NVentimiglia Here is the build .apk file with sample project together.

Its using the Test App Id from here: https://developers.google.com/admob/android/quick-start

( The issue happens in this scene: GoogleMobileAdsScene )

build.zip
HelloWorld.zip

Unity Version: 2022.3.7f1 ( Silicon)
Admob Unity SDK version: 8.5.1

Hope this helps!

@NVentimiglia
Copy link
Member

@Nyankoo @majidkh

Thank you, I will take a look.

@NVentimiglia
Copy link
Member

@Nyankoo @majidkh

What android API levels and devices are you experiencing this on?

I see reference to Android 13 and Pixel 6a

@Nyankoo
Copy link

Nyankoo commented Aug 14, 2023

@NVentimiglia Mi A2 Lite with Android 10. Minimum target API level 22, target API level 32.

@majidkh
Copy link
Author

majidkh commented Aug 14, 2023

@Nyankoo @majidkh

What android API levels and devices are you experiencing this on?

I see reference to Android 13 and Pixel 6a

Thats correct.

@NVentimiglia
Copy link
Member

@majidkh @Nyankoo

There was an issue with the hello world application that requested the consent form twice, can you try with the latest version of the hello world application?

@majidkh
Copy link
Author

majidkh commented Aug 15, 2023

That project I attached was the latest version.

@NVentimiglia
Copy link
Member

@majidkh @Nyankoo

Are you by chance passing null into the ConsentForm.Show() method?

@Nyankoo
Copy link

Nyankoo commented Aug 15, 2023

@NVentimiglia No.

ConsentForm.LoadAndShowConsentFormIfRequired(onFormDismissed);
private void onFormDismissed(FormError error){}

@CraZCodr
Copy link

CraZCodr commented Aug 15, 2023

Hi, I'm getting the same exception since I switched from Unity 2022.3.4f1 LTS to 2022.3.5f1 LTS.
Also tried 2022.3.6f1 LTS and 2022.3.7f1 LTS - the exception persists.

When switching back to 2022.3.4f1 LTS the exception does not happen.

Device: Xiaomi Redmi Note 10 Pro, Android 13.

@NVentimiglia
Copy link
Member

@Nyankoo @CraZCodr @majidkh

We have identified and confirmed the issue and are looking into a fix.

@NVentimiglia NVentimiglia added P1 Priority issue. SDK Sdk engineering issue. and removed P2 Issue. labels Aug 15, 2023
@luizjunior
Copy link

luizjunior commented Aug 23, 2023

I can confirm that.

I've test AdMob Consent Screen on Unity 2022.3.4f1 (before the "FIX") it works fine, but it shows the error on Unity 2022.4.7f1

I suspect this may be the same problem I'm facing with Unity's In-App purchasing module on Google Play, since I'm getting a lot of not found methods errors with private methods from the purchasing module.

https://forum.unity.com/threads/unity-iap-4-6-0-no-such-proxy-method-onbillingservicedisconnected.1400938

It looks like this is a Unity bug.

https://unity.com/releases/editor/whats-new/2022.3.5#:~:text=Android%3A%20AndroidJavaProxy%20correctly%20maps%20null%20variables%20(e.g%20empty%20string)%20for%20reflection%20search%20%2B%20automatic%20tests%20for%20AndroidJavaProxy.%20(UUM%2D30243)

https://forum.unity.com/threads/exceptions-after-uum-30243-fix.1465151/

@NVentimiglia
Copy link
Member

Thank you!

@usamanawaz789
Copy link

Is there any update on this?

@NVentimiglia
Copy link
Member

@usamanawaz789

The fix is scheduled for release this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Priority issue. Plugin Issue with the Unity plugin. SDK Sdk engineering issue.
Projects
None yet
Development

No branches or pull requests

7 participants