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

Q: getPAAPIConfig returns empty object #11172

Closed
wsusrasp opened this issue Mar 5, 2024 · 2 comments
Closed

Q: getPAAPIConfig returns empty object #11172

wsusrasp opened this issue Mar 5, 2024 · 2 comments

Comments

@wsusrasp
Copy link
Contributor

wsusrasp commented Mar 5, 2024

Type of issue

Question

Description

I am testing new feature introduced in #10930 (thank you for adding this), but I have some problems with retrieveing configs. This does not seem like a bug, but I cannot find any information on why this happens. I found out that this is due to configs being added to USED variable, which is checked when returning config and when candidate is present in it, it is removed from result. I'd like to ask how should I use the new functionality to actually get the configs, since it seems that I am either calling it incorrectly or at wrong time.

Relevant code: https://github.com/prebid/Prebid.js/blob/master/modules/paapi.js#L155

@wsusrasp wsusrasp changed the title Q: getPAAPIConfig returns none Q: getPAAPIConfig returns empty object Mar 5, 2024
@dgirardi
Copy link
Collaborator

dgirardi commented Mar 5, 2024

If you are using fledgeForGpt, it automatically "uses" configs unless you setConfig({paapi: {gpt: {autoconfig: false}}}). Otherwise, getPAAPIConfig returns configs that it did not already return previously - meaning that if called twice in a row, the second call returns an empty object.

@wsusrasp
Copy link
Contributor Author

wsusrasp commented Mar 6, 2024

This was exactly the case, thank you for quick feedback.

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

No branches or pull requests

3 participants