Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Multiple Issues After Updating a Solution: Was Using Env Vars, Then I Removed the Env Vars From the Solution

(0) ShareShare
ReportReport
Posted on by 134

I have a canvas Power App and multiple Power Automate Flows in a Solution. The Solution was used to migrate the app and flows from dev env to prod env.

Originally the solution utilized environment variables. The original solution was created a while back and I don't recall why I decided to delete the environment variables from the solution but I did and republished the Solution sans env vars. I then successfully published the solution and imported it into the production environment without issue. Although the Solution was successfully migrated to the prod env a few months ago, out of the blue it threw this error when users tried to access the app yesterday.


"Sorry, we didn’t find that app." & "The value for environment variable 'new_shared_sharepointonline_6763ce11d8f1456b833d6bb506bab82a' was not found in the environment."


When comparing the DEV vs PROD env Solutions, I also noticed there was a missing Office 365 Outlook connector in the PROD env so I added the missing Office 365 Outlook connector. Next, I edited the Power App and while it had a Office 365 Outlook connector, I deleted it and added it back just to be sure. But when I saved and tried to publish, it threw this error.


"Didn't publish."
"The request failed with error: '{"error":{"code":"0x8004f036","message":"The dependent component EnvironmentVariableDefinition (Id=new_shared_sharepointonline_6763ce11d8f1456b833d6bb506bab82a) does not exist. Failure trying to associate it with CanvasApp (Id=412c60a3-0091-489f-b123-51508179289d) as a dependency. Missing dependency lookup type = EntityNameLookup."}}'. The correlation Id is '2914bd16-5d4b-461a-a389-4d3ef7c2642f'."


So I can't publish the new version and users can't access the app in the prod env. If I can't ge this resolved, then I think I have to create a new solution (no env vars) and add back the app and flows. Then delete the Solution in the prod env and import the new Solution.


The other clue is the prod canvas app has no dependencies. Any recommendations?

Categories:
  • zoso2112 Profile Picture
    zoso2112 134 on at
    Re: Multiple Issues After Updating a Solution: Was Using Env Vars, Then I Removed the Env Vars From the Solution

    Thank you @BhaskarDhone for the great information.  I got it worked out using these steps. 

    DEV
    1. Delete existing solution:
    a. Remove each Flow one at a time from the Solution
    b. Remove Power App
    c. Delete env vars (delete all except '**** DEV')
    d. Remove connections (not delete)

    2. Create new '**** App' solution and add canvas app
    3. App update to 'Add env vars when data src added', remove and add back data sources
    4. Add 6 Flows
    5. Export New Solution


    PROD
    1. Delete existing solution:
    a. Remove each Flow one at a time from the Solution
    b. Remove Power App
    c. Delete env vars (delete all except '**** DEV') - No env vars present
    d. Remove connections (not delete)
    e. Delete the Solution

    2. Delete the Flows from env
    3. Delete the app
    4. Import new solution
    5. Publish app

  • Verified answer
    BhaskarDhone Profile Picture
    BhaskarDhone 784 on at
    Re: Multiple Issues After Updating a Solution: Was Using Env Vars, Then I Removed the Env Vars From the Solution

    It seems your application was using SharePoint connection environment variables. Try to follow below steps.

    1. Edit application

    2. Remove all datasource and add it again. While adding make sure it should create environment variable automatically. 
    Follow this articles

    Use data source environment variables in canvas apps - Power Apps | Microsoft Learn

    3. Publish the app.

    4. Go to solutions , click on three dots --> Advanced --> Add Required Objects

    This will add if any connection reference is missing.

     

    Do the same for other components like power automate , powerapps etc. ( From step1 to Step 4)

     

    5. Publish All customization

    6. Export Solution

    7. Import Solution , during import it will prompt from providing values for connection reference. Select pro specific values.

    This should solve your problem.

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,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard