W/Ads: Received error HTTP response code: 400

2,042 views
Skip to first unread message

Marty Rehder

unread,
May 9, 2017, 1:24:14 PM5/9/17
to Google Mobile Ads SDK Developers
I cannot seem to load ads on any device.  At one point, I was at least getting test ads, but now nothing.  I've followed the "Get Started in Android" guide to the letter. Please tell me what is wrong that I cannot display ads

Martin


05-09 12:18:52.089 21902-4642/? W/Ads: Received error HTTP response code: 400
05-09 12:18:52.091 29345-29358/? W/Ads: There was a problem getting an ad response. ErrorCode: 0
05-09 12:18:52.097 29345-29345/? W/Ads: Failed to load ad: 0

Here is the Charles Proxy request:
-----------------------------------------------
GET /mads/gma?carrier=310260&riv=7&_activity_context=true&format=320x50_mb&gl=US&seq_num=5&eid=318475406%2C318477040%2C318476426%2C318478007%2C46621100&u_sd=3.5&ms=CpUCCoAC75OZWCTypTrqFsq92tA3kCoBKbBP6Ln5JepOpUjdcvwTOzDZxNDX1nKj93-2aXbQ19LJi4Xs976UoWSRDZIJ6PJaHWJ6cacUJaxQ-dUYl1Cm5H_RspCreVYqGbAynUvelPHwFJbdxg3GN_eeW7VY1jvbGXunhk7gPg3qWrc73oOeGwb2wny6QLP5OgdVAShEWX4YFQKfOI9JUgL39_Gib0fo8yvqUptHtvg8P8clTZbuQoV8mgg5Nd4jbRWQsbkrtcHpuYg1nb8mEwW8ymDuWaJdEMelcgSGerzSIAp9SAghe5hRDo5frfZvanC3l_SgQ_NcBkw0Ntp4QfvvFsVwlxIQwcO4fta2Cm4ZOVHzKb5aThKVAgqAArjsVZgE8IaBp9FFer1hm_FSbhXGNOYLuK19uBoRMr9UKM08XW_CefseIlox3IWLV8wACtg0O3Zmu7RPIKG6AMPgNdz5xBngfCl11j2IRXXmYaf4Ah4Jhfa2seaQzwnej_5sla93Uu73RQpjtQNR_V6ylA4Foy2DbgCO6JQQ7QvMsTQAIpR3SRpaZjcboJCj1rs2b29-SaiaOO4ymlRfMJ2xSDhpg1g_V7eWlb2E6BQ9lcdYH8WPS81C8tnz1opQQXP1CHDJzffXaRVmi6gMgfyffJ_UONetIzuLjSIIIBHJ8Cnit7JqC8-4xdMqaOogpbZUf2d6nK8k1wE62Ay7-YISEM6nV8462Z9rE_lWbYiqbuM&target_api=25&hl=en&scroll_index=-1&platform=motorola&submodel=Nexus%206&rm=2&android_app_muted=false&request_id=dd3cc3b3-4c9c-4e7d-84ac-470127f2813b&am=0&ma=0&cnt=1&js=afma-sdk-a-v10298430.10240000.2&session_id=18387095384777304672&muv=8&coh=1&sp=0&gnt=13&forceHttps=true&mv=80773100.com.android.vending&android_app_volume=1&android_num_video_cache_tasks=0&u_w=412&u_h=684&msid=com.ulsanonline.triominoes&app_name=56.android.com.ulsanonline.triominoes&_package_name=com.ulsanonline.triominoes&an=56.android.com.ulsanonline.triominoes&net=wi&u_audio=1&u_so=p&basets=2168788199&currts=2169920710&preqs_in_session=4&pclick=0&support_transparent_background=true&pimp=0&preqs=4&time_in_session=1132797&output=html&region=mobile_app&u_tz=-300&client_sdk=1&ex=1&client=ca-app-pub-6335778550033954&slotname=2511101133&askip=4&gsb=wi&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_as_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_dinmo_gcache&bisch=true&blev=0.93&swdr=false&cans=5&canm=false&prlus=458398&prdtb=1446330&prutb=-1&pscfas=true&heap_free=6395540&heap_max=268435456&heap_total=31552492&wv_count=0&sai=0&blockAutoClicks=true&_efs=false&includeDoritos=true&content_infol=-1&blob=ABPQqLGoq4quYsL-O7KxXoBWT6sCvSbUiuWsaPTTKBQsRP4RnG9r3jZNWFqPzEK4bApLBPs4mKQ_ZI8Ox1l9bQwjRYt3QNcKyLdVTBDUTHj6ksxxUNoTngEqa4pmGyGuHUwnY8VjEttwfEgJak4Jv8ojW_527Ya5D71HUdYhNzGW_i1kQQBx6z7H7LyTbjZuNJiWaxfMqzw1CIg2IhzEg2FmKUkt8YLHdsFMuiLAhMOg67wdDH7Z2CJKvf33Eg&et=5&tcar=8&jsv=4-production-20170508_RC00&urll=2474 HTTP/1.1
User-Agent: Mozilla/5.0 (Linux; Android 7.0; Nexus 6 Build/NBD92G; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/58.0.3029.83 Mobile Safari/537.36 (Mobile; afma-sdk-a-v10298430.10298000.2)
x-afma-drt-cookie: DSID=ADyxuksZ5SUEakQpp7DzJe1XhdfX68AEE0AJE92CMO6sge7FunlRnX3xcskIqoIr4esPOq96_kJMt83CWEtgLylui_D6kbaW82lfBPpV8eQPQTW6-WhQcjs
Connection: Keep-Alive
Accept-Encoding: gzip

And the Response from google ads:
------------------------------------------------
HTTP/1.1 400 Bad Request
P3P: policyref="https://googleads.g.doubleclick.net/pagead/gcn_p3p_.xml", CP="CURa ADMa DEVa TAIo PSAo PSDo OUR IND UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"
Timing-Allow-Origin: *
X-Afma-Use-Https: false
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Date: Tue, 09 May 2017 17:18:52 GMT
Server: cafe
Content-Length: 0
X-XSS-Protection: 1; mode=block
Alt-Svc: quic="googleads.g.doubleclick.net:443"; ma=2592000; v="37,36,35",quic=":443"; ma=2592000; v="37,36,35"
Connection: Keep-alive


I'm using these dependencies:
----------------------------------------
(project)
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.google.gms:google-services:3.0.0'
}
(app)
dependencies {
compile 'com.google.android.gms:play-services-gcm:10.2.4'
compile 'com.android.support:support-v4:25.3.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.1'
compile 'com.androidplot:androidplot-core:1.0.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.firebase:firebase-ads:10.2.4'
}

