Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Jeroen Oostwouder 96 posts 292 karma points
    Jan 31, 2018 @ 09:27
    Jeroen Oostwouder

    KeyNotFoundException in PublishedCache?

    I seem to have a problem when getting data from a TerraType field.

    But the weirdest thing is, it doesn't happen every time. At this point I've been able to recreate the issue by altering the web.config and pressing ctrl-f5 in Chrome.

    Most of the time, when I do the following:


    I get a Terratype object with the correct values.

    But when (I guess) starting fresh, it crashes there.

    'content.GetPropertyValue<Terratype.Models.Model>("fldGeoLocation")' threw an exception of type 'System.Collections.Generic.KeyNotFoundException'   object {System.Collections.Generic.KeyNotFoundException}

    When I put the following in my Watch-window:


    I can get an object, but I can't get the value.

    enter image description here

    Is there anybody with the same problem? Or a solution?

  • Osman Coskun 157 posts 360 karma points
    Jan 31, 2018 @ 13:12
    Osman Coskun


    I have the same problem. The package causing a stability problem after upgrading to 1.0.16.

  • Jeroen Oostwouder 96 posts 292 karma points
    Jan 31, 2018 @ 13:32
    Jeroen Oostwouder

    Yep, totaly forgot to mention, but I have 1.0.16 too.

    Also, no icon in the installed package-list in the backend ;)

  • Dan Diplo 1554 posts 6204 karma points MVP 5x c-trib
    Feb 05, 2018 @ 16:06
    Dan Diplo

    Yes, getting the same issue since upgrading to 1.0.16 via NuGet. I've also got Terratype.GoogleMapsV3 1.0.16 installed.

    As others mention, seems random, but triggered when accessing the property value converter:


    Stack trace:

    [KeyNotFoundException: The given key was not present in the dictionary.]
       System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12528541
       Terratype.Models.ModelConvertor.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) +2011
       Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) +188
       Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +488
       Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +210
       Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) +72
       Newtonsoft.Json.Linq.JToken.ToObject(Type objectType) +1769
       Newtonsoft.Json.Linq.JToken.ToObject() +56
       Terratype.Models.Model..ctor(JObject data) +55
       Terratype.TerratypeConverter.ConvertDataToSource(PublishedPropertyType propertyType, Object source, Boolean preview) +566
       Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty.get_Value() +58
       Umbraco.Web.PublishedPropertyExtension.GetValue(IPublishedProperty property, Boolean withDefaultValue, T defaultValue) +79
       Umbraco.Web.PublishedContentExtensions.GetPropertyValue(IPublishedContent content, String alias, Boolean recurse, Boolean withDefaultValue, T defaultValue) +81
       Umbraco.Web.PublishedContentExtensions.GetPropertyValue(IPublishedContent content, String alias) +59
       ASP._Page_Views_Partials_JobBoard_JobBoardLocationMap_cshtml.Execute() in c:\....JobBoardLocationMap.cshtml:51
  • Jeroen Oostwouder 96 posts 292 karma points
    Feb 06, 2018 @ 07:23
    Jeroen Oostwouder

    It almost looks like a cache problem, since I could trigger it by modifying the web.config file and pressing ctrl-f5 in chrome.

    Don't know if I can still trigger it. Haven't seen the error in a couple of days now, since I didn't need to refresh the cache

  • Dan Diplo 1554 posts 6204 karma points MVP 5x c-trib
    Feb 06, 2018 @ 08:58
    Dan Diplo

    I rolled back to 1.0.15 and haven't had the issue since. So for now I'm going to stick with that until Jonathan gets a chance to look at the issue (or whether it's down to Umbraco...).

  • Tom van Enckevort 107 posts 429 karma points
    Mar 26, 2018 @ 15:16
    Tom van Enckevort

    I encountered the same issue today when using 1.0.16 on an Umbraco v7.5.9 site.

    Rolling back to the previous version (1.0.15) seems to work for now.

  • Keith R Hubbard 175 posts 403 karma points
    Apr 05, 2018 @ 18:49
    Keith R Hubbard

    crazy how this is happening. Where is Jonathon????

  • Tom van Enckevort 107 posts 429 karma points
    Apr 06, 2018 @ 06:54
    Tom van Enckevort

    As mentioned by others, just use 1.0.15 for now as that one works fine.

    To be fair, 1.0.16 isn't mentioned in the changelog on the Github repo: So it could well be a case that an incomplete release was accidentally pushed to Nuget.

    I'm sure that when Jonathan has got time, he will have a look at it. But we all know and can appreciate that finding time for your side projects can be a challenge sometimes.

  • Mila Pandurska 43 posts 190 karma points
    Apr 25, 2018 @ 17:41
    Mila Pandurska


    I have the same issue with version 1.0.16.

  • Dan Evans 629 posts 1016 karma points
    Jun 14, 2018 @ 08:01
    Dan Evans

    I have the same issue with 1.0.18. Anyone find a solution?

    @Html.Terratype(Model.Content.GoogleMap, @)

  • Alex Skrypnyk 6086 posts 23488 karma points MVP 7x admin c-trib
    Aug 27, 2018 @ 14:29
    Alex Skrypnyk

    I saw a similar issue in version 1.0.18

  • Dan Diplo 1554 posts 6204 karma points MVP 5x c-trib
    Nov 14, 2018 @ 16:22
    Dan Diplo

    Has anyone tried 1.0.20 and does it fix this issue?

  • Sotiris Filippidis 283 posts 1497 karma points
    Nov 21, 2018 @ 14:08
    Sotiris Filippidis

    I tried 1.0.20 on a site that was playing well on localhost and on a local VM (deploy as release) but not on the live environment. 1.0.20 (Terratype AND Terratype GoogleMaps V3) seem to be working fine, no issues.

Please Sign in or register to post replies

Write your reply to: