cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lkaspar
Resolver I
Resolver I

Unable to upgrade or delete solution - environment variable

Hi All,

 

I am running into issues upgrading a solution (PurchaseOrderApproval) in one of our downstream environments. I have attached the log generated during import; I've also attached screenshots of the history/exception message:

 

lkaspar_1-1642542770053.png  

lkaspar_2-1642542918789.png

 

 

Exception message
No environment variable definition found for value id 1870bed3-23bd-eb11-bacc-000d3a6b0464.

 

 

From what I can see in the History, there's about 3 environment variables it is complaining about (there's a total of 6 in the solution).

 

The error message is thrown during the uninstall of the current version (.19). The same error message is thrown when I try to manually delete the solution.

 

At this point I have the original version and the Upgrade version, both of which I cannot delete (or upgrade).

 

lkaspar_3-1642543102020.png

 

 

Things I have tried:

 

1. Deleted all environment variable values in the downstream environment

2. Removed all references of the environment variable from the solution

3. Imported a new solution containing all environment variables of PurchaseOrderApproval

 

I tried to delete PurchaseOrderApproval and PurchaseOrderApproval_Upgrade with each step but received the same error message every time.

 

Something that stood out to me, the environment variable values it is complaining about are different between environments. This is the case even after importing the FixEnvironmentVariables solution.

 

Environment   
Source1870bed3-23bd-eb11-bacc-000d3a6b0464
Target65b1fb57-2378-ec11-8d21-00224814e6a4

 

 

I am not sure what I can do at this point apart from nuking the entire environment?

 

Any help would be greatly appreciated.

17 REPLIES 17
ragavanrajan
Super User
Super User

Hi @lkaspar 

Try this way.  Default everything back to normal and don't delete anything.  

 

In your solution 

1. Choose each type individually 

2. And select add required component. The screenshot below for reference. 

 

ragavanrajan_0-1642650946198.png

 

If the problem persists, again choose each type in your solution  and check the solution layer 

 

ragavanrajan_1-1642651019898.png

2. If you find any unmanaged layer. You can try deleting the unmanaged layer and then upgrade. 

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

lkaspar
Resolver I
Resolver I

Hi @ragavanrajan,

 

Thanks for the response. 

 

The solution is deployed as a Managed Solution, this prevents me from using the 'Add required components' button 

lkaspar_0-1642651821997.png

 

I have removed all the unmanaged layers and tried to upgrade the solution but it still failed.

Hello @lkaspar 

 

For Managed Solution we cannot add Required Component as per Dataverse we can Edit or Modify only Unmanaged Components as shared by @ragavanrajan 

 

If you are having development environment try creating another Solution and Add the required Component and Import as a patch in this Environment.

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

 

abhishekgawde
Helper II
Helper II

@lkaspar , were you able to find a solution to this issue? I am facing the exact same problem. Any leads would be helpful. Many thanks.

 

lkaspar
Resolver I
Resolver I

Hi @abhishekgawde. No solution yet. I have a meeting with Microsoft who are going to investigate. I'll come back and update this thread.

Hi @lkaspar , im facing the same issue. What did Microsoft say?

lkaspar
Resolver I
Resolver I

Hi @abhishekgawde , @MarHas 

 

Unfortunately I don’t have anything to report. They acknowledged the issue and said they would investigate and get back to me.

 

This has since happened to another solution so something is definitely wrong. 

snymanje
Regular Visitor

I'm sitting with the exact same issue. I'm thinking of creating a new environment.

MarHas
New Member

Hello @snymanje ,

 

I registered a ticket to MS about it and they fixed it quickly. If you do the same, you can refer to my old ticket 2201310050001374

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,543)