Sitecore Commerce Business Tools doesn't load

1k Views Asked by At

I'm facing a problem with loading the Sitecore Commerce Business Tools on my local machine. I don't get any error in my browser which you can check on the following screenshoot, but the page is not initialized:

enter image description here

Seems like the operations GetNavigationView() and GetLanguageView() are stuck on getting data, but I couldn't figure out what could be the problem.

As preparation steps, I did the Sitecore Commerce Bootstrap, and Environment Initialization via Postman and everything went ok.

In the CommerceAuthoring_Sc9\wwwroot\config.json I set up the certificate thumbprint and here is what I have in the AppSettings:

"AppSettings": {
    ...     
    "SitecoreIdentityServerUrl": "https://localhost:5050",
    "AllowedOrigins": [
          "https://localhost:4200",
          "https://sxa.storefront.com"],
    "AntiForgeryEnabled": false,
    "UseHttpsInKestrel": true,
    "SslPort": 5000,
    "SslPfxPath": "wwwroot/localhost.pfx",
    "SslPfxPassword": "sitecore"
}

Also in the CommerceAuthoring_Sc9\wwwroot\bootstrap\Global.json I added all the environments I use.

Here you can check some of the errors I noticed in the CommerceAuthoring logs:

ERROR ImportMinion Error Access to the path 'C:\Import.lock' is denied. Inner 
...
ERROR SitecoreConnectionManager.Error: Message=Invalid URI: The hostname could not be parsed.|Trace=   
      at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
      at Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager.ProcessRequest(CommerceContext commerceContext, String action, String method, ItemModel itemModel) System.UriFormatException: Invalid URI: The hostname could not be parsed.
      at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
      at Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager.ProcessRequest( CommerceContext commerceContext, String action, String method, ItemModel itemModel)
...
ERROR SitecoreConnectionManager.Error: Message=One or more errors occurred.|Trace=   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
      at Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager.ProcessRequest(CommerceContext commerceContext, String action, String method, ItemModel itemModel)
      System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
      --- End of inner exception stack trace ---
      at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
      at Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager.ProcessRequest(CommerceContext commerceContext, String action, String method, ItemModel itemModel)
      ---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---
...
ERROR Management.block.getitemsbypath: Sitecore Item Service Get item failed, Item /sitecore/Commerce/Commerce Control Panel/Commerce Engine Settings/Commerce Terms/BusinessTools/ViewNames not found.

I checked some solutions that were already mentioned across the forums but no luck fo far.

I'll very appreciate if you have any advice for me!

Updated

After some time, we got the following error on the UAT env. but I'm not sure if we can do a Commerce Bootstrap there without losing our data:

INFO Management.block.getitembypath./sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/CommerceEngineDefaultStorefront|en
INFO Management.block.getitembypath./sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/CommerceEngineDefaultStorefront: Language=en
ERROR SitecoreConnectionManager.Error: Message=Unexpected character encountered while parsing value: <. Path '', line 0, position 0.|Trace=   at Newtonsoft.Json.JsonTextReader.ParseValue()
   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 Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager.GetItemByPath(CommerceContext commerceContext, String path, String language)
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   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 Sitecore.Commerce.Plugin.Management.SitecoreConnectionManager.GetItemByPath(CommerceContext commerceContext, String path, String language)
ERROR Management.block.getitembypath: Sitecore Item Service Get item failed, Item /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/CommerceEngineDefaultStorefront not found.
ERROR CtxMsg.Error.InvalidShop: Text=Shop 'CommerceEngineDefaultStorefront' does not exist.
ERROR PipelineAbort:Shop 'CommerceEngineDefaultStorefront' does not exist.
ERROR CtxMsg.Error.InvalidShop: Text=Shop 'CommerceEngineDefaultStorefront' does not exist.
ERROR CommerceController.OnActionExecuting.BadRequest: Code=Error|TermKey=InvalidShop|Text=Shop 'CommerceEngineDefaultStorefront' does not exist.

Also, the storefront item 'CommerceEngineDefaultStorefront' exist in the database that is specified in the PlugIn.Content.PolicySet-1.0.0.json file. I feel some of the json files has invalid params/values or the formatting is wrong, but I couldn't find any lead, furthermore, they haven't been changed recently.

Answer

Eventualy, it appeared the our CD was down for some period.

0

There are 0 best solutions below