googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.37k stars 1.08k forks source link

No ads showing using IL2CPP Android - untiy 2019 #995

Closed SpiceyM closed 5 years ago

SpiceyM commented 5 years ago

I had hoped this latest version would allow ads to work with 64bit Android using IL2cpp to build. Unfortunately not.

Is there going to be a fix for this? Seems like this should be a high priority.

I have tried this suggestion https://github.com/googleads/googleads-mobile-unity/issues/923

No luck, just no ads, nothing,.

Anyone?

stowy commented 5 years ago

Which version of Unity are you using specifically? We' seeing unexpected behaviors on version 2019.2 onwards.

SpiceyM commented 5 years ago

2019.2.0f1

can you confirm a version it is stable with for Android using IL2CPP? if so I'll use that unity version

stowy commented 5 years ago

2019.1.11f1 is the version I've found to be working correctly in my testing to date. Please try this and let me know if you have any issues.

On Mon, Aug 12, 2019 at 1:29 PM SpiceyM notifications@github.com wrote:

2019.2.0f1

can you confirm a version it is stable with for Android using IL2CPP? if so I'll use that unity version

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-mobile-unity/issues/995?email_source=notifications&email_token=ABNGOFFLRHH77677FI5SZ6DQEHB3ZA5CNFSM4ILEHI3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4DXLLQ#issuecomment-520582574, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNGOFFX33DMDSAA5E6U743QEHB3ZANCNFSM4ILEHI3A .

SpiceyM commented 5 years ago

Just tried 2019.1.14 without success. Will try 2019.1.11f1 tomorrow. Using OSX by the way, not sure if that makes a difference.

stowy commented 5 years ago

Ok. I'm using Mac OSX also.

On Mon, Aug 12, 2019 at 2:39 PM SpiceyM notifications@github.com wrote:

Just tried 2019.1.14 without success. Will try 2019.1.11f1 tomorrow. Using OSX by the way, not sure if that makes a difference.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-mobile-unity/issues/995?email_source=notifications&email_token=ABNGOFH3OOXX5MP3OGYHURLQEHKA7A5CNFSM4ILEHI3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4D5BJQ#issuecomment-520605862, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNGOFHHZ3ZMFA5YOSK2OF3QEHKA7ANCNFSM4ILEHI3A .

NilokiloxD commented 5 years ago

Any fix or workaround coming soon for 2019.2?

SpiceyM commented 5 years ago

@stowy Hi, just tried with Unity version 2019.1.11f1 still nothing. Would you be able to send or upload a blank project with just the admob and services add that i can try and that you know works? At a loose end here, Thanks

stowy commented 5 years ago

@SpiceyM Here's the Assets folder of a project I just built (plugin version 3.18.3) using export to Android studio 3.4.0 project using Unity 2019.1.11f1, building with IL2CPP. I used a development build, and the sample AdMob App ID - "ca-app-pub-3940256099942544~3347511713".

Assets.zip

Ads loaded and showed successfully on my Pixel 3 using Android 9

stowy commented 5 years ago

I also just tested building directly to device, non-development build and it also worked as expected.

NilokiloxD commented 5 years ago

Tried the provided Project @stowy in 2019.2, when requesting a rewarded ad this stacktrace is visible containing the relevant error message probably, something with malformed url so the caching fails:

08-16 12:44:47.153 16492 16492 I Ads : Use AdRequest.Builder.addTestDevice("2D5AE57EB92E225880BAD73F0A4668F5") to get test ads on this device. 08-16 12:44:47.371 16492 17106 I Ads : SDK version: afma-sdk-a-v15301000.15301000.0 08-16 12:44:47.373 16492 17106 I Ads : GMA Debug BEGIN 08-16 12:44:47.373 16492 17106 I Ads : GMA Debug CONTENT {"timestamp":1565952287372,"event":"onNetworkRequest","components":["network_request_89d197c3-6966-4cb5-b6ea-bc058030b8ac"],"params":{"firstline":{"uri":"https://googleads.g.doubleclick.net/mads/gma?submodel=SM-J510FN&android_app_volume=1&disable_ml=false&format=interstitial_mb&omid_v=a.1.2.11-google_20190206&is_nonagon=true&android_app_muted=false&am=0&dv=20405&gl=GB&hl=en&js=afma-sdk-a-v15301000.15301000.0&kw=game&lv=20800&ms=CoACvhFOD9zRp4rcO_c3FmAeJTWbURmiiaaORWTXOUEb3YIAQVdatA_th2l3wKR2LCBAGU_nsJDKgeLpK9LxiWwTynFu2mDxNerGR2P3wKZnLw9sSJRh3JUCOjiZ_-ZcUu-__pH68pkUn4oUFhhfB2RtfqL1jLaL3zWO_Yu1zOT5aSui1ENOR6w3B7paSfKQ2cdI7i07hfFWJBLTCISyiKI7z-f5VEaDTOCM1HQfkw6PHEumdFbJFU7mlto1Q28nEJ5kIniCl3oYMV7v-9wmj3vgg812PHFR2g-lEgu63UkgV2ZgeHJqYylMIOPCN3Z_pEr_AIzcdkTgmmu74Dpo6CVN1wqAAibetCl5kHfOycSa248mZHQE8OUzdq5RJerHEnOB8KmrXedQEFiLWMQHKPCcGVLGigyjBBSbnYuMnDoOzF-mlDeAllY0VdWy4l7rXz-07t1SIZ4eTtiyGRAvAVtun6UuL31KqXqDlC3TQPPvbrzrGSta2P8itN-LdNal9SfHdSJZChaIOTyrXsLjPq6NKrAY-TVL854RT2LPz8ZprKXwjL2Y8XU81FceDXfxLpepBWyHhSgJfUjEEPqhH1fGV6iucWbp34JFqFaMVrq4x0ZtlJH145e8X9tvAD6qJeuQJc9hvqqCNHXMFxwW9OrzV7qpw5zDI6iIsnoAtmC02T5xRgcSEI_-74FcidPuZNw3056CaVw&mv=81612300.com.android.vending&rm=0&sp=false&coh=true&riv=0&u_sd=2&render_in_browser=false&target_api=28&carrier=26202&is_sidewinder=false&session_id=15002797685733934230&request_agent=unity-3.18.3&seq_num=5&eid=318482080%2C318484497%2C318486317%2C318481075%2C318482761%2C318484676%2C318483611%2C318485889%2C318486372&tag_for_child_directed_treatment=0&_c_csdk_npa_o=false&guci=0.0.0.0.0.0.0.0&rbv=1&u_w=360&u_h=640&msid=com.DefaultCompany.Admob&app_name=1.android.com.DefaultCompany.Admob&_package_name=com.DefaultCompany.Admob&an=1.android.com.DefaultCompany.Admob&net=wi&u_audio=3&u_so=p&preqs_in_session=4&support_transparent_background=true&preqs=4&time_in_session=292890&dload=-781064870&pcc=0&ismediation=false&output=html&region=mobile_app&u_tz=120&client_sdk=1&ex=1&client=ca-app-pub-3940256099942544&slotname=5224354917&adtest=on&kw_type=broad&gsb=wi&lite=false&num_ads=1&vpt=8&vfmt=18&vst=0&sdkv=o.15301000.15301000.0&sdmax=0&dmax=1&sdki=3c4d&caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_exo3_th_autoplay_mediation_scroll_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_saiMacro_xSeconds&bisch=true&blev=0.9&swdr=false&cans=5&canm=false&ibctc=true&_mv=81612300.com.android.vending&heap_free=6411760&heap_max=134217728&heap_total=18422592&wv_count=6&rdps=2200&blockAutoClicks=true&color_bg=9B30FF&is_unity=1&rewarded_version=1&includeDoritos=true&rdidl=36&idtypel=4&is_latl=-1&blob=ABPQqLEg0hd81B5x-NRBNTI4y6uLUyuzzn_VYNOQp9c_FVFinayJ6KQJIO5W8VcGdV2z-_Pa1sP6HlTnprloak7QVEV3RJLavBD1LfTmz9sle1-CkE6bend4Mvo4FlSEajL0dVu-gw04dl44F4fvrZpVG12_TbqtKMius7Axf57BpQ1lgwDLGlbaK76h-Q8Y35Jk31BOf7bio1Kz-L9OqEQqFfwyBSSm3HgkK5M5X_83XROVw0_hdnaZMaKdCwch10btRegYbjgb9DAWMh3MIXqvYSIz9bdWQQ8ksOdQ1YeOrSvssBqS2iBlPhb2ZCePTngPTIG8tvRGnGAgeBQ&et=34&tcar=43&jsv=sdk_20190107_RC02-production-sdk_20190813_RC00&urll=2850#caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_exo3_th_autoplay_mediation_scroll_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_saiMacro_xSeconds&eid=318482080%252C318484497%252C318486317%252C318481075%252C318482761%252C318484676%252C318483611%252C318485889%252C318486372&format=interstitial_mb&heap_free=6411760&heap_max=134217728&heap_total=18422592&js=afma-sdk-a-v15301000.15301000.0&msid=com.DefaultCompany.Admob&preqs=4&seq_num=5&target_api=28","verb":"GET"},"headers":[{"name":"User-Agent","value":"Mozilla/5.0 (Linux; Android 7.1.1; SM-J510FN Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 (Mobile; afma-sdk-a-v15301000.15301000.0)"},{"name":"Cookie","value":"IDE=AHWqTUkMUnVBArddHiFDFinshY8SyYFGIDG8BriPXEP8R7BizpAHgDyS9SwSnkmP"}]}} 08-16 12:44:47.373 16492 17106 I Ads : GMA Debug FINISH 08-16 12:44:47.641 16492 17106 I Ads : GMA Debug BEGIN 08-16 12:44:47.641 16492 17106 I Ads : GMA Debug CONTENT {"timestamp":1565952287640,"event":"onNetworkResponse","components":["network_request_89d197c3-6966-4cb5-b6ea-bc058030b8ac"],"params":{"firstline":{"code":200},"headers":[{"name":null,"value":"HTTP/1.1 200 OK"},{"name":"Cache-Control","value":"private, no-cache, no-store"},{"name":"X-Afma-Use-Https","value":"false"},{"name":"X-Afma-Content-Vertical-Opted-Out","value":"true"},{"name":"Content-Disposition","value":"attachment; filename=\"f.txt\""},{"name":"X-Android-Selected-Protocol","value":"http/1.1"},{"name":"Timing-Allow-Origin","value":""},{"name":"X-Android-Response-Source","value":"NETWORK 200"},{"name":"X-Android-Sent-Millis","value":"1565952287382"},{"name":"Content-Type","value":"application/json; charset=UTF-8"},{"name":"P3P","value":"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\""},{"name":"X-Afma-Content-Url-Opted-Out","value":"true"},{"name":"Date","value":"Fri, 16 Aug 2019 10:44:43 GMT"},{"name":"Alt-Svc","value":"quic=\"googleads.g.doubleclick.net:443\"; ma=2592000; v=\"46,43,39\",quic=\":443\"; ma=2592000; v=\"46,43,39\""},{"name":"X-Content-Type-Options","value":"nosniff"},{"name":"X-Afma-Gws-Query-Id","value":"GolWXdH5MMnwgAeViS4"},{"name":"Server","value":"cafe"},{"name":"Transfer-Encoding","value":"chunked"},{"name":"X-Afma-Auto-Collect-Location","value":"true"},{"name":"X-XSS-Protection","value":"0"},{"name":"X-Android-Received-Millis","value":"1565952287638"},{"name":"X-Afma-Mediation","value":"true"}]}} 08-16 12:44:47.641 16492 17106 I Ads : GMA Debug FINISH 08-16 12:44:47.687 16492 17106 I Ads : GMA Debug BEGIN 08-16 12:44:47.687 16492 17106 I Ads : GMA Debug CONTENT {"timestamp":1565952287677,"event":"onNetworkResponseBody","components":["network_request_89d197c3-6966-4cb5-b6ea-bc058030b8ac"],"params":{"bodydigest":"509C9CE8236DC863317885E62FD29BE9","bodylength":51110}} 08-16 12:44:47.687 16492 17106 I Ads : GMA Debug FINISH 08-16 12:44:48.040 16492 17120 I Ads : GMA Debug BEGIN 08-16 12:44:48.040 16492 17120 I Ads : GMA Debug CONTENT {"timestamp":1565952288039,"event":"onNetworkRequest","components":["network_request_6265f031-2dd0-4908-9b91-b3a681dbff3e"],"params":{"firstline":{"uri":"https://pagead2.googlesyndication.com/pagead/gen_204?is_aia=false&id=gmob-apps-report-exception&os=7.1.1&api=25&device=samsung%20SM-J510FN&js=afma-sdk-a-v15301000.15301000.0&appid=com.DefaultCompany.Admob&exceptiontype=java.net.MalformedURLException&stacktrace=java.net.MalformedURLException%3A%20unknown%20protocol%3A%20data%0A%09at%20java.net.URL.%3Cinit%3E(URL.java%3A596)%0A%09at%20java.net.URL.%3Cinit%3E(URL.java%3A486)%0A%09at%20java.net.URL.%3Cinit%3E(URL.java%3A435)%0A%09at%20com.google.android.gms.internal.ads.zzbbf.zze(com.google.android.gms%3Aplay-services-ads%40%4018.1.1%3A327)%0A%09at%20com.google.android.gms.internal.ads.zzbbf.zzd(com.google.android.gms%3Aplay-services-ads%40%4018.1.1%3A317)%0A%09at%20com.google.android.gms.internal.ads.zzbce.zza(com.google.android.gms%3Aplay-services-ads%40%4018.1.1%3A13)%0A%09at%20com.google.android.gms.internal.ads.zzbch.shouldInterceptRequest(com.google.android.gms%3Aplay-services-ads%40%4018.1.1%3A5)%0A%09at%20sV.b(PG%3A151)%0A%09at%20aGV.a(PG%3A9)%0A%09at%20org.chromium.android_webview.AwContentsBackgroundThreadClient.shouldInterceptRequestFromNative(PG%3A2)%0A&eids=%2C318482080%2C318484497%2C318486317%2C318481075%2C318482761%2C318484676%2C318483611%2C318485889%2C318486372&exceptionkey=AdWebViewClient.interceptRequest&cl=258870853&rc=dev&session_id=15002797685733934230&sampling_rate=1&pb_tm=1.0","verb":"GET"},"headers":[]}} 08-16 12:44:48.040 16492 17120 I Ads : GMA Debug FINISH 08-16 12:44:48.083 16492 17120 I Ads : GMA Debug BEGIN 08-16 12:44:48.083 16492 17120 I Ads : GMA Debug CONTENT {"timestamp":1565952288082,"event":"onNetworkResponse","components":["network_request_6265f031-2dd0-4908-9b91-b3a681dbff3e"],"params":{"firstline":{"code":204},"headers":[{"name":null,"value":"HTTP/1.1 204 No Content"},{"name":"Cache-Control","value":"no-cache, must-revalidate"},{"name":"Pragma","value":"no-cache"},{"name":"Expires","value":"Fri, 01 Jan 1990 00:00:00 GMT"},{"name":"X-Android-Selected-Protocol","value":"http/1.1"},{"name":"Timing-Allow-Origin","value":""},{"name":"X-Android-Response-Source","value":"NETWORK 204"},{"name":"X-Android-Sent-Millis","value":"1565952288047"},{"name":"Content-Type","value":"image/gif"},{"name":"P3P","value":"policyref=\"https://www.googleadservices.com/pagead/p3p.xml\", CP=\"NOI DEV PSA PSD IVA IVD OTP OUR OTR IND OTC\""},{"name":"Date","value":"Fri, 16 Aug 2019 10:44:43 GMT"},{"name":"Alt-Svc","value":"quic=\"googleads.g.doubleclick.net:443\"; ma=2592000; v=\"46,43,39\",quic=\":443\"; ma=2592000; v=\"46,43,39\""},{"name":"X-Content-Type-Options","value":"nosniff"},{"name":"Server","value":"cafe"},{"name":"Content-Length","value":"0"},{"name":"X-XSS-Protection","value":"0"},{"name":"X-Android-Received-Millis","value":"1565952288081"}]}} 08-16 12:44:48.083 16492 17120 I Ads : GMA Debug FINISH 08-16 12:45:47.925 16492 16492 I Ads : Ad failed to load : 0 <

