web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Solution fa...
Power Apps
Unanswered

Power Apps Solution failed to deploy

(2) ShareShare
ReportReport
Posted on by 143
I have been deploying the solution for my app many times (9 times) without issues. Today I made some changes to my app and ran the solution checker. The solution checker came back with clean results, no issues with the app. I tested it and it was running fine. I published the app and tried to deploy it to the test environment, but it failed 4 times already. The details say Validation results - Passed.  This is the error message. I only have one variable for CIProjectSite and I didn't change anything with the environment variable. Why is it failing?
 
**UPDATE: I can export and import in, I just cannot use the deploy function.
 
Failure details
ImportAsHolding failed with exception :Cannot insert duplicate key exception when executing non-query: System.Data.SqlClient.SqlCommand Exception: System.Data.SqlClient.SqlException (0x80131904): Violation of UNIQUE KEY constraint 'ndx_envvarval_schemaname'. Cannot insert duplicate key in object 'dbo.EnvironmentVariableValueBase'. The duplicate key value is (mktpni_CIProjectSite, 0, Jan 1 1900 12:00AM). The statement has been terminated. at Microsoft.Crm.CrmDbConnection.HandleExecutionExceptionAbstract(Exception exception, String commandText, IDbConnection connection, IDbCommand command, IDbTransaction transaction, Boolean isOpen, Int32 commandTimeout, IConnectionRetryPolicy localRetryPolicy, Int32& retryCount) at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetryAbstract[TResult](Func`1 executeMethod, IDbCommand command, IConnectionRetryPolicy retryPolicy) at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass236_0.<InternalExecuteNonQuery>b__0() at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties) at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func) at Microsoft.Crm.Platform.Server.DataEngine.SqlDataAccessManager.ExecuteNonQuery(IDbCommand command, ISqlExecutionContext context, Int32 sourceLineNumber, String memberName, String sourceFilePath) at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteNonQueryAbstract(IDbCommand command, ISqlExecutionContext context) at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteNonQueryAbstract(IDbCommand command, ExecutionContext context) at Microsoft.Crm.Platform.SolutionAwareComponents.UpdateExecutor.ExecuteUpdate(IDbCommand command, ExecutionContext context) ClientConnectionId:1f56eaa8-6dca-451c-8ec7-5bc5c86f8324 Error Number:2627,State:1,Class:14 ClientConnectionId before routing:e6ea4c82-56bd-4a33-9581-4fcb73c832ef Routing Destination:b59999f70139.tr13834.westus1-a.worker.database.windows.net,11020
 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard