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

Cannot read property 'bidId' of undefined, when using prebid's s2s module and stored imp from a customized prebid server #1580

Closed
tiago-snigel opened this issue Nov 11, 2020 · 6 comments
Labels

Comments

@tiago-snigel
Copy link

tiago-snigel commented Nov 11, 2020

Type of issue

Bug

Description

Cannot read property 'bidId' of undefined, when using prebid's s2s module and stored requests from a customized prebid server.

Steps to reproduce

I am trying to implement the architecture described here https://docs.prebid.org/prebid-server/overview/prebid-server-overview.html

I already have a prebid server running in a server, more precisely, a docker container with the prebid-server running in a server. I've created some stored-imps in the folder /usr/local/bin/stored_requests/data/by_id/stored_imps/
The stored-imp created is this one:
{"imp":[{"id":"imp-1","banner":{"format":[{"w":300,"h":250}]},"ext":{"appnexus":{"placement_id":13144370}}}]}

The Appnexus tag is the generic testing tag available on the Prebid.js page and should return this Ad: Prebid Ad

On the client-side, I am using the PBS adapter and the s2sConfig object to configure the adapter. The configuration is this one:

pbjs.setConfig({
  s2sConfig: {
    accountId: '****',
    enabled: true,
    bidders: ['prebid'],
    timeout: 500,
    endpoint: 'https://dev-adserv-fra1.snigelweb.com/openrtb2/auction',    
   }
});

And the adUnits Object that I am pushing to pbjs is this one:

{
  path: '/****/sws-testing',
  code:'test-ad-1',
  mediaTypes: {
    banner: { sizes: [[300,250]] }
  },
  bids: [{
    bidder: 'prebid',
    params: {
      storedrequest: {
        id: "imp-2",  //eg: stored_imp prebid
      },
    }
  }]
}

And then I have the stored imp imp-2.json

{
  "banner":{"format":[{"w":300,"h":250}]},
  "ext":{"appnexus":{"placementId":13144370}}
}

Test page

https://staging.snigelweb.com/test/prebid/pbs?pbjs_debug=true

Expected results

This should result in a valid bid of 50 cents.

Actual results

What we have is a "Cannot read property 'bidId' of undefined" error due to the different keys of bidIdMap and seatbid.

@bretg bretg added the question label Nov 12, 2020
@bretg
Copy link
Contributor

bretg commented Nov 12, 2020

  1. Prebid isn't a valid bidder code
  2. You can't specify stored-request IDs in Prebid.js. (That feature's been discussed, but not built)

Please see the example in https://docs.prebid.org/prebid-server/features/pbs-storedreqs-go.html -- the example underneath "And then POST to /openrtb2/auction with your chosen ID" -- use PostMan or curl to hit the server directly rather than going through PBJS.

@bretg
Copy link
Contributor

bretg commented Nov 12, 2020

FYI - I went ahead and specified a feature to support stored requests in PBJS -- prebid/Prebid.js#5965

Wouldn't count on in this year, but it's entered the long-and-winding-road...

@tiago-snigel
Copy link
Author

tiago-snigel commented Nov 12, 2020

Thank you very much for the clarification and for the new feature request @bretg that explains why we couldn't find any example with this without being direct calls to the server, and if I understood correctly that's why we can't use the prebid as the bidder either, although we can see the bids they can't be matched as "prebid" is not a bidder.

@SyntaxNode
Copy link
Contributor

@tiago-snigel @bretg Does the PBJS feature request cover this use case, or do we need to discuss how to handle this for PBS?

@tiago-snigel
Copy link
Author

Hi @SyntaxNode, thank you very much for handling this.
I believe it's fine on PBS from my tests as long as I can ass the requests to it, it appears to work correctly.
@bretg do you have any other input?

Thank you very much to both of you.

@bretg
Copy link
Contributor

bretg commented Dec 10, 2020

The new design for 'First Party Data' in prebid/Prebid.js#5795 opens the door in Prebid.js to provide full OpenRTB, which will allow the addition of stored_request_ids in the conventional PBS locations.

I don't think there's anything we need to do on the PBS side, so closing this out this request.

Re-open and let us know if there's another aspect to the issue @tiago-snigel

@bretg bretg closed this as completed Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants