Search Unity

Question Unity Mediation causes an error

Discussion in 'Unity Mediation' started by TimAndi33, Nov 6, 2022.

  1. TimAndi33

    TimAndi33

    Joined:
    May 15, 2022
    Posts:
    3
    I tried to stitch to Unity mediation from the legacy ads because that didn't show any ads. But after switching to Advertisement with mediation this error is shown. Can you help please? I removed the scripts for the ads entirely.

    Stopped polling job due to exception: System.NullReferenceException: Object reference not set to an instance of an object
    at GooglePlayServices.UnityCompat.VersionFromAndroidSDKVersionsEnum (System.String enumName, System.String fallbackPrefKey, System.Int32 fallbackValue) [0x00001] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.UnityCompat.GetAndroidTargetSDKVersion () [0x00036] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.PlayServicesResolver.CanEnableJetifierOrPromptUser (System.String titlePrefix) [0x000b0] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.PlayServicesResolver.ResolveUnsafe (System.Action`1[T] resolutionComplete, System.Boolean forceResolution, System.Boolean isAutoResolveJob, System.Boolean closeWindowOnCompletion) [0x00014] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.PlayServicesResolver+<>c__DisplayClass102_0.<ScheduleResolve>b__1 () [0x0001f] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.PlayServicesResolver.ExecuteNextResolveJob () [0x00073] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.PlayServicesResolver.ScheduleResolve (System.Boolean forceResolution, System.Boolean closeWindowOnCompletion, System.Action`1[T] resolutionCompleteWithResult, System.Boolean isAutoResolveJob) [0x000ac] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.PlayServicesResolver.AutoResolve (System.Action resolutionComplete) [0x00018] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at GooglePlayServices.PlayServicesResolver+<>c.<ScheduleAutoResolve>b__78_1 () [0x00024] in <48abf529805a49c69e88ffb3f8b573e9>:0
    at Google.RunOnMainThread.ExecutePollingJobs () [0x00052] in <ac8e755fbc27434ebdaf117e2c7041d9>:0
    0x00007ff61d3df07d (Unity) StackWalker::GetCurrentCallstack
    0x00007ff61d3e5d59 (Unity) StackWalker::ShowCallstack
    0x00007ff61e3555f3 (Unity) GetStacktrace
    0x00007ff61e9ecbfd (Unity) DebugStringToFile
    0x00007ff61c55f482 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000025eedce3e23 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    0x0000025eedce3d3b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000025eedce3a80 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x0000025eedce3945 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    0x0000025dfe59810b (Mono JIT Code) Google.RunOnMainThread:ExecutePollingJobs ()
    0x0000025dfe5977eb (Mono JIT Code) Google.RunOnMainThread/<>c:<ExecuteAll>b__24_0 ()
    0x0000025dfe597716 (Mono JIT Code) Google.RunOnMainThread:RunAction (System.Action)
    0x0000025dfe597653 (Mono JIT Code) Google.RunOnMainThread:ExecuteAll ()
    0x0000025eedc7a170 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    0x0000025f15871cb5 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    0x00007ff9b6cffe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    0x00007ff9b6c3e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    0x00007ff9b6c3e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    0x00007ff61d303354 (Unity) scripting_method_invoke
    0x00007ff61d2e2be4 (Unity) ScriptingInvocation::Invoke
    0x00007ff61d2dd7f5 (Unity) ScriptingInvocation::Invoke<void>
    0x00007ff61d43448b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
    0x00007ff61dd5daf2 (Unity) SceneTracker::Update
    0x00007ff61df0d84a (Unity) Application::TickTimer
    0x00007ff61e35b78a (Unity) MainMessageLoop
    0x00007ff61e36003b (Unity) WinMain
    0x00007ff61f6e64ae (Unity) __scrt_common_main_seh
    0x00007ffa27f67034 (KERNEL32) BaseThreadInitThunk
    0x00007ffa294426a1 (ntdll) RtlUserThreadStart
     
    QWmobROR likes this.
  2. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    146
    Hi @TimAndi33, which version of the Unity Editor are you using? Are you using EDM4U (External Dependency Manager for Unity, also known as PSR or Jar Resolver), if so, which version?
     
  3. TimAndi33

    TimAndi33

    Joined:
    May 15, 2022
    Posts:
    3
    Hi @DeclanMcPartlin, I started having the issue with 2021.3.8f1. I updated to 2021.3.12f1 then to 2021.3.13f1 but the problem stayed. I tried a lot of things. Deleted the mobile dependency manager which came with unity's advertisements with mediation and installed external dependency manager. After forcing resolve the error simply changed to "failed". I did this with the help of a programmer and he said it can't find JAVA_HOME but we tried to resolve that too and the error persists.

    I'm thinking of copying everything that I put into the project into a new empty project because maybe I deleted something along the way that I shouldn't have.