Receiving error: Invalid configuration request for gameId

Hi

I am following instructions to setting up ads in my game.
I have the game ids, I put them in the script.

Every time I run it, I get the following:
Init Failed: [INTERNAL_ERROR]: Invalid configuration request for gameId: 5716486

I have no idea what to do next, all the other threads were about missing game ids, but mine is in place, and has been there since yesterday.

Is there a waiting period or something?

Hello,
I tested on my test app (Android) with your Game ID: 5716486 and confirmed it successfully initialized and loaded ads.
Please ensure that the gameId doesn’t contain any blanks, and the target platform is correct.
If it persists, your code snippets would be helpful for further investigation.

Hi, thanks for replying.

I’m using the base code from the documentation

using UnityEngine;
using UnityEngine.Advertisements;
 
public class AdsInitializer : MonoBehaviour, IUnityAdsInitializationListener
{
    [SerializeField] string _androidGameId = "5716486";
    [SerializeField] string _iOSGameId;
    [SerializeField] bool _testMode = true;
    private string _gameId;
 
    void Awake()
    {
        InitializeAds();
    }
 
    public void InitializeAds()
    {
    #if UNITY_IOS
            _gameId = _iOSGameId;
    #elif UNITY_ANDROID
            _gameId = _androidGameId;
    #elif UNITY_EDITOR
            _gameId = _androidGameId; //Only for testing the functionality in the Editor
    #endif
        if (!Advertisement.isInitialized && Advertisement.isSupported)
        {
            Advertisement.Initialize(_gameId, _testMode, this);
        }
    }

 
    public void OnInitializationComplete()
    {
        Debug.Log("Unity Ads initialization complete.");
    }
 
    public void OnInitializationFailed(UnityAdsInitializationError error, string message)
    {
        Debug.Log($"Unity Ads Initialization Failed: {error.ToString()} - {message}");
    }
}

The engine version is 2022.3.32f1
The target platform is Android.
Min API level 34, Target is highest available.

EDIT:

I got it working by downgrading the advertisements legacy package to 4.4.2

Seems 4.12 is not compatible with 2022.3 (even though it doesn’t say anywhere)

Thanks for your report! I’m glad to hear that it’s working by downgrading the Advertising legacy package.
Unfortunately, we don’t have plans to upgrade the legacy package anymore. Therefore, I recommend considering using mediation tools (e.g. LevelPlay) in the future. Sorry for the inconvenience.