PlayException: No ads found

Topics: Windows Phone 8
May 21, 2014 at 8:27 AM
I've been attempting to use the player framework on Windows Phone 8.0 SDK to just play a few of the VAST samples found on the IAB website.

I am able to use the following URL successfully: http://smf.blob.core.windows.net/samples/win8/ads/vast_linear.xml
But when I use any of the other VAST urls like:
http://ad3.liverail.com/?LR_PUBLISHER_ID=1331&LR_CAMPAIGN_ID=229&LR_SCHEMA=vast2

I get a PlayException that looks like the following:

Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException occurred
HResult=-2146233088
Message=Ad could not play
Source=Microsoft.Media.Advertising
StackTrace:
   at Microsoft.Media.Advertising.DocumentAdPayloadHandler.<>c__DisplayClassf.<<PlayAdAsync>b__a>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.Media.Advertising.DocumentAdPayloadHandler.<PlayAdAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.Media.Advertising.VastAdPayloadHandler.<PlayAdAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.Media.Advertising.AdHandlerController.<PlayAdAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.PlayerFramework.Advertising.MediaPlayerExtensions.<PlayAd>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at ShadowStepProto.MainPage.<<LaunchVideoAd>b__3>d__4.MoveNext()
InnerException: Microsoft.Media.Advertising.DocumentAdPayloadHandler.LoadException
   HResult=-2146233088
   Message=Ad could not load
   Source=Microsoft.Media.Advertising
   StackTrace:
        at Microsoft.Media.Advertising.DocumentAdPayloadHandler.<>c__DisplayClassf.<<PlayAdAsync>b__a>d__15.MoveNext()
   InnerException: 
        HResult=-2146233088
        Message=No ads found.
        InnerException: 
I can't help but notice that the log mentions an error that occurs before this in System.xml:

An exception of type 'System.Xml.XmlException' occurred in System.Xml.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'System.Xml.XmlException' occurred in System.Xml.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'System.Xml.XmlException' occurred in System.Xml.ni.dll and wasn't handled before a managed/native boundary
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Xml.Linq.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
An exception of type 'System.Exception' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.Exception' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'System.Exception' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.Exception' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'System.Exception' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'System.Exception' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.LoadException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.LoadException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.LoadException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.LoadException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.LoadException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in Microsoft.Media.Advertising.DLL and wasn't handled before a managed/native boundary
An exception of type 'Microsoft.Media.Advertising.DocumentAdPayloadHandler.PlayException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary

Any idea what might be going on here? I'm not sure why an xml exception makes sense in something that's VAST compliant, where the xml is obviously formed fine.

The code behind looks something like:
            var adSource = new RemoteAdSource()
            {
                Type = VastAdPayloadHandler.AdType,
                Uri = new Uri(vastAdUrl)
            };

            var progress = new Progress<AdStatus>();
            try
            {
                await player.PlayAd(adSource, progress, CancellationToken.None);
            }
I should mention, also, that this same code and url successfully plays the ad on Windows 8.0