my IDS:
-------
<string name="admob_pub_id">ca-app-pub-6335778550033954~6638103937</string>
<string name="selectgames_banner_ad_unit_id">ca-app-pub-6335778550033954/2511101133</string>

My Layout for the ad:
---------------------
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/selectgames_banner_ad_unit_id"/>

My Java code:
-------------
MobileAds.initialize(getApplicationContext(), getString(R.string.admob_pub_id));

Bundle extras = new Bundle();
AdView mAdView = (AdView) findViewById(R.id.adView);
AdRequest request = new AdRequest.Builder().build();
mAdView.loadAd(request);

Marty Rehder

unread,
May 9, 2017, 1:40:33 PM5/9/17
to Google Mobile Ads SDK Developers
Followup: I have tested my IDs in the banner example samples https://github.com/googleads/googleads-mobile-android-examples/releases and got the same result.

Deepika Uragayala- MobileAds SDK team

unread,
May 9, 2017, 4:10:52 PM5/9/17
to Google Mobile Ads SDK Developers
Hi Marty,

Thank you for the details. I was able to load Banner ads using your Ad Unit ID and our sample apps without any issue. My suspicion is that you were trying to load a newly created Ad Unit ID, which always throws Error Code 0 as it would take a few hours for the first set of ads to be fired from the ad network. Can you try again now, with our sample apps first and then let us know if it's working?

I would also suggest that you try switching networks and see if you are able to load ads.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

Marty Rehder

unread,
May 9, 2017, 6:05:17 PM5/9/17
to Google Mobile Ads SDK Developers
OK, I retested the sample app with my new ad IDs - that works.   But when I deploy the same IDs in my app, I now get a 403 error.   


05-09 11:41:30.934 1499-22541/? W/Ads: Received error HTTP response code: 403
05-09 11:41:30.939 21702-21720/? W/Ads: There was a problem getting an ad response. ErrorCode: 0
05-09 11:41:30.943 21702-21702/? W/Ads: Failed to load ad: 0

