Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Windows Video Ads not working

Discussion in 'Windows' started by vladrybak, Oct 19, 2015.

  1. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    Hello, I have a problem with integration of video interstitial ads from Windows Universal Ad Client SDK in Unity project. In empty windows project everything works fine, but in Unity generated project, when I call "MyVideoAd.RequestAd(AdType.Video, MyAppId, MyAdUnitId)" method, I receive an unknown error in Windows Univeral 8.1 build and File not found error in Windows store 8.1 build. Have anybody face this issue? I'm using Unity 5.2.1p4 and Visual Studio 2015.
    Stack trace:
    [External Code]
    UniversalXamlAdControl.Windows.dll!102ade3e()
    UniversalXamlAdControl.Windows.dll!102b5c64()
    UniversalXamlAdControl.Windows.dll!102f116c()
    [External Code]
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    Disable "Just my code" in Visual Studio, this will give a better stack trace.
     
  3. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    After I reboot my PC or something else what I can't understand, Video is playing. But errors are still there. There was 3 of them when there was no video, and now there is only two. For windows phone there is only one error. File not found. Here is a stacktrace with just my code disabled:
    Exception thrown at 0x76683E28 in Sword vs Sword.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x0BFAF954. HRESULT:0x80070002 Не удается найти указанный файл.
    WinRT information: Не удается найти указанный файл.
    Stack trace:
    >combase.dll!7688a49d()
    >vccorlib120_app.dll!06cba438()
    >vccorlib120_app.dll!06cbb4b1()
    >UniversalXamlAdControl.Windows.dll!0b67de3e()
    >UniversalXamlAdControl.Windows.dll!0b685c64()
    >UniversalXamlAdControl.Windows.dll!0b6c116c()
    >windows.storage.dll!77008f15()
    >windows.storage.dll!770988bb()
    >windows.storage.dll!7709857e()
    >windows.storage.dll!770984d4()
    >windows.storage.dll!77098768()
    >windows.storage.dll!77008832()
    >windows.storage.dll!770d3e1a()
    >windows.storage.dll!770d3ded()
    >kernel32.dll!776f3744()
    >ntdll.dll!77e0a064()
    >ntdll.dll!77e0a02f()
    The second error is on windows store only : Missing credentials in security package. Stacktrace:
    Exception thrown at 0x76683E28 in Sword vs Sword.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x0BD2F8F4. HRESULT:0x8009030E В пакете безопасности отсутствуют учетные данные
    WinRT information: В пакете безопасности отсутствуют учетные данные
    Stack trace:
    >combase.dll!7688a49d()
    >vccorlib120_app.dll!06cba438()
    >vccorlib120_app.dll!06cbb4b1()
    >UniversalXamlAdControl.Windows.dll!0b67de3e()
    >UniversalXamlAdControl.Windows.dll!0b685c64()
    >UniversalXamlAdControl.Windows.dll!0b67dabc()
    >rpcrt4.dll!77545eac()
    >rpcrt4.dll!775137e3()
    >combase.dll!767cc189()
    >rpcrt4.dll!7754364c()
    >combase.dll!768865db()
    >combase.dll!768530a1()
    >combase.dll!7685d5ce()
    >combase.dll!7685ebd1()
    >combase.dll!76851cac()
    >combase.dll!768561d1()
    >rpcrt4.dll!775392cd()
    >rpcrt4.dll!77538dc5()
    >rpcrt4.dll!775390ec()
    >rpcrt4.dll!77537602()
    >rpcrt4.dll!77537a26()
    >rpcrt4.dll!775384a3()
    >rpcrt4.dll!77536956()
    >rpcrt4.dll!77541fb1()
    >ntdll.dll!77de5771()
    >ntdll.dll!77de4955()
    >kernel32.dll!776f3744()
    >ntdll.dll!77e0a064()
    >ntdll.dll!77e0a02f()
    And a third error, which is now gone, was - The object invoked had disconnected from its clients

    I don't understand why it's working now and why not worked before. And theese unhandled exceptions are very strange.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    Well, I can read from errors that some file is not found and there are missing security credentials. Is that some plugin that you use?
    You can set debugger to break when any exception is thrown, then see the calls stack and what is missing.
     
  5. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    No it's not a plugin, I just added this sdk to my windows store solution. And this sdk is throwing exceptions on Unity generated solution and not throwing on empty windows store solution. So, I think that Unity somehow modified an original windows store project and caused those errors...
     
    Last edited: Oct 19, 2015
  6. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    Our templates are based on VS ones, but Microsoft updatesw them from time to time.
    The solution would be to go line-by-line in MS and our templates. We had issues in the past where we were not create a Frame and ads did not work because of it.
     
  7. dondon

    dondon

    Joined:
    Jul 6, 2012
    Posts:
    35
    Could you solve the issue? I have the same error, when I add the sdk for the windows ads...

    Some help would be really appreciated!

    Thanks
    Roberto
     
  8. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    I figured out that file not found exceptions does not prevent video play, so now my project show videos in release with exceptions, but windows ads fillrate is very low anyway...