Unity ads invalid configuration request for gameid

Hi all,

I’m currently trying to integrate and test a simple banner ad on my app, and seem to be stuck with these errors appearing when initialising the ads:


  • Invalid configuration request for gameId: xxxxxxx
  • The remote server returned an error: (404) Not Found.

I have been following the basic tutorials for this setup, and have my placement and projects set up on the unity dashboard, as well as the following code within the unity environment itself:

private string _androidGameID = "xxxxxxx";
        private string _iOSGameID = "xxxxxxx";

        private string _gameID { get
            {
#if UNITY_IOS
                return _iOSGameID;
#else
                return _androidGameID;
#endif
            } }

        private string _bannerID = "bannerPlacement1";
        public bool TestMode = true;

        public void InitializeAds()
        {
            Advertisement.Initialize(_gameID, TestMode);
            StartCoroutine(ShowBannerWhenReady());
        }

        IEnumerator ShowBannerWhenReady()
        {
            while (!Advertisement.IsReady(_bannerID))
            {
                yield return new WaitForSeconds(0.5f);
            }
            //Advertisement.Banner.SetPosition(BannerPosition.TOP_CENTER);
            Advertisement.Banner.Show(_bannerID);
        }
    }

This being initialised in a Start method in my main game class as so:

private UnityAdHelpers _adHelper;

    void Start()
    {
        GameConstants.SetGame(this);
        _adHelper = GetComponent<UnityAdHelpers>();
        _adHelper.InitializeAds();
    }

I have the testing modes enabled on both the project settings int he dashboard and the ads area in the Editor.
After trying to find results for a long while online, I am at my whits end here, any advice?

The same problem. Were you able to fix it?

I’m getting the same error when implementing for the first time in an older game of mine. However I have it implemented the same way on another game and I get no error there. Perhaps there is a waiting period before the ID is valid?
I too would like an answer.

Also having this issue - I can confirm it happens with the latest version on both the asset store and the package manager, on a fresh project each time. Did you manage to solve it at all?

Seems like an issue on unity’s end - is there someone who can be notified regarding this?


Any help would be appreciated!

Hey guys I found a fairly simple solution to get this working until Unity fixes it.

Kudos to @jmurnanedev and all the other guys for the images and thoughts.

Essentially just roll back to version 3.4.1 in the package manager and the error goes away.

P.S. Yes I did spend far too much time making that image and yes it is horrifyingly ugly haha.

Hi everyone.

I was having the same issue. I tried everything, via the package manager and via the asset store, followed multiple implementations. Nothing worked. I left it alone to play some games.

And now it works, (keep in mind I first enabled unity ads about 12 hours ago) so it would seem @DaveG is right. There is a waiting period.

Hi all, apologies for leaving this a while before replying on it, busy with a lot of different projects at the moment!


It seems that it is just working again now, so the code I have posted above is functional as an example of how to implement the unity ads into your game, I’m not sure whether it was as @jamesthewelsh mentioned with the 12 hour wait before some kind of validation of account on Unity’s end or an error in their backend that has since been fixed as according to @jmurnanedev.


However what we can confirm is that the tutorial online and code displayed is correct and that the error was in the Unity backend.


If you still get this error, Unity have been made aware of it and have potentially already fixed it, however if not then try waiting approximately 12 hours before attempting to work with the ads again. (Which I understand can be especially frustrating if on a deadline, try working with Facebook T_T)

Hello,

I still get these errors (for over a week). I tried your solutions, but nothing worked for me. I was interested in what happens when my game is built. After I started it on my phone, ads appear immediately. I think this is the result of these errors. Are there any new solutions?
Thanks

please be sure to set the project to android and not Windows in the project settings!

Solution : Make sure you are login into unity account in unity project.

After turn on-off internet connection my unity project sign out from account.

I solve my issue by just sign in again/ make sure service is on.

I found this error only occurs in the Unity simulator if you actually launch it on a phone it doesn’t crash the game.

Hi I noticed the same issue.
Advertisement.Initialize(gameId, true)
return server error
but what is weird
Monetization.Initialize(gameId, true)
works well
I will wait 12 hours to check again

Try changing platform from Android/IOS to standalone then change back to Android/IOS

SOLVED: go to services → ads → configure → switch from “on” to “off” then again “on”