Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Not able to publish canvas app after deleting an environment variable from the solution

(1) ShareShare
ReportReport
Posted on by 50

I've created an environment variable and added it to a canvas app and later decided to remove the data connection and hence deleted the EV from the environment. Then when I tried to publish my canvas app, it gave me an error citing the dependency to that deleted environment variable even though I've removed it from the app as well.

 

"The request failed with error: '{"error":{"code":"0x8004f036","message":"The dependent component EnvironmentVariableDefinition (Id=new_PAR_SPList_SectionOwners) does not exist. Failure trying to associate it with CanvasApp (Id=105f8844-cc0b-4d39-b0ce-c2d9724c08eb) as a dependency. Missing dependency lookup type = EntityNameLookup."}}'."

 

The highlighted text in bold above is the name of the environment variable that has been deleted from the environment and it did not just get removed from the solution. The order in which the removal took place is as follows:

 

  1. Deleted the environment variable from the environment by going into the solution.
  2. Removed the data connection in the canvas app.
  3. Tried to publish the app and then the issue occurs.

Please shed some light on how this issue could be resolved as there is limited  guidance on the web.

Categories:
  • danru Profile Picture
    danru 95 on at
    Not able to publish canvas app after deleting an environment variable from the solution
    Hi,
     
    I did the same thing and am getting the same error: 
     
    The request failed with error: '{"error":{"code":"0x8004f036","message":"The dependent component Entity (Id=c00_title) does not exist.  Failure trying to associate it with CanvasApp (Id=de6bd968-e985-4a2b-93cd-e9d6b111d5d3) as a dependency. Missing dependency lookup type = EntityNameLookup."}}'. The correlation Id is '18aa5023-14dd-495c-bdc4-9767aafa5e67'.
    
    Session ID: 9e15e380-8f7c-44f2-b330-27a46258490a
     
    This is in my sandbox environment in an unmanaged solution. I removed the environment variables from the environment.
     
    I tried to the remove the datasource in the powerapps studio and readd it- didn't work.
     
    Is there a way to fix this?
     
    Thank you.
     
    Regards,
     
    Daniel
  • MilesTone Profile Picture
    MilesTone 64 on at
    Re: Not able to publish canvas app after deleting an environment variable from the solution

    I have had this issue, and resolved it by deleting the connections and recreating them. My Canvas app is set to automatically create environment variables. so when I recreated the connections it fixed the issues with missing variables.

  • Verified answer
    yvsuhas Profile Picture
    yvsuhas 50 on at
    Re: Not able to publish canvas app after deleting an environment variable from the solution

    @Shujaath_Khan - Thank you for the references.

     

    I've used the solution approach from the beginning and cleared the cache multiple times. The deleted environment variable reference is present in the unmanaged layer of the canvas app under "cdsdependencies" and "connectionreferences" properties. I've tried exporting the solution and editing the customizations.xml to remove the references and zipped the package and imported it again. This approach worked for me and I was able to finally publish the app after importing the new version.

  • Shujaath_Khan Profile Picture
    Shujaath_Khan 1,111 on at
    Re: Not able to publish canvas app after deleting an environment variable from the solution

    Hi @yvsuhas 

     

    Similar thread on deleting on environment variables here : 

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-delete-environment-variables/td-p/757271

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Removing-Environment-Variables/td-p/1211048

     

    Suspect some traces of variable may be present, recommend to have your PowerApp as part of solution.

    try clearing cache in browser

     

    Hope it helps.

    Thanks

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard