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

"Consent dismiss error" message in XCode when giving consent on iOS #275

Closed
basvdijk opened this issue Aug 29, 2023 · 3 comments
Closed

Comments

@basvdijk
Copy link

basvdijk commented Aug 29, 2023

Describe the bug

In 5.1.0 on iOS the plugin gives an error after giving consent. As a result no ads are shown. On Android there does not seem to be a problem.

The popup shows as intended
image

When pressing consent the error shows in the XCode console

ERROR MESSAGE:  {"errorMessage":"Consent dismiss error","message":"Consent dismiss error"}
⚡️  [error] - {"errorMessage":"Consent dismiss error","message":"Consent dismiss error"}
⚡️  [error] - ERROR Error: Uncaught (in promise): Error: Consent dismiss error

after enabling debugging:

⚡️  TO JS {"isConsentFormAvailable":true,"status":"OBTAINED"}
2023-08-29 20:49:57.252873+0200 App[4128:1184885] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2023-08-29 20:49:57.252973+0200 App[4128:1184885] [ProcessSuspension] 0x10f084120 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=4134, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2023-08-29 20:49:57.255894+0200 App[4128:1184885] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2023-08-29 20:49:57.255934+0200 App[4128:1184885] [ProcessSuspension] 0x10f084180 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=4134, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2023-08-29 20:50:16.312193+0200 App[4128:1184192] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

To Reproduce

  • Start a capacitor project
  • Prompt for consent using the README.MD code:
        const consentInfo = await AdMob.requestConsentInfo();

        if ((consentInfo.isConsentFormAvailable && consentInfo.status === AdmobConsentStatus.REQUIRED)) {
            const { status } = await AdMob.showConsentForm();
            console.log(status);
        }
  • Click the consent button in the popup and check XCode.

Expected behavior
Nothing, I expect that the consent is stored and ads are shown

Desktop (please complete the following information):

  • iOS

Smartphone (please complete the following information):

  • iPhone 13 Pro Max
  • OS: 16.6
  • Browser n/a
@rdlabo
Copy link
Member

rdlabo commented Aug 30, 2023

@basvdijk fixed, and released v5.1.1. Please try!
https://github.com/capacitor-community/admob/releases/tag/v5.1.1

@basvdijk
Copy link
Author

@rdlabo Thansk! This seems to solve it. Unfortunately another iOS error popped up for which I've created a new bug report at #276

@rangloe
Copy link

rangloe commented Jan 31, 2024

@basvdijk I had the same problem, and I solved it by first calling the reset method:

try {
 await AdMob.resetConsentInfo();
 await AdMob.requestConsentInfo();
 await AdMob.showConsentForm();
} catch (error) {
 console.error('Error during consent process:', error);
} finally {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants