Problems with mediation initialization in build

I have created new project and followed instruction to setup mediation ads. I successfully created project in unity dashboard. I also enabled ads, and got both android and ios game IDs
7955287--1019164--upload_2022-3-10_20-45-34.png

In game editor, using mediation code generator, implemented interstitial ads. When testing in play mode everything works fine (test ad loads). But when trying to run it on android phone (trough build and run feature, with connected phone selected as run device), mediation initialization fails (rest of the game works fine). In android logcat console i get the following error

And, when trying to load ad in the same console i get following error:

I have the same issue - initialization error about game id not found. The id is correct so I’m not sure what I’ve missed and I’ve already gone through the integration documentation several times.
I’ve tested mediation SDK version 0.4.0-preview 1 and 2.

Hi adespawn and Mark_, thank you for bringing this to the team’s attention. After some investigation we identified and resolved the problem. We have verified that both of you should no longer be seeing these errors. Please try again and reach out if the problem persists.

I can confirm that mediation is initializing correctly and ads are showing without any changes. Thank you.

Hi! what should i do if i have the same problem? Can u help me?

Request to https://mediation-instantiation.prd.mz.internal.unity3d.com/v1/initialize failed due to java.io.IOException: Instantiation Service initialization request failed with http status code 404 and server response: game init not found for game id: 4xxxxxx

Thanks!

Hello @Andres_Murman ,

Could you confirm that the Game ID you are using in your code coincides with the Game ID you have in your dashboard (Monetization > Project Overview > Settings > Game IDs section) ?

Thanks for sharing this issue with us!

Yes, checked it, Android Game Id is 4753597

Hey @Andres_Murman ,

I tested your Android Game Id and I was able to successfully initialize. Here are a few things worth checking:

In your Unity Editor, check that your project is correctly configured to automatically fetch your Game Id, here’s a link to the troubleshooting guide.

You can also force a specific Game Id by using this interface, ideal for such troubleshooting scenarios.

Let us know if that works for you, thanks!

Thanks @DeclanMcPartlin , i’ve done all that already, but will try it again to make sure i didnt miss anything. I’ll let you know if I was able to make it work.

@DeclanMcPartlin , now its working. Its strange, I didnt change anything, just rebuild and redeploy to phone. Thanks for your help.

Hey @Andres_Murman ,

I’m glad to hear it is working for you now. Generally it should work right after creating the project, but sometimes it can take a few minutes.

Thanks again for sharing your issue, much appreciated.

Hello I just installed Unity mediation. After following all the steps and configuration settings I tried to test it on my Android device but the initialization is failing. Here is what I get as an error:

Initialization Failed: System.AggregateException: One or more errors occurred. —> Unity.Services.Core.ServicesInitializationException: Request to https://mediation-instantiation.prd.mz.internal.unity3d.com/v1/initialize failed due to java.net.ConnectException: Failed to connect to mediation-instantiation.prd.mz.internal.unity3d.com/0.0.0.0:443 —> Unity.Services.Mediation.InitializeFailedException: Request to https://mediation-instantiation.prd.mz.internal.unity3d.com/v1/initialize failed due to java.net.ConnectException: Failed to connect to mediation-instantiation.prd.mz.internal.unity3d.com/0.0.0.0:443

Hi

we got a lot of this errors:
Unable to resolve host “mediation-instantiation.unityads.unity3d.com”: No address associated with hostname at Ads.UnityMediationRewarded.OnRequestStart ()

Unity 2021.3.2
Mediation package: 0.5.1-preview.1

full error log:
Unity.Services.Mediation.LoadFailedException: Exception raised while retrieving the Ad Unit Configuration: com.unity3d.mediation.h0: Failed to fetch Ad Unit due to connectivity issues: Request to https://mediation-instantiation.unityads.unity3d.com/v1/waterfall failed due to java.net.UnknownHostException: Unable to resolve host “mediation-instantiation.unityads.unity3d.com”: No address associated with hostname at Ads.UnityMediationRewarded.OnRequestStart () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.Run (System.Threading.Tasks.Task ignored, System.Boolean canInlineContinuationTask) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.Task.TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.TaskCompletionSource1[TResult].TrySetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.TaskCompletionSource1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 at Unity.Services.Mediation.RewardedAd.OnLoadFailed (System.Object sender, Unity.Services.Mediation.LoadErrorEventArgs args) [0x00000] in <00000000000000000000000000000000>:0 at Unity.Services.Mediation.Platform.AndroidRewardedAdLoadListener+<>c__DisplayClass3_0.b__0 (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0

Today, I update my advertisement to unity advertisement with mediation, and I got this error:
I double-checked the game id and ad unit id, they both correct.
Can you help me

2022/10/31 21:36:05.467 9549 9581 Info Unity NetworkError:Exception raised while retrieving the Ad Unit Configuration: com.unity3d.mediation.j0: Failed to fetch Ad Unit due to connectivity issues: Request to https://mediation-instantiation.unityads.unity3d.com/v1/waterfall failed due to java.io.IOException: Instantiation Service configuration request failed with http status code 404 and server response: ad unit configuration not found for game id: 1xxxxxx, ad unit id: rewardedVideo

@toan-stt , feel free to send me the game id and ad unit id in a PM, although this might just come down to issues with the device’s internet connection.

Did you find any solution I am also getting sometime connectivity issue sometime get ad unit has incorrect format.
Some time it is working with one game id but not with other . I am really frustrate. Help me.

Hi, I am facing the same problem, can you please help me to test it? I don’t know where it goes wrong… Thank you!
Inner: System.AggregateException: One or more errors occurred. (Request to https://mediation-instantiation.unityads.unity3d.com/v1/initialize has failed with status code 404 and server response game init not found for game id: 5070506
) —> Unity.Services.Core.ServicesInitializationException: Request to https://mediation-instantiation.unityads.unity3d.com/v1/initialize has failed with status code 404 and server response game init not found for game id: 5070506
—> Unity.Services.Mediation.InitializeFailedException: Request to https://mediation-instantiation.unityads.unity3d.com/v1/initialize has failed with status code 404 and server response game init not found for game id: 5070506

I have the same error as the original post:
“java.io.IOException: Instantiation Service initialization request failed with http status code 404 and server response: game init not found for game id: 5XXXXX”

@DeclanMcPartlin Any help? Thanks!

I have the same error. I solved the problem by switching my project to Mediation in Unity console. But finding this button was very difficult, and I still don’t know how I did it. This screen looked like “About” but instead of “Service enabled” there was a button “Switch to Mediation”

Hi, I am new in unity and using unity mediation for the first time, I integrate the unity mediation with Meta Audience Network, everything going well my game showing ads, the ads impression counting properly on the unity dashboard, but the problem i am facing is that my Meta audiance network is not counting the impressions, only the ads requests is counting.
I am sharing some screenshots for better understanding.

I was contected to Meta Custommer support but they have no idea. they mailed me “Check your code to make sure onLoggingImpression() is called after the ad is displayed.”
I Dont have any idea what does it mean.
Please if anyone have any idea or faced the same issue before please help me.
And sorry for the bad english