prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
436 stars 744 forks source link

Invalid request format: "bidder" query param is required #3451

Closed dzesm closed 10 months ago

dzesm commented 10 months ago

After calling cookie_sync endpoint from client side and then generating iframe / image based on type, the server calls setuid endpoint. However, even though in the payload there is obviously a bidder parameter, the response still shows an error - Invalid request format: "bidder" query param is required.

Screenshots:

payload response

And this happens for each bidder. Do you know what could be the problem here?

SyntaxNode commented 10 months ago

What is your role in the cookie sync process. Are you a publisher or a bidder?

dzesm commented 10 months ago

We are hosting our own instance of Prebid Server to connect with different SSPs, so we're acting as publishers.

SyntaxNode commented 10 months ago

Could you please share the URL generated by the cookie sync endpoint?

dzesm commented 10 months ago

Decoded URL:

https://ads.pubmatic.com/AdServer/js/user_sync.html?bidder=pubmatic&gdpr=1&gdpr_consent=CPvaXYAPvaXYAEsACBITDPCoAP_AAE_AABCYINJD7D7FbSFCwP5_aPsUMAhXRlCAQuQgAASBA2ABQAqQIBQSkkAYFEygBCACAAAAICZBIQIMCAgACUEBQAAAIAEEAAAAJAAIIAAAgEEAAgBICAACAIAAEAAIAAAAEAAQmQhABIIASEAAhAAAIAAAAAgAAAAAAgCIACAAAAEAAAAAAAAAAQQaQD2F2K2kKFgfi-QeYoQBCujKEAhcBAAAkCBoAAgBUgQAgFIIAwAJFAAEAAAAAAQEgCQAAQABAAAIICgAAAQAAIAAAAQAAQQAABAIIAAACAAAAEAQAAIAAQAAAAIAAhEhCACQQAkIAAAAAAQAAAAAAAAAAABAAAAEAAAAIAAAAAAAAAAgAA&us_privacy=&gpp=&gpp_sid=&predirect=https://prebid.test.domain.com/setuid?bidder=pubmatic&gdpr=1&gdpr_consent=CPvaXYAPvaXYAEsACBITDPCoAP_AAE_AABCYINJD7D7FbSFCwP5_aPsUMAhXRlCAQuQgAASBA2ABQAqQIBQSkkAYFEygBCACAAAAICZBIQIMCAgACUEBQAAAIAEEAAAAJAAIIAAAgEEAAgBICAACAIAAEAAIAAAAEAAQmQhABIIASEAAhAAAIAAAAAgAAAAAAgCIACAAAAEAAAAAAAAAAQQaQD2F2K2kKFgfi-QeYoQBCujKEAhcBAAAkCBoAAgBUgQAgFIIAwAJFAAEAAAAAAQEgCQAAQABAAAIICgAAAQAAIAAAAQAAQQAABAIIAAACAAAAEAQAAIAAQAAAAIAAhEhCACQQAkIAAAAAA&us_privacy=&gpp=&gpp_sid=&f=b&uid=

Full response for this bidder: { "bidder": "pubmatic", "no_cookie": true, "usersync": { "url": "https://ads.pubmatic.com/AdServer/js/user_sync.html?bidder=pubmatic&gdpr=1&gdpr_consent=CPvaXYAPvaXYAEsACBITDPCoAP_AAE_AABCYINJD7D7FbSFCwP5_aPsUMAhXRlCAQuQgAASBA2ABQAqQIBQSkkAYFEygBCACAAAAICZBIQIMCAgACUEBQAAAIAEEAAAAJAAIIAAAgEEAAgBICAACAIAAEAAIAAAAEAAQmQhABIIASEAAhAAAIAAAAAgAAAAAAgCIACAAAAEAAAAAAAAAAQQaQD2F2K2kKFgfi-QeYoQBCujKEAhcBAAAkCBoAAgBUgQAgFIIAwAJFAAEAAAAAAQEgCQAAQABAAAIICgAAAQAAIAAAAQAAQQAABAIIAAACAAAAEAQAAIAAQAAAAIAAhEhCACQQAkIAAAAAAQAAAAAAAAAAABAAAAEAAAAIAAAAAAAAAAgAA&us_privacy=&gpp=&gpp_sid=&predirect=https%3A%2F%2Fprebid.test.domain.com%2Fsetuid%3Fbidder%3Dpubmatic%26gdpr%3D1%26gdpr_consent%3DCPvaXYAPvaXYAEsACBITDPCoAP_AAE_AABCYINJD7D7FbSFCwP5_aPsUMAhXRlCAQuQgAASBA2ABQAqQIBQSkkAYFEygBCACAAAAICZBIQIMCAgACUEBQAAAIAEEAAAAJAAIIAAAgEEAAgBICAACAIAAEAAIAAAAEAAQmQhABIIASEAAhAAAIAAAAAgAAAAAAgCIACAAAAEAAAAAAAAAAQQaQD2F2K2kKFgfi-QeYoQBCujKEAhcBAAAkCBoAAgBUgQAgFIIAwAJFAAEAAAAAAQEgCQAAQABAAAIICgAAAQAAIAAAAQAAQQAABAIIAAACAAAAEAQAAIAAQAAAAIAAhEhCACQQAkIAAAAAA%26us_privacy%3D%26gpp%3D%26gpp_sid%3D%26f%3Db%26uid%3D", "type": "iframe", "supportCORS": false } },

SyntaxNode commented 10 months ago

Thank you for the details. The redirect url is not complete. Notice it begins with "bidder" when it should begin with the public url of your Prebid Server.

There's not a lot of configuration nicely documented yet, but I recently described this setting. Please see the config docs for more info. You're also welcomed to open new issues as needed as we build out better host documentation.

You may also wish to review this PR which includes an example for getting started with Prebid Server.

dzesm commented 10 months ago

As I can see, the redirect URL is starting with the public URL: redirect=https://prebid.test.domain.com/setuid?bidder=pubmatic&gdpr=1... Should we remove everything coming before and just leave the redirect?

Also, redirect is written as predirect in your bidder-config -> pubmatic.yaml file. Don't know if it is a mistake or not.

SyntaxNode commented 10 months ago

Ah, gotcha. I was looking at the wrong part of the url. I'm curious what server is producing the "Invalid Request Format" error. If you posted the exact output of your cookie sync endpoint, the browser should try to redirect to prebid.test.domain.com and fail.

dzesm commented 10 months ago

Thank you for your help. In the end, we figured there was a problem with our endpoint configuration - all query parameters after the endpoint were truncated. After fixing the problem, cookie sync works as expected. Thanks again!