During the setup for ASP.NET Core Rendering SDK, I found below error
ERROR: for traefik Cannot start service traefik:
Sitecore XM Cloud, Ordercloud, CDP, Personalize, ContentHub and Send
During the setup for ASP.NET Core Rendering SDK, I found below error
ERROR: for traefik Cannot start service traefik:
During the ASP.NET core rendering engine setup, I found below error
I updated the docker file for the absolute path "RUN Invoke-WebRequest 'https;//dist.nuget.org/win-x86-commonadline/v5.6.0/nuget.exe' - UserBasicPrasing -OutFile ''C;\ProgramFiles\NugGet\nuget.exe" but it didn't work.
Error - 'Invoke-WebRequest' is not recognized as an internal or external command
My current PowerShell version was 5.1
I tried run this command through the plain PowerShell window, As suggested by Sitecore community and it worked for me -
$Url = 'https://www.google.com/search?q=jitendra%20soni%20sitecore'
$Web = Invoke-WebRequest -Uri $Url -UseBasicParsing
$Web.BaseResponse.ResponseUri.AbsoluteUri
I used the above command for the testing.
I was discussing in the Sitecore slack thread and as suggested by Vincen and Maarten, I found this link useful
Conclusion and fix - basically to make it work, I had to modify the script to set the default shell to PowerShell,
I was thinking to provide this fix into the Sitecore main GitHub repository but found that this had already fixed by our community legend GuidovTricht
As always, Don't forget to appreciate the hard work and contribution of our community members, so I added my comments.
For the second day, I have identified a few tech sessions, here are my list.
1. Beyond the marketing hub: Learning content management
The pandemic has exposed serious flaws in many corporations' learning and training strategies. Businesses that previously relied on in-person delivery must implement more resilient strategies. Leveraging the innovative capabilities of Sitecore Content Hub makes it possible to expand its value beyond the stereotypical marketing content solution. Utilizing Content Hub, global businesses can maintain learning and training continuity and resiliency in a post-pandemic era. On-demands will be available on Thursday, October 29, by clicking the gray tile below.
2 Contain yourself: Why Kubernetes
Containers represent a large change with various impacts across your organization. Come learn the basics of containers and Kubernetes and what this means to you, specifically. From C-level executives to marketers to infrastructure and development teams, we invite all to come find out if containers are right for you. On-demands will be available on Thursday, October 29, by clicking the gray tile below.
3.Future of global e-commerce: Sitecore XC & beyond
AI is turning more human, and people are looking at more ways to expand its reach through cognitive computing, as we continue to evolve and adapt to our new digital world. With cognitive technologies, commerce enterprises can gather richer and more personalized data about their customers. Our session will reveal the power of Sitecore XP and XC and showcase how to design a future-centric e-commerce platform. On-demands will be available on Thursday, October 29, by clicking the gray tile below.
Sitecore Symosium 2020 is going to be very useful to learn the latest updates and skills, For day1, I have decided to attend below sessionsnos.
1. Influencer Roundtable with Microsoft: Integrating AI into existing digital marketing strategy
Integrating advanced analytics and machine learning into your digital stack to deliver new MarTech capabilities is the latest frontier in marketing and digital transformation. From leveraging Sitecore’s out of the box AI Auto-personalization to prediction propensities and content attribution to digital personas and tailored smart recommendations, learn a framework on how to start planning and building these capabilities with confidence and success. We will also be exploring how other customers are utilizing AI in their marketing strategies.
2. Headless Sitecore Commerce with Sitecore JSS
COVID-19 has taught retailers the importance of implementing e-commerce solutions with accelerated time-to-market. Attendees of this session will learn about EPAM’s Headless Sitecore Commerce Accelerator and how easily you can get started with Sitecore JSS and Sitecore Commerce. We will discuss how you can leverage source code that saves weeks of development time, enable front-end JavaScript developers to develop and adjust website features quickly and independently from back-end developers, and create seamless digital experiences across multiple touchpoints and devices.
3 Sitecore Content AI
In our quest to help our customers scale digital experiences, Sitecore is releasing Content AI. We released our Auto-Personalization solution in 2019 to make personalization easy, scalable and effective. Now, Content AI provides AI-driven solutions to suggest and quickly create content that maximizes outcomes, relevance and time-to-value.
4 Containers & AKS: Taking Sitecore 10 to the next level
This session will focus on the container functionality introduced in Sitecore 10. Join us to take a look at this new world of running Sitecore in Containers from development through to production in Azure Kubernetes Service (AKS). This approach empowers everyone from developers to IT, making sure you realize the most value possible from your Sitecore experience
Recently, I got this eeror while adding items to the cart, below are the error details - (Response preview from the network tab)
1. {Lines: null, Email: null, Subtotal: null, TaxTotal: null, Total: null, ShippingTotal: null,…}
1. AccountingParty: null
2. ContentEncoding: null
3. ContentType: null
4. Data: null
5. Discount: null
6. Email: null
7. Errors: [,…]
1. 0: "AddCartLine: {
2. ↵ "Message": "Operation failed: One or more dependencies failed",
3. ↵ "ExceptionMessage": "One or more dependencies failed",
4. ↵ "ExceptionType": "Sitecore.XConnect.Operations.DependencyFailedException",
5. ↵ "StackTrace": null,
6. ↵ "InnerException": {
7. ↵ "Message": "An error has occurred.",
8. ↵ "ExceptionMessage": "Login failed for user 'collectionuser'.",
9. ↵ "ExceptionType": "Sitecore.Xdb.Collection.Failures.DataProviderException",
10. ↵ "StackTrace": " at Sitecore.Xdb.Collection.Data.SqlServer.Managers.SqlContactRecordsManager.<GetContactIdentifiersFromIndexAsync>d__43.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.Xdb.Collection.Data.SqlServer.SqlDataProvider.<GetContactsByIdentifier>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.Xdb.Collection.DataProviderCountersDecorator.<GetContactsByIdentifier>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.<>c__DisplayClass440_0`1.<<ToAsyncEnumerable>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.AnonymousAsyncIterator`1.<MoveNextCore>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.SelectManyAsyncIterator`2.<MoveNextCore>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.SelectManyAsyncIterator`2.<MoveNextCore>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.BufferAsyncIterator`1.<MoveNextCore>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.<MoveNextCore>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Linq.AsyncEnumerable.<ForEachAsync_>d__174`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.XConnect.Service.RepositoryGetInvoker.<UpdateGetOperations>d__7`2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.XConnect.Service.RepositoryGetInvoker.<>c__DisplayClass4_2.<<Execute>b__5>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.XConnect.Service.RepositoryGetInvoker.<FailOperationsOnException>d__5.MoveNext()",
11. ↵ "InnerException": {
12. ↵ "Message": "An error has occurred.",
13. ↵ "ExceptionMessage": "Login failed for user 'collectionuser'.",
14. ↵ "ExceptionType": "Sitecore.Xdb.Collection.Failures.DataProviderException",
15. ↵ "StackTrace": " at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.<OpenConnectionAsync>d__29.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.Xdb.Collection.Data.SqlServer.Managers.SqlContactRecordsManager.<>c__DisplayClass43_1.<<GetContactIdentifiersFromIndexAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.Xdb.Collection.Data.SqlServer.Managers.SqlContactRecordsManager.<GetContactIdentifiersFromIndexAsync>d__43.MoveNext()",
16. ↵ "InnerException": {
17. ↵ "Message": "An error has occurred.",
18. ↵ "ExceptionMessage": "Login failed for user 'collectionuser'.",
19. ↵ "ExceptionType": "System.Data.SqlClient.SqlException",
20. ↵ "StackTrace": " at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)\r\n at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)\r\n at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)\r\n at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMap.<OpenConnectionAsync>d__43.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.<>c__DisplayClass29_0.<<OpenConnectionAsync>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.<OpenConnectionAsync>d__29.MoveNext()"
21. ↵ }
22. ↵ }
23. ↵ }
24. ↵}"
8. HasErrors: true
9. HasInfo: false
10. HasWarnings: false
11. Info: []
12. JsonRequestBehavior: 1
13. Lines: null
14. MaxJsonLength: null
15. Parties: null
16. Payments: null
17. PromoCodes: null
18. RecursionLimit: null
19. Shipments: null
20. ShippingTotal: null
21. Subtotal: null
22. Success: false
23. TaxTotal: null
24. Total: null
25. TotalAmount: 0
26. Url: null
27. Warnings: []
Recently, We got this issue while processing the order, Here are the investigation and fix details
We did a third party payment integration and while the payment party submit the success request to our website (XP + XC 9.3) we took the transaction details, Add a new components and send it to create the order.
The order created successfully but XC didn't redirect to order confirmation page, I think the process is after the order submission XC internally call the SubmitCurrentVisitorOrder to get the order details and show to the order confirmation page.
Recntly, I got a requirement to update all the content item, basically replacing all spaces with _ (under score).
Here is simple script to do that.
cd '/sitecore/content/Home/Test'
Get-ChildItem -Recurse . | Where-Object { $_.Name -match " " } | ForEach-Object {
$originalName = $_.Name
$newName = $originalName -Replace " ", "_"
Write-Host "Renaming item from " -nonewline;
Write-Host $originalName -f Yellow -nonewline;
Write-Host " to " -nonewline;
Write-Host $newName -f Green;
$_.Editing.BeginEdit()
$_.Name = $newName;
$_.Editing.EndEdit()
}
Recently, I have integrated a third party payment system with the Sitecore XC 9.3.
The high-level process flow was that our Application would open the payment gateway with some hash key generated (based on a few fields), Application will also send the redirect URL in case of failure and success.
Now, Once we open the payment gateway and when it redirects to our website, It fails only in chrome browser and it was happening randomly, not always.
We did the investigation and discussed with the payment provider, They did mention below details.
The issue is missing Session-Id when the payment provider returns for the diff domain, and because of change in Session, the Sitecore XC application understands this as an attack and didn't get the context.
Details - Short Description of Incident
Q.1 How does Chrome `SameSite` Cookie policy affect my browser redirection integration? In Chrome v.84 SameSite cookie attribute is released which if not handled by the server may lead to an issue causing loss of session data or session ID gets NULL. Merchants might experience a sudden surge of incomplete orders at their end Q.2 About Chrome's `SameSite` Cookie Policy For users running Chrome v.84 and higher, Chrome is enforcing a secure-by-default cookie classification system treating cookies that have not declared `SameSite` value as `SameSite=Lax` cookies. Only cookies set as `SameSite=None` will be available, provided they are being accessed from secure connections. Chrome 84 release note link for reference:https://support.google.com/chrome/a/answer/7679408?hl=en Q.3 How to fix (or prepare) for it? Session data is not a part of PayU integration, it is managed by merchants. You can refer to the link below and make required changes.Below link can be used for reference.( Ref. https://web.dev/samesite-cookies-explained/ )
Reference - https://docs.microsoft.com/en-us/aspnet/samesite/csmvc
I was using .Net framework version 4.7.1 and had no time to migrate the version at this short time, now the second option is how to manage this in .Net framework version 4.7.1, I found a solution and able to get the appropriate result, here are the details.
I rad 100's of the article and StackOverflow post on that to use custom modules and so but finally able to manage through the below steps -
Overview
========
The <sessionState cookieSameSite="None" /> and <httpCookies requireSSL="true"/> settings in web.config
set the SameSite=None and Secure cookie attributes of the ASP.NET session cookie but don't take into
account incompatible browsers.
The SameSiteNone HTTP Module is an alternative approach that sets the SameSite=None and Secure cookie attributes
if the browser is compatible and clears the SameSite attribute if the browser is incompatible.
Incompatible browsers are listed at:
https://www.chromium.org/updates/same-site/incompatible-clients
It requires .NET framework v4.8 or later to be installed on the web server.
The web application does not have to target .NET framework v4.8 or later.
Configuration
=============
Add the following to the application's web.config.
<system.webServer>
<modules>
<add name="SameSiteNoneHttpModule" type="ComponentSpace.SameSiteNoneHttpModule"/>
</modules>
</system.webServer>
Copy the ComponentSpace.SameSiteNone.dll to the application's bin folder.
Specifying the Cookies
======================
By default the HTTP module monitors the ASP.NET_SessionId cookie and updates it, if required.
The SameSiteNoneCookies app setting in the application's web.config may specify a comma-separated list of cookies to monitor.
<appSettings>
<add key="SameSiteNoneCookies" value="ASP.NET_SessionId, some-other-cookie"/>
</appSettings>
I found this dll from the ComponentSpace, but can't see the link anymore so adding the package reference here if anyone wants to download and try
t.ly/4a7E
Even, After this change, We couldn't resolve the issue and finally followed below approach to provide the fix.
We created an intermediate page to redirect the response from the payment provider and redirect again to the Sitecore XC review page.
That change also sometimes got fail (I know it's weird).
Finally, on the review page, in case if we were getting the null response from the payment provider (Transaction null), we were calling the payment provider API again to get the latest transaction update. As there was an option to get the transaction details based on input value transaction id ( which we generate before calling the payment provider), We used the same pre-transaction Id to get the response, and that has wholly unblocked us.
Let me know if you have any questions,
Recently, I found a difference in Bizfx dashboard and the inventory was not loading properly (Not showing sellable items).
"@odata.context": "https://localhost:5000/CommerceOps/$metadata#Commands/$entity",
"@odata.type": "#Sitecore.Commerce.Core.Commands.BootstrapCommand",
"Id": "2ac9de6b5e6449458cf4276f2043762a",
"ResponseCode": "Error",
"Messages": [
{
"MessageDate": "2020-10-08T07:17:30.7284748Z",
"Code": "Error",
"Text": "PolicySet json is not valid.",
"CommerceTermKey": "InvalidPolicySetJson"
}
]
}
During a new CD server machine setup, I found this issue during the login and registration, the error is very straight forward and self-explanatory that it's related to security/ or access of the token beetwen sites.
Error Details 27432 22:33:04 ERROR One or more exceptions occurred while processing the subscribers to the 'sessionEnd:batch:starting' event.
Exception[1]: Sitecore.XConnect.XdbCollectionUnavailableException
Message[1]: An error occurred while sending the request.
Source[1]: Sitecore.Xdb.Common.Web
at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory)
at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.Initialize(XmlNode configNode)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient(String clientConfigPath)
at Sitecore.Analytics.XConnect.DataAccess.BatchEnabledXdbRuntimeContext..ctor(IXdbContextFactory factory)
at Sitecore.Analytics.Events.BatchEventHandler.OnBatchStarting(Object sender, EventArgs args)
at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
27432 22:33:04 ERROR Cannot execute 'sessionEnd:batch:starting' event
Exception: System.AggregateException
Message: One or more exceptions occurred while processing the subscribers to the 'sessionEnd:batch:starting' event.
Source: Sitecore.Kernel
at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters)
at Sitecore.Kernel.Web.SessionExpirationProcessor.TryRaiseEvent(String eventName, Object[] parameters)
Nested Exception
Exception: Sitecore.XConnect.XdbCollectionUnavailableException
Message: An error occurred while sending the request.
Source: Sitecore.Xdb.Common.Web
at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory)
at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.Initialize(XmlNode configNode)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient(String clientConfigPath)
at Sitecore.Analytics.XConnect.DataAccess.BatchEnabledXdbRuntimeContext..ctor(IXdbContextFactory factory)
at Sitecore.Analytics.Events.BatchEventHandler.OnBatchStarting(Object sender, EventArgs args)
at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
Nested Exception
Exception: System.Net.Http.HttpRequestException
Message: An error occurred while sending the request.
Source: mscorlib
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
here is a good read about the anti
https://www.c-sharpcorner.com/article/understand-antiforgeri-token-in-asp-net-mvc/#:~:text=Anti-forgery%20stands%20for%20%E2%80%9CAct%20of%20copying%20or%20imitating,trusted%20source%20sending%20the%20data%20to%20the%20site.
https://www.devcurry.com/2013/01/what-is-antiforgerytoken-and-why-do-i.html
Solution - I opened the mmc.exe, selected the certificates and allowed all application pools access to the CD server certificate.
Recently, I got above error during the setup of a new CD server (XP (CD role) + XC(Shop role))
Seems very straight forward that there is a diff in Microsoft.OData.Client assembly version.
I took the latest configuration (Including web.conf) and dll from one of the working CD server and that change had resolved the issue.
Recently, I got an issue while deleting the site (SXA)
Invoke-PreDeleteValidationStep : Cannot bind argument to parameter 'DefinitionItems'
because it is null. At line:28 char:57 + ... $canRemove = Invoke-PreDeleteValidationStep
$siteModules $SiteIt ... + ~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:)
[Invoke-PreDeleteValidationStep], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Invoke-PreDeleteValidationStep
I didn't find any solution or details on google, Finally, I clicked on add modules and remove one unwanted module and clicked yes, basically that process refreshed the site again.During the CD2 configuration for one of the environment, I got below error
ERR Error running script (call to f_2cf3a5ca51adf9b3b3500002e73e176dc3c54e26): @user_script:2: @user_script: 2: -OOM command not allowed when used memory > 'maxmemory'.
I took reference from these links
After the investigation, I found this is because of the Redis cache memory issue, I have increased the size based on the analyzed load.
here are the steps to upload it -
# Redis configuration file example
# it in the usual form of 1k 5GB 4M and so forth:
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
# units are case insensitive so 1GB 1Gb 1gB are all the same.
Navigate to the file C:\Program Files\Redis and update the value based on your analysis,
While working on SXA, you will always define the page design and partial design but in case if we need to add the placeholder key in the SXA layout, If we add the placeholder key before the
@Html.Sxa().GridBody()
The application will not show the SXA components menu on the experience editor, to fix that we should keep this placeholder after the default placeholder.
Example -
Recently, I got a request to check an urgent issue, the issue was that a few images in the page header and page content were not showing.
When I open that image in a new tab (through the direct URL) it didn't work but when I did the refresh on that Image in the same tab it shows the actual image, weird scenario yeah!!
I quickly check the request and response object of the site and individual tab (Only image link) and found a difference, While making a call from the website the request is sending the referee, As mentioned in the below screenshot.
Solution - the option is to remove the referrer for the particular page, I have added metadata and set the below value.
<meta name="referrer" content ="no-referrer">
that change resolve the issue,
We can also update the SXA layout for that
Note - this is a quick fix, but may create another issue of explicitly adding this tag, I will update in case of any further issue because of this change.
Happy Sitecore instance troubleshooting!!
It's more enjoyable when we work on the Sitecore, consider multiple endpoints like CMS, xConnect, Identity servers and XC Roles. I again got a requirement to update the certificates and wanted to share this with the community so everyone can quickly do this without any issue or hurdles.
So let's get started the journey to update the certificate :)
Steps 1 - Open the mmc.exe
1. message: "An error has occurred.", exceptionMessage: "An error occurred while sending the request.",…}
1. exceptionMessage: "An error occurred while sending the request."
2. exceptionType: "System.Net.Http.HttpRequestException"
3. innerException: {message: "An error has occurred.",…}
4. message: "An error has occurred."
5. stackTrace: " at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
6. ↵ at Sitecore.ExperienceAnalytics.Core.Repositories.ReferenceData.ReferenceDataSegmentReader.Get(IEnumerable`1 keys, NameValueCollection readingPreferences)
7. ↵ at Sitecore.ExperienceAnalytics.Aggregation.Repositories.AggregationSegmentReader.Get(IEnumerable`1 keys, NameValueCollection readingPreferences)
8. ↵ at Sitecore.ExperienceAnalytics.Api.RequestTypeResolver.GetReportSegments()
9. ↵ at Sitecore.ExperienceAnalytics.Api.RequestTypeResolver.GetRequestType()
10. ↵ at Sitecore.ExperienceAnalytics.Api.Http.ModelBinding.ReportQueryModelBinder.GetModelFromBindingContext(HttpActionContext actionContext, ModelBindingContext bindingContext)
11. ↵ at Sitecore.ExperienceAnalytics.Api.Http.ModelBinding.ReportQueryModelBinder.BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext)
12. ↵ at System.Web.Http.ModelBinding.ModelBinderParameterBinding.ExecuteBindingAsync(ModelMetadataProvider metadataProvider, HttpActionContext actionContext, CancellationToken cancellationToken)
13. ↵ at System.Web.Http.Controllers.HttpActionBinding.<ExecuteBindingAsyncCore>d__12.MoveNext()
14. ↵--- End of stack trace from previous location where exception was thrown ---
15. ↵ at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
16. ↵ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
17. ↵ at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
18. ↵--- End of stack trace from previous location where exception was thrown ---
19. ↵ at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
20. ↵ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
21. ↵ at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
22. ↵--- End of stack trace from previous location where exception was thrown ---
23. ↵ at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
24. ↵ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
25. ↵ at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
26. ↵--- End of stack trace from previous location where exception was thrown ---
27. ↵ at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
28. ↵ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
29. ↵ at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
30. ↵--- End of stack trace from previous location where exception was thrown ---
31. ↵ at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
32. ↵ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
33. ↵ at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
34. ↵--- End of stack trace from previous location where exception was thrown ---
35. ↵ at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
36. ↵ at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
37. ↵--- End of stack trace from previous location where exception was thrown ---
38. ↵ at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
39. ↵ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
40. ↵ at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
{"message":"An error has occurred.","exceptionMessage":"An error occurred while sending the request.","exceptionType":"System.Net.Http.HttpRequestException","stackTrace":" at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)\r\n at Sitecore.ExperienceAnalytics.Core.Repositories.ReferenceData.ReferenceDataSegmentReader.Get(IEnumerable`1 keys, NameValueCollection readingPreferences)\r\n at Sitecore.ExperienceAnalytics.Aggregation.Repositories.AggregationSegmentReader.Get(IEnumerable`1 keys, NameValueCollection readingPreferences)\r\n at Sitecore.ExperienceAnalytics.Api.RequestTypeResolver.GetReportSegments()\r\n at Sitecore.ExperienceAnalytics.Api.RequestTypeResolver.GetRequestType()\r\n at Sitecore.ExperienceAnalytics.Api.Http.ModelBinding.ReportQueryModelBinder.GetModelFromBindingContext(HttpActionContext actionContext, ModelBindingContext bindingContext)\r\n at Sitecore.ExperienceAnalytics.Api.Http.ModelBinding.ReportQueryModelBinder.BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext)\r\n at System.Web.Http.ModelBinding.ModelBinderParameterBinding.ExecuteBindingAsync(ModelMetadataProvider metadataProvider, HttpActionContext actionContext, CancellationToken cancellationToken)\r\n at System.Web.Http.Controllers.HttpActionBinding.<ExecuteBindingAsyncCore>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()","innerException":{"message":"An error has occurred.","exceptionMessage":"The request was aborted: Could not create SSL/TLS secure channel.","exceptionType":"System.Net.WebException","stackTrace":" at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)"}
Exception: Sitecore.XConnect.XdbCollectionUnavailableException
Message: The HTTP response was not successful: Forbidden
Source: Sitecore.Xdb.Common.Web
at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory)
at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.Initialize(XmlNode configNode)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient(String clientConfigPath)
at Sitecore.Analytics.Aggregation.XConnect.DefaultXdbContextFactory.CreateReadOnly()
at Sitecore.Analytics.Processing.AsyncPoolScheduler`2..ctor(IAsyncProcessingPool`1 pool, IXdbContextFactory xdbContextFactory, ExpandOptions options, Int16 maxBatchSize, BaseLog log)
at Sitecore.Analytics.Aggregation.InteractionAggregationAgent.<ExecuteCoreAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Analytics.Core.Agent.<ExecuteAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Analytics.Core.AsyncBackgroundService.<ExecuteAgentAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Analytics.Core.AsyncBackgroundService.<RunAsync>d__26.MoveNext()
The Domain is null and is probably not defined in Domain Manager
When I checked my domain configuration under site settings
/sitecore/content/Tenant/Sitecore/Settings/Site Grouping/Site
I found the reference of the domain didn't exist on my local system, I created a new domain through the admin panel here
{
"IsSignupFlow": false,
"UserName": null,
"Errors": [
"An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator."
],
"HasErrors": true,
"HasInfo": false,
"HasWarnings": false,
"Info": [
],
"Success": false,
"Url": null,
"Warnings": [
],
"ContentEncoding": null,
"ContentType": null,
"Data": null,
"JsonRequestBehavior": 1,
"MaxJsonLength": null,
"RecursionLimit": null
}
I opened my session in a new incognito window and found below errors - {
"IsSignupFlow": false,
"UserName": null,
"Errors": [
"Invalid or missing value for property \u0027Domain\u0027."
],
"HasErrors": true,
"HasInfo": false,
"HasWarnings": false,
"Info": [
],
"Success": false,
"Url": null,
"Warnings": [
],
"ContentEncoding": null,
"ContentType": null,
"Data": null,
"JsonRequestBehavior": 1,
"MaxJsonLength": null,
"RecursionLimit": null
}
I updated the existing domain in site groping, to see if it's working because, because I haven't added this domain in the commerce configuration . {
"IsSignupFlow": false,
"UserName": null,
"Errors": [
"Customer \u0027Storefront\\jitusonijk@gmail.com\u0027 already exists."
],
"HasErrors": true,
"HasInfo": false,
"HasWarnings": false,
"Info": [
],
"Success": false,
"Url": null,
"Warnings": [
],
"ContentEncoding": null,
"ContentType": null,
"Data": null,
"JsonRequestBehavior": 1,
"MaxJsonLength": null,
"RecursionLimit": null
}
So abve message is because I had the same user already registered, I did a new registration and it worked for me.