Search Unity

Unique Error ? - KeyNotFoundException

Discussion in 'Android' started by Ebonicus, Mar 18, 2018.

  1. Ebonicus

    Ebonicus

    Joined:
    Oct 31, 2016
    Posts:
    158
    Hello,

    I don't have much experience reading logs, and need assistance with some build errors, please.

    I am building an Admob test app starting from a hello world, clean working build.
    Compiles fine.

    I install the GoogleAdmob asset package for unity.
    Play works fine, but build or build and run is failing.
    This build fails on both 5.4.5p5 and 2017.3 in either gradle or internal build modes.

    Gettings a tools error for the SDK, I have verified all Android studio installed packages are present, and all Androidmanifest.xml files match the targetminSDK of 16 and the targetSDK of 25.

    0x00007FFC79D88371 (mono) [object.c:2623] mono_runtime_invoke 
    0x000000014033DB75 (Unity) mono_runtime_invoke_profiled
    0x00000001409ED12D (Unity) BuildAssetBundleLocalPath
    0x00000001409ED1B7 (Unity) BuildAssetBundleLocalPath
    0x00000001409EFF18 (Unity) BuildReporting::BuildReport::GetAppendices<BuildReporting::PackedAssets>
    0x0000000140A048A7 (Unity) std::deque<std::map<int,BuildAsset,std::less<int>,std::allocator<std::pair<int const ,BuildAsset> > >,std::allocator<std::map<int,BuildAsset,std::less<int>,std::allocator<std::pair<int const ,BuildAsset> > > > >::push_back
    0x0000000140A05261 (Unity) BuildPlayer
    0x00000001413D6839 (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    0x0000000024CFC0A4 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,UnityEditor.BuildTarget,UnityEditor.BuildOptions,bool)
    0x0000000024CF6CEC (Mono JIT Code) [BuildPlayerWindow.cs:541] UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings (bool,UnityEditor.BuildOptions,bool)
    0x0000000024CF59BB (Mono JIT Code) [BuildPlayerWindow.cs:403] UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings (bool,UnityEditor.BuildOptions)
    0x0000000024CF585C (Mono JIT Code) [BuildPlayerWindow.cs:380] UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    0x0000000002CB0A7E (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    0x00007FFC79E35377 (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FFC79D88371 (mono) [object.c:2623] mono_runtime_invoke
    0x000000014033DB75 (Unity) mono_runtime_invoke_profiled
    0x00000001404CE5F1 (Unity) CallStaticMonoMethod
    0x00000001404CE897 (Unity) CallStaticMonoMethod
    0x0000000140E48952 (Unity) ExecuteStandardMenuItem
    0x0000000140E490BD (Unity) ExecuteMenuItemWithID
    0x0000000140E4CB42 (Unity) ProcessMainWindowMessages
    0x0000000140E3FE99 (Unity) ContainerWindow::ContainerWndProc
    0x00007FFCBF2CB85D (USER32) CallWindowProcW
    0x00007FFCBF2CB1EF (USER32) DispatchMessageW
    0x0000000140E4D609 (Unity) FindMonoBinaryToUse
    0x0000000140E4ECA1 (Unity) WinMain
    0x00000001415B7E50 (Unity) strnlen
    0x00007FFCBEA21FE4 (KERNEL32) BaseThreadInitThunk



    Getting a key not found exception, here is the stack:


    KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
    UnityEditor.Android.PostProcessor.PostProcessorContext.Get[String] (System.String key)
    UnityEditor.Android.PostProcessor.Tasks.PublishPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.Launch (BuildTarget target, System.String installPath)
    UnityEditor.Android.AndroidBuildPostprocessor.LaunchPlayer (BuildLaunchPlayerArgs args)
    UnityEditor.PostprocessBuildPlayer.Launch (BuildTarget target, System.String path, System.String productName, BuildOptions options) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:141)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()



    All I cant find online about keynotfound pertains to objects in scene not being present or accessible, this is referring to a system.string, and I have no idea how to fix a missing system.string in dictionay.cs. That path does not exist on my system, neither does dictionary.cs

    Can somebody please help with resolving this error?

    Thank you.

    Ebones.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Can't answer what is the problem, but that KeyNotFoundException is for sure a bug in Unity, could you report it?
     
  3. Ebonicus

    Ebonicus

    Joined:
    Oct 31, 2016
    Posts:
    158
    I reported a native crash on Google Play test devices to Unity a few months ago, sent my app files and never heard back ANYTHING, and they have my entire project.

    Not really wanting to do that again, as I also have no record of the email being sent, since it was done through the unity editor reporting tool.