request:
-----------
GET /mads/gma?riv=7&_activity_context=true&format=320x50_mb&gl=US&seq_num=1&eid=318475406%2C318477041%2C318476426%2C318478007%2C318478055&u_sd=2&ms=CpUCCoACHKW6kc5OfymfikCX6rqBZbNjFrINdq8xPIw7l-sw_4bkcJAEKwwvpds_GNT-tnzI1No92f2bLTHxHRMk77XwJR1OEF1PiX2bgiIU6sFP0m8UG-ENSoMoHwLhb8W4Gpw0pLD8GWkPtvIFE4DDHfMAaL_Z6nhMY8XkWNkjtNy3s4UqsGzYTk4WYrEd0G8PHcz27NHXWyQ8-BtSutC5u7HIPIOipMZ1H4EiIgFyQ4EiBxoBanSWYiNjIzx7vxy3qRJfqks8-muXLuf9KLZwayO09QMDy9hraEbGWWbp1fVO6GmTuoPY60g9tFlA6rmSijtEfzbV7n-1-lc_0WcEQBdIPhIQ1F_FHGwGckuJRmfOAp__2RKVAgqAAvcDuoYFrtzHW7ZvBk2xJA4Wi-enlbhO5ZciD1jHBE4iB-Rr8DsQr7sRXW4rnOE3zAF2EpdnD0IwDILzSDyfmQQOtJX1CX503twAbzLeqEANYVa7uQMSfm0T52XylJutMvaI4_5duPYOY8DUN-BLdPjpv0ZdBcYA1AAdh_IBUV3Vx-T1t1kvF7gCMrjZxSWqh7fAWU0QhZ9qXD7FLU5Cyj6MRotyr-QIPrUz958KGVdRwtyl0osQg7u0__Ki3YGWRjSq_aNgIVofh9k59n_C-0XivUm9nGykVWPLxyeMUMi_oWbspkmFOeS63_x1t-WCPqrg5hycfvzWw637iuKU8dQSECOq3w0Fg7HjQLOvkc1Q6y0&target_api=25&hl=en&scroll_index=-1&platform=LGE&submodel=Nexus%204&rm=2&android_app_muted=false&request_id=51e86c01-b90c-43bd-88b6-4458e93efb96&am=0&cnt=1&ma=0&js=afma-sdk-a-v10298236.10240000.2&session_id=10425926996089014184&muv=15&coh=1&sp=0&forceHttps=true&gnt=0&mv=80773100.com.android.vending&android_app_volume=1&android_num_video_cache_tasks=0&u_w=384&u_h=592&msid=com.ulsanonline.triominoes&app_name=56.android.com.ulsanonline.triominoes&_package_name=com.ulsanonline.triominoes&an=56.android.com.ulsanonline.triominoes&net=wi&u_audio=1&u_so=p&basets=96295188&currts=96295188&preqs_in_session=3&pclick=0&support_transparent_background=true&pimp=0&preqs=0&time_in_session=16699923&output=html&region=mobile_app&u_tz=-300&client_sdk=1&ex=1&client=ca-app-pub-6335778550033954&slotname=2511101133&gsb=wi&caps=inlineVideo_interactiveVideo_mraid1_mraid2_sdkVideo_th_autoplay_mediation_av_transparentBackground_as_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_dinmo_gcache&bisch=true&blev=1&swdr=false&cans=5&canm=false&prlus=252084&prdtb=1112521&prutb=-1&ibctc=true&pscfas=true&heap_free=6170532&heap_max=201326592&heap_total=20941300&wv_count=0&sai=0&blockAutoClicks=true&_efs=false&includeDoritos=true&content_infol=-1&blob=ABPQqLEDHWlfYOgpnWWj9gM0-efWQAPEE1MRW1BjoYrsjAkx6u2bRwqqXtVj_Q2e0HBwQszALwXiOvD1f3QB1rJBRuCaBIUTpsZJJRIhibB07lGa15qYb7z1bDMuP85gJg1qs2o9GtmOZd0618LdHrTn-n4JAJ1Kt2HuAox6HxMJscZZmwCvzvjTqW33Xfa5lEUBjlEegDNxAFFNMgEyF1VfOViUG_rlgi7B9W2iCnTZPtbnwA5kZZ1dP4L6fw&et=10&tcar=15&jsv=4-production-20170509_RC00&urll=2452 HTTP/1.1
User-Agent: Mozilla/5.0 (Linux; Android 5.1.1; Nexus 4 Build/LMY48T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/58.0.3029.83 Mobile Safari/537.36 (Mobile; afma-sdk-a-v10298236.10240000.2)
x-afma-drt-cookie: DSID=ADyxukuGj2f93vwAukzvxQXNSqll6djXCCQzUXrHH49ui6x0bocHY2cL_65hevwVfjTdiaVIjuORqZ1wxHsNnCWQ6uhCw24A4-PSUpKKGVARe9zq971sd58
Connection: Keep-Alive
Accept-Encoding: gzip


response:
----------
HTTP/1.1 403 Forbidden
P3P: policyref="https://googleads.g.doubleclick.net/pagead/gcn_p3p_.xml", CP="CURa ADMa DEVa TAIo PSAo PSDo OUR IND UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"
Timing-Allow-Origin: *
X-Afma-Use-Https: true
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Date: Tue, 09 May 2017 22:00:59 GMT
Server: cafe
Content-Length: 0
X-XSS-Protection: 1; mode=block
Alt-Svc: quic="googleads.g.doubleclick.net:443"; ma=2592000; v="37,36,35",quic=":443"; ma=2592000; v="37,36,35"
Connection: Keep-alive

Deepika Uragayala- MobileAds SDK team

unread,
May 10, 2017, 10:32:34 AM5/10/17
to Google Mobile Ads SDK Developers
Hi Marty,

Can you check if changing the Bundle ID works? It sounds like a serving issue with your App and if changing your Bundle ID works, then I would suggest that you contact our AdMob Product Support Team.

Regards,
Deepika Uragayala
Mobile Ads SDK Team


Martin Rehder

unread,
May 10, 2017, 11:18:15 AM5/10/17
to google-adm...@googlegroups.com

What is the Bundle ID?   This is an Android app and the guide mentions nothing about a bundle id.

That sounds like an iOS app

Martin

-- --- You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/S-ZPamwv-ec/unsubscribe. To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com. To post to this group, send email to google-adm...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Deepika Uragayala- MobileAds SDK team

unread,
May 10, 2017, 2:32:31 PM5/10/17
to Google Mobile Ads SDK Developers
Hi Marty,

Bundle ID or a Package name are both the same. You can go through this StackOverflow page to know more about BundleID.

Let me know if you still continue to have issues.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

-- --- You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/S-ZPamwv-ec/unsubscribe. To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com. To post to this group, send email to google-admob-ads-sdk@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Marty Rehder

unread,
May 10, 2017, 2:38:02 PM5/10/17
to google-adm...@googlegroups.com
I cannot just change the package - that is my app. It's published. Changing it means all my users will never see an update. 

Surely there is a better solution than changing the package.

Marty 

-- --- You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/S-ZPamwv-ec/unsubscribe. To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com. To post to this group, send email to google-admob-ads-sdk@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Deepika Uragayala- MobileAds SDK team

unread,
May 10, 2017, 3:58:36 PM5/10/17
to Google Mobile Ads SDK Developers
Hi Marty,

I only meant for you to check if changing it works for you. In which case, you would have to contact our AdMob Product Support team to get this resolved. Make sure to send your Bundle ID and all of your affected Ad Unit IDs and they would have a look.

Regards,
Deepika Urgayala
Mobile Ads SDK Team


On Wednesday, May 10, 2017 at 2:38:02 PM UTC-4, Marty Rehder wrote:
I cannot just change the package - that is my app. It's published. Changing it means all my users will never see an update. 

Surely there is a better solution than changing the package.

Marty 
-- --- You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/S-ZPamwv-ec/unsubscribe. To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com. To post to this group, send email to google-admob-ads-sdk@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Martin Rehder

unread,
May 10, 2017, 4:02:55 PM5/10/17
to google-adm...@googlegroups.com

Unless I'm missing something, the sample app does exactly that. It has a different package name but my ad IDs.

I guess it's up to the support team, now.

Thanks for your help.

Marty

-- --- You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/S-ZPamwv-ec/unsubscribe. To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com. To post to this group, send email to google-adm...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Deepika Uragayala- MobileAds SDK team

unread,
May 10, 2017, 4:50:27 PM5/10/17
to Google Mobile Ads SDK Developers
Hi Marty,

This is only a support forum for Mobile Ads SDK implementation related queries and the product support is a separate team that would handle all account related queries and you would have to contact them via this form to get this issue resolved.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

Reply all
Reply to author
Forward
0 new messages