0

我在本地计算机上加载 Sitecore Commerce Business Tools 时遇到问题。我的浏览器没有出现任何错误,您可以在以下屏幕截图中查看,但页面未初始化:

在此处输入图像描述

似乎 GetNavigationView() 和 GetLanguageView() 操作卡在获取数据上,但我无法弄清楚可能是什么问题。

作为准备步骤,我通过 Postman 进行了 Sitecore Commerce Bootstrap 和环境初始化,一切正常。

CommerceAuthoring_Sc9\wwwroot\config.json我设置了证书指纹,这是我在 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"
}

同样在CommerceAuthoring_Sc9\wwwroot\bootstrap\Global.json我添加了我使用的所有环境。

在这里,您可以检查我在 CommerceAuthoring 日志中注意到的一些错误:

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.

我检查了一些已经在论坛中提到的解决方案,但到目前为止还没有运气。

如果您对我有任何建议,我将不胜感激!

更新

一段时间后,我们在 UAT 环境中收到以下错误。但我不确定我们是否可以在不丢失数据的情况下在那里进行 Commerce Bootstrap:

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.

此外,店面项目“CommerceEngineDefaultStorefront”存在于PlugIn.Content.PolicySet-1.0.0.json文件中指定的数据库中。我觉得有些 json 文件的参数/值无效或格式错误,但我找不到任何线索,而且最近没有更改它们。

回答

最终,我们的 CD 似乎下降了一段时间。

4

0 回答 0