Search Unity

Issue running test ad on Android. Works fine in editor.

Discussion in 'Unity Ads & User Acquisition' started by TheLogician, May 27, 2020.

  1. TheLogician

    TheLogician

    Joined:
    Oct 1, 2012
    Posts:
    3
    I'm having an issue with ads and I'm testing on the AdvertisingDemo scene from EasyMobile. (I'm testing on this scene for easier debugging, but I have the same issue in my scense. I just figure demo code must be correct.) I'm in test mode, using only rewarded UnityAds. I configured everything as far as I can tell. I get the placeholder ad fine in the editor, but when I'm running on an Android device, IsRewardedAdReady never turns to true. In my Android logs I get this error at initialization:
    com.unity3d.services.ads.configuration.AdsModuleConfiguration$1.run() (line:60) :: Couldn't get address. Host: config.unityads.unity3d.com: Unable to resolve host "config.unityads.unity3d.com": No address associated with hostname: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)

    Am I missing something?

    I also tried with test mode on or off, and with "Enable built-in Ads extension" on or off.
    I also updated Unity to make sure it wasn't a fluke with the version.
     
    Last edited: May 28, 2020
  2. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    That's an odd error indeed. It implies that your connection isn't able to reach the unity3d.com domain at all. I've just checked here and I can access config.unityads.unity3d.com, so it's difficult to say exactly what your problem might be - but my guess is there may be a firewall or some other element of your connection that is blocking our domain.
     
  3. TheLogician

    TheLogician

    Joined:
    Oct 1, 2012
    Posts:
    3
    Oh my god, of course. I have an ad-blocker in my phone browser and it didn't occur to me that it was active on other apps (other games don't seem to have a problem getting ads through). That fixed my issue, thank you!
     
  4. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    hi,i have no add blocker in my phone then why this same error is occurring to me ?
     
  5. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    please help me
     
  6. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    Can you post the full device log you're getting?
     
    mathogenius likes this.
  7. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    Here it is (I have just hidden game ID).
    Also I am in test mode(Test mode on) also in the code the argument is true.
    I am using Unity 2019.4.10f1 (64-bit) ( I have seen some people fixed this issue by updating)
    Thank you for your help
     

    Attached Files:

    • log1.txt
      File size:
      19.3 KB
      Views:
      307
  8. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    Hi @mathogenius, thanks, that was really helpful. It does look like you're seeing the same issue where the config server is being blocked by your internet connection.

    Unfortunately, I don't think there's anything we can do to help here, as it looks like your internet provider is blocking our servers. Which country are you located in?
     
    mathogenius likes this.
  9. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    I am located in India ( I just wanted to tell you , I have published this game on playstore and it have gotten some impressions(like if there are 15 requests , they show two or 3 impressions) .But I never saw any adds myself or my friends . I want to confirm that the adds are working or not ?. (the maximum impressions are in US) also there were 2 impressions in India so I guess indian servers do not block your adds (Because I have played games of unity before and adds work fine there).
    Edit- Also if Ads work fine in editor ,then why they do not work the same in android because the internet connection is same.
     
  10. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    We're aware of an ongoing issue with some users of certain internet providers in India being unable to access our servers. We're currently working to help them resolve this, but unfortunately I don't have an estimate as to when this might be fixed. We're sorry for the inconvenience.

    Regarding the editor, a lot of the ads functionality there is simply a placeholder, and works slightly differently to a real device. You should always test on a real device to see valid results.
     
  11. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    Yeah , That's why I am testing it because first I thought the ads will only work when the game is in play store but then I realized this issue. Is there anything else in my side I can do?. If not please forward my issue since I have a good decent channel on youtube and the game is getting a lots of downloads from there and its losing me money of adds not working. So please help and thank you for your replies
     
  12. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    Unfortunately there's nothing you can do from your end except use a different internet connection if possible. Again, we're sorry about the inconvenience. I assure you we're trying to resolve this as quickly as possible.
     
    mathogenius likes this.
  13. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    ohk Then ,It means There is no mistake in code or something,I will keep seeing the logs and other stuff
    So Thank you very much for your help you have resolved the headache of Me doing something wrong! .
    Thank you by Heart.
     
  14. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    @kr-unity Can you please confirm by seeing this image that the ads are working in other countries? (that this is just a problem of region)
     

    Attached Files:

  15. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    @kr-unity hi I used a different service provider and now that error is not coming , But still there are no adds , But it is now able to resolve that host. Please check it now what is the error ?,I searched the string unityads to make it easier for you to look.
    I think it is -Couldn't send storage event to WebApp.
     

    Attached Files:

  16. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    hi , please reply.
     
  17. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    Hi @mathogenius, yes I can confirm that Unity Ads should be working with no problems in other countries. India is the only one we currently have an ongoing issue in. The fact you are seeing requests and impressions on your dashboard shows that your app is working in those countries.

    Your log2.txt file doesn't appear to show any major errors. Despite the storage message, it looks like the SDK is able to finish initializing.
     
  18. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    Hi,Thanks for replying !
    Okay so in log2.txt (I have seen logs of other people) the add should come (the code for what type off add appears) after this line
    "$InitializeStateConfig.execute() (line:1) :: Unity Ads init: load configuration from https://config.unityads.unity3d.com/webview/3.4.8/release/config.json"
    ,but in my case this above line is repeating over and over again(The maximum time I waited was half an hour) so what could be the issue now ?
     
  19. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    Hi, I have got another information for you, It might help.I stumbled upon a game developer youtuber Named "DANI", He had made couple of successful games in unity and I tried to watch an add in His game and the error is the same.
     
  20. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    If you're seeing the config line repeat over and over, that indicates it's timing out instead of outright failing. At any rate, it looks like the issue is still that your internet provider is unable to load from that URL, which is unfortunate as it is required for the Ads SDK to function.
     
    mathogenius likes this.
  21. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    ok,Yeah I have also confirmed that ads are working smoothly in other countries. (its just region) ( I am exactly located at Himachal pradesh india. So I will simply wait for this problem to fix. Thanks for your assistance.
     
  22. mbhagat

    mbhagat

    Joined:
    Dec 15, 2013
    Posts:
    49
    Spent two days to try everything and finally reached here !
    Still not solved.
    Confirming on 29th October issue still persist.
    020-10-29 11:50:51.320 13356 31049 Error UnityAds com.unity3d.services.ads.configuration.AdsModuleConfiguration$1.run() (line:60) :: Couldn't get address. Host: config.unityads.unity3d.com: Unable to resolve host "config.unityads.unity3d.com": No address associated with hostname: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
     
  23. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    Yeah,the ads will work in other countries not in India,You know if you use airtel then the above error doesnot come but still servers are unreachable.
     
  24. mbhagat

    mbhagat

    Joined:
    Dec 15, 2013
    Posts:
    49
    Unity should solve it fast many developers are loosing revenue !
     
    Last edited: Oct 31, 2020
  25. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    yes I also lost around 20 dollars.
     
  26. amitvikram

    amitvikram

    Joined:
    Dec 20, 2018
    Posts:
    1
    Facing the same issue. Unity please solve it fast. Your ads are broken, your analytics is broken. And why does it take so long to fix such issues? I believe you have a great tech team, who should be looking into such matters with utmost priority.
     
  27. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    I guess they are trying their best to fix it because india have a lot of developers! Also I am seeing some impressions in India in my analytics so I guess this issue is fixed in some regions of india but not every region.
     
  28. initfusion

    initfusion

    Joined:
    Oct 24, 2016
    Posts:
    4
    I am also facing the same issue in India.
     
  29. mbhagat

    mbhagat

    Joined:
    Dec 15, 2013
    Posts:
    49
    Looks like ads are displaying !
    Can othe developer confirm on the same ?
     
  30. mathogenius

    mathogenius

    Joined:
    Sep 22, 2020
    Posts:
    17
    Yes I also think so ,I am seeing impressions in India, Not in my region but I guess they are slowly fixing it!
     
  31. initfusion

    initfusion

    Joined:
    Oct 24, 2016
    Posts:
    4
    Still, Ads are not displaying.
     
  32. Babajan

    Babajan

    Joined:
    Jan 14, 2014
    Posts:
    1
    same here..
     
  33. initfusion

    initfusion

    Joined:
    Oct 24, 2016
    Posts:
    4
    We are now decided to switch to other ad platforms.