IdentityServer4.Admin: Error on Creates/Updates

I am encountering an issue when trying to Create or Update nearly anything with the Admin UI. I enabled verbose logging and found this entry in the logs. Did my EF migration to the latest version break my database or is something going on with UI? I cant see why an UPDATE or INSERT would have a null ID.

2019-02-26 20:08:43.626 -06:00 [ERR] Exception at route /Configuration/IdentityResource/4 Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. —> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column ‘Id’, table ‘IdentityServer.dbo.IdentityClaims’; column does not allow nulls. UPDATE fails. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) at System.Data.SqlClient.SqlDataReader.TryHasMoreResults(Boolean& moreResults) at System.Data.SqlClient.SqlDataReader.TryNextResult(Boolean& more) at System.Data.SqlClient.SqlDataReader.<>c__DisplayClass187_0.<NextResultAsync>b__1(Task t) at System.Data.SqlClient.SqlDataReader.InvokeRetryable[T](Func2 moreFunc, TaskCompletionSource1 source, IDisposable objectToDispose)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Hey! I just got to getting the latest version from the branch. Unfortunately the issue still persists.

Since i have the source now, i am going to attempt to step through the code and try to pin point where its going wrong. I will comment my findings!

I have not tried that, I will do a full clone (not from template) and report back.

Thank you!