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

Error uncaught No available form can be built. #638

Open
merbin2012 opened this issue Dec 21, 2023 · 1 comment
Open

Error uncaught No available form can be built. #638

merbin2012 opened this issue Dec 21, 2023 · 1 comment

Comments

@merbin2012
Copy link

I think you need to update your sample code.

"Uncaught No available form can be built." this error showing, if we call "await consent.loadAndShowIfRequired()" method before execute the following method "await consent.requestInfoUpdate()"

I think needs to remove the following lines

const consentStatus = await consent.getConsentStatus()
  if (consentStatus === consent.ConsentStatus.Required)

Kindly confirm once if am I right or wrong. Thank ou

@sfeast
Copy link

sfeast commented Jan 14, 2024

As @merbin2012 mentions, existing sample code here shows:

const consentStatus = await consent.getConsentStatus()
if (consentStatus === consent.ConsentStatus.Required) {
  await consent.requestInfoUpdate()
}

await consent.loadAndShowIfRequired()

which only calls await consent.requestInfoUpdate() when consentStatus === consent.ConsentStatus.Required, however on iOS I get the below error if not always first calling

await consent.requestInfoUpdate()

before calling:

await consent.loadAndShowIfRequired()

error:

Unhandled Promise Rejection: Consent form unavailable. Request a consent form using [UMPConsentInformation.sharedInstance requestConsentInfoUpdateWithParameters:completionHandler:]

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

No branches or pull requests

2 participants