Your Digital Media Has Never Looked So Good

 
renojim
** Valued Community Member **
Topic Author
Posts: 3492
Joined: Mon Feb 15, 2010 1:35 pm

Bug in RAF or problem with VAST returned by ad provider?

Thu Sep 05, 2019 5:11 pm

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:
[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
 
User avatar
RokuNB
Posts: 465
Joined: Fri Mar 31, 2017 2:22 pm

Re: Bug in RAF or problem with VAST returned by ad provider?

Fri Sep 20, 2019 10:50 am

regarding ROKU_ADS_EXTERNAL_IP - this is tricky but i think i know the answer! i believe you have LAT selected (limit ad tracking) in Settings > Privacy - that's one of intended results.

the other thing i'll have to guess if i understood you - seems that 1st URL you gave was returned as part of calling first the 2nd URL? i.e. returned VAST had a wrapper pointing to a new URL. Well in that case, this is clearly a problem of that ad server (#2 URL) - they have returned invalid URL:
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)

clue: unescaped space chars are never OK in URL (should be %20 or +)

i figure that ad server is using the value that was correctly escaped (by RAF macro &ua=ROKU_ADS_USER_AGENT or you) but when they substituted it in XML, they did not escape it
 
renojim
** Valued Community Member **
Topic Author
Posts: 3492
Joined: Mon Feb 15, 2010 1:35 pm

Re: Bug in RAF or problem with VAST returned by ad provider?

Fri Sep 20, 2019 2:05 pm

RokuNB wrote:
regarding ROKU_ADS_EXTERNAL_IP - this is tricky but i think i know the answer! i believe you have LAT selected (limit ad tracking) in Settings > Privacy - that's one of intended results.

Yep, that's probably it!

RokuNB wrote:
i figure that ad server is using the value that was correctly escaped (by RAF macro &ua=ROKU_ADS_USER_AGENT or you) but when they substituted it in XML, they did not escape it

Right, that's what it looks like.  My problem is that getting the ad server to fix it probably isn't likely, so I'm missing an opportunity this ad break.  I see the same thing occasionally with other parameters that aren't correctly escaped.  It would be nice if when RAF detects a problem with a URL it automatically fixed such a simple thing.  Or, maybe have a callback and give my code a chance to fix it.

-JT

Who is online

Users browsing this forum: No registered users and 3 guests