Sitecore.XConnect.Operations.DependencyFailedException: One or more dependencies failed --->
Sitecore.Xdb.Collection.Failures.DataProviderException: Postcondition 'The shard map manager has to be configured.' failed. --->
Sitecore.Framework.Conditions.PostconditionException: Postcondition 'The shard map manager has to be configured.' failed.
at Sitecore.Framework.Conditions.EnsuresValidator`1.ThrowExceptionCore(String condition, String additionalMessage, ConstraintViolationType type)
at Sitecore.Framework.Conditions.Throw.ValueShouldBeTrue[T](ConditionValidator`1 validator, String conditionDescription)
at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.GetRangeShardMap(String rangeShardMapName)
at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.MemoryCacheManager.AddOrGetExistingFromCache[T](String key, Func`1 valueFactory)
at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.MapRecordsToShards[T](String rangeShardMapName, IReadOnlyCollection`1 records, Func`2 getShardKey)
Despite the slightly cryptic error message, the cause of this is actually fairly straightforward. If you see this error, this is an indicator that xConnect cannot connect to the Xdb.Collection.ShardMapManager database, which is attempted in the InitializeShardMapManager method, where this exception is being thrown.
Though the underlying SQL error doesn’t appear to be logged, to diagnose the problem, you should confirm that the collection connection string in the configuration is correct:
In my instance, the Sitecore 9 install hadn’t correctly created the collectionuser login in SQL Server, so I just had to create this login and add it to the sc90_Xdb.Collection.ShardMapManager database. I confirmed that the connection string worked and provided access to the ShardMapManager database, and after that point, the error disappeared and I was able to push data into xConnect.
This error occurs if the post-installation manual steps are not completed. For Sitecore 9.0, these are found in Chapter 6 of the installation guide.