1

I am seeing an issue in logging to sitecore 9.3 instance.. When i hit the url like https://{domainname}/sitecore. It gets redirected to Sitecore identity server login page. I enter user name password and click on ok button. I see the error message on browser: Error: An error occurred This issue started coming when i published my code to Sitecore instance sitecore TDS, before publishing code. It did not see any issue. Login was successful and was getting redirected to content editor.

The thing is when I browse Sitecore identity server from IIS directly and login there, I do not see any issue. I get logged in successfully.

Please help me how to troubleshoot this issue. not getting any direction.

  • What steps have you taken to rollback the changes published by TDS? Sounds like a problem specific to your setup. – Michael West May 11 at 14:46
  • Thanks Michael for looking into my question! i have not rolled back even i have not thought about rollback.. because my site is working after publishing code to sitecore instance.i can see the contents are coming from sitecore to website.. the only thing when it try to access sitecore content editor .. hit the sitecore url .. gets redirected to sitecore identity server login page.. supplied credential ..the error occurred.. .. not sure how i will roll back the code.. if that is the option to go for.. – Rajesh Kumar May 11 at 14:58
  • I had this issue and it turned out to be a duplicate name. Message: Unable to create a user. Reason: DuplicateUserName Source: Sitecore.Owin.Authentication – Michael West Aug 21 at 19:15
0

Although the message "an error occured” is of course useless, I have found that when this occurs, there are also errors logged in the Sitecore logs. Check those.

| improve this answer | |
  • I took care of this issue by rolling back TDS deployment and followed manual deployment of files manually . So no issue at login now. – Rajesh Kumar May 13 at 17:25
0

I am facing the same issue with Sitecore 9.1, in summary the issue is Sitecore not being able to handle long ticket in Core database

Sitecore has a cleanup task that should take care of cleaning the tickets in the database but for some reason it is not performing, and if you could check your logs and see if you have something similar

ManagedPoolThread #2 12:04:16 INFO Job started: Sitecore.Tasks.CleanupAuthenticationTicketsAgent ManagedPoolThread #2 12:04:16 INFO CleanupAuthenticationTicketsAgent: Number of expired authentication tickets that have been removed: 0 ManagedPoolThread #2 12:04:16 INFO CleanupAuthenticationTicketsAgent: Total number of authentication tickets to process: 0 ManagedPoolThread #2 12:04:16 INFO Job ended: Sitecore.Tasks.CleanupAuthenticationTicketsAgent (units processed: )

OR

20892 10:35:42 ERROR String or binary data would be truncated. The statement has been terminated. Exception: System.Exception Message: String or binary data would be truncated. The statement has been terminated. Source: Sitecore.Kernel at Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteNonQuery() at Sitecore.Data.DataProviders.Sql.SqlDataApi.<>c__DisplayClass33_0.b__0() at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover) at Sitecore.Data.Properties.SqlPropertyStore.SetStringValueCore(String prefixedName, String value) at Sitecore.Data.Properties.PropertyStore.SetStringValue(String name, String value) at Sitecore.Web.Authentication.DefaultTicketManager.CreateTicket(String userName, String startUrl, Boolean persist) at Sitecore.Owin.Authentication.Pipelines.CookieAuthentication.SignedIn.CreateTicket.Process(SignedInArgs args) at (Object , Object )

Nested Exception

Exception: System.Data.DataException Message: Error executing SQL command: INSERT INTO [Properties] ( [Key], [Value] ) VALUES ( @name, @value )

I hope you are able to find similar entries, however, if that's not the case, please give a shot using the following command in your SQL against the Core database as a workaround and please note this is going to kill ALL sessions connected to CM

DELETE FROM [yourCoreDatabase].[dbo].[Properties] WHERE [Key] LIKE '%CORE_SC_TICKET%'

I am currently working with Sitecore Support since it seems that was fixed on Sitecore 9.0.1 and Sitecore 9.0.2 but newer versions are still facing such issue.

References: https://viniciusdeschamps.com.br/error-an-error-occurred-after-logging-in-sitecore/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.