stowy commented 5 years ago

@NilokiloxD when i tried that ad request in my app it succeeded. What error are you seeing specifically?

NilokiloxD commented 5 years ago

What do you mean with what error? I postet the complete log including the error with the malformed URL leading to ad failed to load : 0. I tried it also with my own id's and mediation with unity ads still no success. It always shows error ad request already sent or something similar and then Unity ads mediator internal error. Did you try using Unity 2019.2 and custom gradle file (patched by play services resolver) together with unity ads mediation?

SpiceyM commented 5 years ago

@stowy Thank for your uploading this, I will try it out later today and let you know. I was building directly from unity and not exporting, maybe this is part of the reason. Will post results later on

SpiceyM commented 5 years ago

@stowy tested on 2019.11.1f just did a build & run directly from unity. Project worked fine and all ads shown using test ads. Nothing happens when using my admob codes. Maybe I’ll set up a new app id and try it. Any ideas? Thanks

SpiceyM commented 5 years ago

@stowy so it’s been a while since I last did this so thing maybe changed and I didn’t realise. The situation seems to be this..

Build and run from unity to an android device (not test ads) - no ads display

However publish to google play and download, ads display correctly.

When I use to do this before you didn’t need to publish the app to see you ads. So is this now the case?

I’m just about to test a new upload. I’ll let you know if it’s working. If so can probably close this issue.

SpiceyM commented 5 years ago

Yep that was totally what it was. Feel like a fool.

@stowy I appreciate all your help on this. I think this can be closed.

Thanks