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

Notifications

Announcements

Community site session details

Community site session details

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

Solution update failing - Import successful but fails 'Uninstall' stage

(1) ShareShare
ReportReport
Posted on by 35

Hi all,

 

I'm experiencing a frustrating blocker when trying to push an update of a managed solution through to our production environment, both via pipeline and manual export/import.

 

As mentioned in the title, the Import stage of the deployment is successful, and I end up with the current solution and '[solution name]_update' version of the solution present concurrently. The updated version of the contained canvas app goes live and functions as intended. However, the Uninstall stage fails every time with the following error:

 

 

The DELETE statement conflicted with the REFERENCE constraint "relationship_referenced_attribute". The conflict occurred in database "db_crmcoregbr_20230915_08344189_56e7", table "MetadataSchema.Relationship", column 'ReferencedAttributeId'. The statement has been terminated.

 

 

I should point out that several components present in the live solution have since been been removed from the update solution as part of a refresh. However, there are no dependencies between the removed components and remaining ones. I have also checked individual component dependencies in the live version against other components outside of the managed solution in the production environment but cannot find anything.

 

I've tried to 'apply upgrade' but just get the same error message. This therefore leaves me stuck with multiple managed layers and an inability to put any further updates out, so I have had to delete the 'update' solution and roll back to the original managed solution.

 

I've successfully deployed an update of a separate managed solution to production through the same pipeline, so I know there's no global issue with the production environment. I've also imported a copy of the live solution to a standalone test environment and  then pushed the updated version through afterwards, and it succeeded. So the package itself is sound and there doesn't seem to be a direct issue of updating the managed solution itself - just not in our production environment ☹️.

Our schema has a fair few N:N relationships using OOB linking tables, so I'm very keen not to have to export the data from production and delete the solution entirely to start over.

 

I'd really appreciate any insight, particularly on the error message and ways in which I might be able to resolve this issue.

 

Tagging @Amik 

I have the same question (0)
  • ivan_apps Profile Picture
    2,187 Moderator on at

    It seems like it’s trying to delete a relationship from a base CRM table. Is there an attribute or a relationship that you deleted from your solution associated with a base table?

     

    I would probably create a microsoft support ticket for this. Unless you can get more details from the failed solution xml/excel file that gives more detail its hard to tell the root cause.

  • Parvez Ghumra Profile Picture
    1,579 Moderator on at

    @DamonUK 

     

    Have you been able to upgrade from the previous version to the new version in any environment at all?

     

    I would recommend reviewing each lookup column in the new version of the solution in your source dev environment, and verify that that corresponding 1:N relationship is also included in the solution. If it's not included, add it in and export as managed again as a new version. Then try importing that to your target environment (either using the single stage "Stage and Upgrade" or the two stage "Import as Holding Solution" followed by "Apply Upgrade"

  • DamonJay Profile Picture
    35 on at

    Yeah, I managed to load the last-good solution into a test environment then push an update to the current version without an issue, which led me to thinking that there is an issue or conflict elsewhere in the production environment.

    All the 1:N relationships are between tables within the solution, no orphans in there.

  • DamonJay Profile Picture
    35 on at

    Thanks Ivan, that was my thought as well from the formatting of the database filename in the error message. The only relationships I've manually created in the past was with the systemuser table, but this related to a separate app/solution which I don't believe has ever overlapped with this one. Not to say it hasn't 'leaked' though.

     

    I've reached out to one of our sys admins about escalating to ms support, if only to find out more about this specific error instance and the underlying cause.

  • DamonJay Profile Picture
    35 on at
    Closing the loop on this one for future googling - this was resolved by MS support after several weeks of digging. Back end problem with an orphaned single entity relationship reference iirc. Nothing at all that could be resolved from our side and not entirely sure what triggered it. Marked ivan_apps as the answer simply cos he was right to punt it to support :-)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard