Using Demo Ad Unit ID produces error: <Google> Invalid Request. Cannot determine request type. Is your ad unit id correct?

104 views
Skip to first unread message

Billy Pilgrim

unread,
Aug 25, 2024, 9:39:21 PM8/25/24
to Google Mobile Ads SDK Developers
I've attempted to implement an AdMob banner ad exactly like the example on Google's GitHub found here: https://github.com/googleads/googleads-mobile-ios-examples/blob/main/Swift/advanced/SwiftUIDemo/SwiftUIDemo/Banner/BannerContentView.swift

I'm using my actual App ID, and a demo Ad Unit ID from the section found here: https://developers.google.com/admob/android/test-ads#demo_ad_units

I've tried both the Adaptive Banner ID and the Fixed Size Banner ID and I get the same error: `<Google> Invalid Request. Cannot determine request type. Is your ad unit id correct?`

Why am I getting this error when the Ad Unit ID is explicitly correct from the official guide?

I'm testing on an iOS simulator on a Mac, if that makes a difference. I know showing live ads won't work on a simulator, but this is a demo ad, so that probably can't be the case.

Mobile Ads SDK Forum Advisor

unread,
Aug 26, 2024, 3:32:21 AM8/26/24
to jsnowgo...@gmail.com, google-adm...@googlegroups.com

Hi Billy,

Thank you for contacting the Mobile Ads SDK support team. 

You are facing this error because you are using your actual app ID with the demo ad unit ID which is wrong. To avoid this error you should either use the actual app ID and ad unit ID or both the demo app ID and ad unit ID. I also see that you are using Android demo ad unit IDs for iOS. Use iOS demo ad unit IDs for iOS, and Android demo ad unit IDs for Android.

I hope this helps! Let me know if you have additional questions.  

This message is in relation to case "ref:!00D1U01174p.!5004Q02vFNbA:ref" (ADR-00264829)

Thanks,
 
Google Logo Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages