Rebuild index Json error

Vote:
 

Hi!

I have a clean Quicksilver local project installed. Just after migration step, when going to Commerce Manager I have the following error when rebuilding index:

2019-09-16 20:14:57,146 [17] ERROR Mediachase.Search.Extensions.BaseCatalogIndexBuilder: Failed to index catalog entry Womens Beauty Package(755) in Fashion. Exception: System.AggregateException: One or more errors occurred. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at EPiServer.Reference.Commerce.Shared.CatalogIndexer.RestIndexer.<GetDocument>d__5.MoveNext() in C:\Projects\2\quicksilverLOCAL2\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Shared\CatalogIndexer\RestIndexer.cs:line 89
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at EPiServer.Reference.Commerce.Shared.CatalogIndexer.RestIndexer.OnCatalogEntryIndex(SearchDocument& document, CatalogEntryRow entry, String language) in C:\Projects\2\quicksilverLOCAL2\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Shared\CatalogIndexer\RestIndexer.cs:line 64
   at Mediachase.Search.Extensions.BaseCatalogIndexBuilder.IndexCatalogEntryDto(IndexBuilder indexer, CatalogEntryRow entryRow, String defaultCurrency, String[] languages)
   at Mediachase.Search.Extensions.BaseCatalogIndexBuilder.<>c__DisplayClass16_3.<BuildIndex>b__0(CatalogEntryDto entryDto)
---> (Inner Exception #0) Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at EPiServer.Reference.Commerce.Shared.CatalogIndexer.RestIndexer.<GetDocument>d__5.MoveNext() in C:\Projects\2\quicksilverLOCAL2\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Shared\CatalogIndexer\RestIndexer.cs:line 89<---

Steps taken to this point:

  1. Clone github Quicksilver repo
  2. Change databases names in web.config and in SetupDatabases.cmd.
  3. Build solution
  4. Run SetupDatabases.cmd.
  5. Change basePath in web.config (Site) to App_Data for the migration step to not bork up.
  6. Fire up the site, login with admin@example.com/store
  7. Wait for the migration to end. Migration successful
  8. Change basePath back to ../appdata (for search catalog path to be the same for manager and site).
  9. Open site go to mens to check if everything is ok. Looks good.
  10. Go to CommerceManager tab in CMS, go to Administration > Logs > SearchIndex
  11. Hit Rebuild index.
  12. Every product has this error. Products no longer visible on frontend /mens or /womens

Any suggestions?

Now what possibly could be wrong here?

I would want to put a breakpoint at that RestIndexer, but visual dosnt want to hit that breakpoint, with the symbols loaded.

#207303
Edited, Sep 16, 2019 20:31
Vote:
 

You should probably make sure the setting for search url is correct in your CM web.config/appSettings

<add key="SearchApiUrl" value="http://localhost:50244/" />

#207305
Sep 16, 2019 23:26
Vote:
 

Hi Quan!

I did set up that url. I have changed the port to the same one as in visual studio Manager project properties:

#207308
Edited, Sep 16, 2019 23:30
Vote:
 

You also has to make sure quicksilver is running when you are indexing in CM

#207311
Sep 17, 2019 7:02
Vote:
 

I am running Quicksilver. I am doing indexing in the manager that i access through the menu in the cms.

#207317
Sep 17, 2019 8:52
Vote:
 

OK so you can attach the debugger to your commerce manager site and put a break point at 

OnCatalogEntryIndex

to see what response is being returned from search index url 

#207318
Sep 17, 2019 8:56
* 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.