Try our conversational search powered by Generative AI!

Changes in deserialization? ArgumentException thrown when mapping lists with only one value


Experiencing an unexpected behavior after updating to Find 12.3.3 where result projection fails under some circumstances.

The page model has a property in the form of a list of strings (IEnumerable). When it has a single item the result projection throws:

EPiServer.Find.ProjectionException: An exception of type ArgumentException was thrown while projecting field MetaStandardSettingBody$$string. ---> System.ArgumentException: Argument types do not match

Adding a second item to the list will make the projection work.

Looking into the Find-index both conditions seem to be stored as arrays, yet it seems that an array with a single value won't deserialize to an array.

This will fail:

    "MetaStandardSettingBody$$string": [
        "This will fail"

This will work:

    "MetaStandardSettingBody$$string": [
        "This will ..",
        ".. work"

The projection is straight from an IEnumerable to an IEnumerable.

Anyone who have experienced similar problem?

Mar 14, 2017 14:24

We are experience similar a problem. We are using Find but the problem occured when we renewed the developer indexes, not in production or test.

An exception of type ArgumentException was thrown while projecting field EducationArea.

at System.Linq.Expressions.Expression.Constant(Object value, Type type)
at EPiServer.Find.ProjectionHelper.ReplaceExpressionWithConstantFromField(Dictionary`2 args, Expression expression)

at EPiServer.Find.ProjectionHelper.ReplaceExpressionWithConstantFromField(Dictionary`2 args, Expression expression)
at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitMemberAssignment(MemberAssignment assignment)
at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitBinding(MemberBinding binding)
at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitBindingList(ReadOnlyCollection`1 original)
at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitMemberInit(MemberInitExpression init)
at EPiServer.Find.Helpers.Linq.ExpressionVisitor.Visit(Expression exp)
at EPiServer.Find.ProjectionHelper.ReplaceMemberAssignmentsWithFieldValues(Expression selector, Dictionary`2 args)
at EPiServer.Find.ProjectionHelper.GetMappedSearchResultItem[TResult](SearchRequestBody requestBody, SearchHit`1 searchHit)
at EPiServer.Find.ProjectionHelper.GetMappedResult[TResult](SearchRequestBody requestBody, SearchResults`1 jsonResult)
at EPiServer.Find.SearchExtensions.GetProjectedResult[TResult](ISearch`1 search, SearchContext context)
at EPiServer.Find.SearchExtensions.GetResult[TResult](ISearch`1 search)
at ...

Mar 15, 2017 14:28

We are having the same problems, in multiple projects and different Find versions. The problem only occurs on developer indexes(so far). 


Mar 15, 2017 14:57

Thanks for the feedback! We're also running on a newly renewed developer index, so it seems to be index related indeed.

Mar 15, 2017 15:27

We have also seen this error in several projects. The error occur when adding a new property or changing index. Using any other type than string causes an exception.

Edited, Mar 16, 2017 8:03

I have registered it with Episerver support

Mar 16, 2017 8:19

Anyone affected by this should renew their development indices (this only affects


Mar 16, 2017 15:36

made new development index, and i got assigned:

and still the same problem, so how do i get my index being hosted somewhere else?

Mar 17, 2017 7:43

@Henrik: I renewed the index, but that did not solve it. 

Mar 18, 2017 17:00

reindexed today and it works even on:
Mar 20, 2017 11:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.