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

USP in iframe installs broken __uspapi #6050

Closed
ReinoutStevens opened this issue Nov 30, 2020 · 1 comment
Closed

USP in iframe installs broken __uspapi #6050

ReinoutStevens opened this issue Nov 30, 2020 · 1 comment

Comments

@ReinoutStevens
Copy link
Contributor

Type of issue

When __uspapi is provided through an iframe / __uspapiLocator, the consent management module installs __uspapi that communicates through the message api.
Once prebid has received its consent information, it removes the listener. As a result, other libraries that require consent info communicate with a broken __uspapi, as callbacks are never triggered

Description

The consentManagementUsp.js has the following code

    function uspapiCallback(consentObject, success) {
      window.removeEventListener('message', readPostMessageResponse, false);
      moduleCallback(consentObject, success);
    }

Removing the event listener results that subsequent calls to __tcfapi wont be handled by the newly installed __tcfapi function.
The solution is just to remove the window.removeEventListener line.

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
@gglas gglas removed the stale label Jan 13, 2021
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

2 participants