Windows Phone 8 - App Crashing after opening Google Admob Interstitial.

416 views
Skip to first unread message

Trisha Elwood

unread,
Apr 10, 2014, 9:14:10 AM4/10/14
to google-adm...@googlegroups.com
   
I have integrated admob interstitial ads into my app as Google AdMob SDK sample. After initialize interstitial ad, it appear fine. Problem occures when I clicked on ad and navigate to browser then pressing device's back button to navigate back into app, app crashes every times. Result is crash with message: "The given key was not present in the dictionary."

Is there any solution to stop crashing app?

William Ferguson

unread,
Apr 10, 2014, 6:01:05 PM4/10/14
to google-adm...@googlegroups.com
Post the stacktrace.

Ray Kelly

unread,
Apr 18, 2014, 3:07:50 PM4/18/14
to google-adm...@googlegroups.com
How did you get interstatials to work at all?  I keep getting "NoFill" even when ForceTesting= true.

Thanks for your help.

waqas...@tkxel.com

unread,
Jun 5, 2014, 10:40:13 AM6/5/14
to google-adm...@googlegroups.com
A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in Microsoft.Phone.Interop.ni.dll

I am facing the same issue.
This is the exception.

Scenerio to reproduce :
Show Interstitial 
click on ad
press backbutton
App will crash.

I tested it on AdMob Sample for WP8 , and gives the same exception.

CasualGames.nu

unread,
Jun 5, 2014, 4:44:26 PM6/5/14
to google-adm...@googlegroups.com
Very ugly solution but works, add the following to your App.xaml.cs

if (System.Diagnostics.Debugger.IsAttached)
{
 // An unhandled exception has occurred; break into the debugger
 System.Diagnostics.Debugger.Break();

}
else
{
 String ex = e.ExceptionObject.ToString().ToLower();

 if (ex.Contains("system.collections.generic.keynotfoundexception"))
 {
     //Caused by Google fullscreen ads
     e.Handled = true;
 }
}

This will tell your windows phone that you have taken care of this problem but in fact you just ignore it hower the app will still continue and work. In the long run the SDK should be fixed not to throw this error but this ugly workaround works,

CasualGames.nu

unread,
Jun 5, 2014, 4:46:00 PM6/5/14
to google-adm...@googlegroups.com
I had the same issue!

For some regions the fill rate is just very bad. Try to deploy it was beta and ask a person in a more popuplated country to try it or assume that it works and publish it :) Personally I would not go with suggestion #2.
Reply all
Reply to author
Forward
0 new messages