hms-ads-demo-java icon indicating copy to clipboard operation
hms-ads-demo-java copied to clipboard

Ad failed with error code 0 - onAdFailed error code 499

Open sametguzeldev opened this issue 3 years ago • 13 comments

Hello.

I am testing your apk on EMUI 8 and Android version 8 tablet that has HMS Core 6.0.0.304. I am getting Ad failed with error code 0 - onAdFailed error code 499 for all ad types. It works for EMUI & Android 10 Version but doesn't work below that. When I check the official page it says EMUI 3.0 or later is enough. image

Here is the log: com.huawei.hms.ads.sdk-logcat.txt

Thanks in advance.

sametguzeldev avatar Jul 29 '21 07:07 sametguzeldev

It shows that your network failed in your log, requesting ads requires internet access. 20210729-162917(WeLinkPC)

Mike-mei avatar Jul 29 '21 08:07 Mike-mei

I do have a working connection. It did popped up two consent pop ups and I've accepted them. I can make a video recording if needed.

sametguzeldev avatar Jul 29 '21 13:07 sametguzeldev

Sure, please provide your video record.

Mike-mei avatar Jul 30 '21 01:07 Mike-mei

The video was more than 10MB so I could not upload that to here. Please watch it from here

I show my Wi-Fi settings and I browse through AppGallery at the start to prove that I have an active working internet connection. Then I open the application and you can see the results. I accept two consents but still ad error code 0.

sametguzeldev avatar Jul 30 '21 12:07 sametguzeldev

In order to locate your issue quickly, please run the following command to obtain full logs:

  1. adb logcat -v time >d:/hwads.txt
  2. Reproduce the problem scenario.
  3. Press Ctrl + C and copy the log to here

Mike-mei avatar Aug 03 '21 06:08 Mike-mei

Hello there. I will be sending it today!

sametguzeldev avatar Aug 05 '21 07:08 sametguzeldev

Here are the logs you've requested. hwads.txt

I've done the same steps as the video and only in the app. Tried to load banner and Interstitial Ads.

sametguzeldev avatar Aug 05 '21 12:08 sametguzeldev

It shows in your log: countryCode by ro.product.locale.region is:US, is your local area set to the US? The area should be set to other regions except for the US. Method for setting regions in your phone: settings-> system -> language and input -> language and region -> region

Mike-mei avatar Aug 06 '21 03:08 Mike-mei

Hello again.

I've gone into system > language and input > language. But I don't see anything related to changing the region. I can only change device language. My AppGallery region is set to Turkey. Screenshot_20210806-100427

I've also used adb shell getprop to see it and as you've said it says it is the US. image

But I don't know how to change it. I tried to change it with setprop but did not work.

sametguzeldev avatar Aug 06 '21 07:08 sametguzeldev

Click the language here then you can see the button to change region. image

Mike-mei avatar Aug 06 '21 08:08 Mike-mei

I've already checked that before sending it to you but only has an option to add a language. Currently UK is selected. Screenshot_20210806-115800

The three dot on the top right corner only offers to "Remove Preferred Language" fyi

sametguzeldev avatar Aug 06 '21 08:08 sametguzeldev

Any updates on this ? 😄

sametguzeldev avatar Aug 12 '21 13:08 sametguzeldev

Please insert a SIM card (except US) into your phone and try again.

Mike-mei avatar Aug 13 '21 02:08 Mike-mei