renojim
6 years agoCommunity Streaming Expert
Bug in RAF or problem with VAST returned by ad provider?
I've been noticing a bunch of [RAF.err] messages in the console when my game requests an ad and I don't know who to blame. 🙂
The error is something like this:
The URL is coming from the VAST tag returned from the original request that's something like:
So the User Agent is the problem. It's %-encoded in the initial request, but not in the VAST tag URL. So which end is responsible for %-encoding things before the second request to the URL in the VAST tag?
I can get around it by just setting the User Agent in the adUrl I give to RAF to something like Roku/DVP, but that seems like a bit of a hack. I'm not sure if it's even necessary to include the ua parameter at all, so maybe just removing it is the answer.
For extra credit, why doesn't ROKU_ADS_EXTERNAL_IP get populated? 🙂
-JT
The error is something like this:
[RAF.err] roUrlTransfer.setURL("http://(some domain)/vast2?adtype=video&compMode=and&dim=101&z=1r&w=1920&h=1080&ip=ROKU_ADS_EXTERNAL_IP&ajuseragent=Roku/DVP-9.10 (049.10E04111A)") rejected argument - invalid chars? (space and "<>\^`{|} must be %-encoded)
The URL is coming from the VAST tag returned from the original request that's something like:
http://adserver.com/serve/?tag=1234&ua=Roku%2FDVP-9.10%20%28049.10E04111A%29&appid=dev&width=1280&ip=ROKU_ADS_EXTERNAL_IP&dnt=1&height=720&rnd=691954574
So the User Agent is the problem. It's %-encoded in the initial request, but not in the VAST tag URL. So which end is responsible for %-encoding things before the second request to the URL in the VAST tag?
I can get around it by just setting the User Agent in the adUrl I give to RAF to something like Roku/DVP, but that seems like a bit of a hack. I'm not sure if it's even necessary to include the ua parameter at all, so maybe just removing it is the answer.
For extra credit, why doesn't ROKU_ADS_EXTERNAL_IP get populated? 🙂
-JT