Sunday, October 25, 2020

Fix for AddCartLine: Error Operation failed: One or more dependencies failed

 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: []  
Fix - We identify that it's due to recent data restore and the role was not properly updated, After proving the access to collectionuser
The issue got resolve.

Reference -


No comments:

Post a Comment