powerplatform-build-tools icon indicating copy to clipboard operation
powerplatform-build-tools copied to clipboard

Azure DevOps Pipeline PowerPages Fails

Open Leuret opened this issue 1 year ago • 13 comments

Describe the bug Last few days our PowerPages pipeline has started failing. It is giving the following error: Error: Power Pages entities for standard data model (v1) aren't available on this org, please install required packages on this org. If you are trying to upload to enhanced data model (v2), pass model version as "2". For more information see https://learn.microsoft.com/en-us/power-pages/admin/enhanced-data-model#data-model-power-platform-cli-parameters .

It's a V1 portal. The pipeline was working properly before. Logs.txt

To Reproduce Steps to reproduce the behavior:

  1. Run a DevOps pipeline job that deploys portals. It will fail with the error message: Error: Power Pages entities for standard data model (v1) aren't available on this org, please install required packages on this org. If you are trying to upload to enhanced data model (v2), pass model version as "2". For more information see https://learn.microsoft.com/en-us/power-pages/admin/enhanced-data-model#data-model-power-platform-cli-parameters .

Expected behavior The portal to deploy to downstream environments.

Leuret avatar Sep 04 '24 09:09 Leuret

Having same issue using

# Upload Portal https://learn.microsoft.com/en-us/power-platform/alm/devops-build-tool-tasks#yaml-snippet-upload-paportal
- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.upload-paportal.PowerPlatformUploadPaportal@2
  displayName: 'Upload Portal to ${{ parameters.environmentName }}'
  inputs:
    authenticationType: 'PowerPlatformSPN'
    PowerPlatformSPN: ${{ parameters.ppSpn }}
    UploadPath: '${{ parameters.stagingPath }}'
    DeploymentProfile: '${{ parameters.environmentName }}'
    Environment: '${{ parameters.environmentURL }}'

devonuto avatar Sep 04 '24 22:09 devonuto

I can confirm this broke with version 1.34.3 of the CLI 1.33.5 works as expected.

sebgauthier avatar Sep 05 '24 12:09 sebgauthier

This broke in our environment as well. Worked on August 21st but is breaking now today.

From the devops log:

Task : Power Platform Upload PAPortal Description : Power Platform Upload PowerPages web site (PAPortal) Version : 2.0.77 Author : Microsoft Help : https://aka.ms/buildtoolsdoc Ideas, feedback: https://github.com/microsoft/powerplatform-build-tools/discussions .... [ 'Started uploading website data' ] [ 'Connected to... TruNorth' ] [ 'Microsoft PowerPlatform CLI' ] [ 'Version: 1.34.4+gbc3320d' ]

polks71 avatar Sep 05 '24 14:09 polks71

Has anyone managed to find a workaround? Possible to specify a specific version of the build tools?

devonuto avatar Sep 10 '24 01:09 devonuto

I’ve reverted back to deploying locally. Not ideal but it works.

sebgauthier avatar Sep 10 '24 02:09 sebgauthier

Unfortunately our client does not allow that, so we're stuck until a fix is deployed.

devonuto avatar Sep 10 '24 02:09 devonuto

Just to draw more attention to the problem... we also have this exact problem.

ManuLeaN avatar Sep 10 '24 13:09 ManuLeaN

Hello, we have the same problem:

        "Started uploading website data
        Connected to... xxx
        Microsoft PowerPlatform CLI
        Version: 1.34.4+gbc3320d
        Online documentation: https://aka.ms/PowerPlatformCLI
        Feedback, Suggestions, Issues: https://github.com/microsoft/powerplatform-build-tools/discussions
        
        Error: **Power Pages entities for standard data model (v1) aren't available on this org, please install required packages on this org. If you are trying to upload to enhanced data model (v2), pass model version as "2"**. For more information see https://learn.microsoft.com/en-us/power-pages/admin/enhanced-data-model#data-model-power-platform-cli-parameters ."

It worked perfectly fine three weeks ago but when we start our pipeline now this error occours. We didn't change anything on our site. We checked the origin system and the target system and both are v1 and all entites are present.

Ingogogo avatar Sep 10 '24 13:09 Ingogogo

Failing for me on two environments but working on a different one. I guess the environments are subtlety different but it was working on both before.

nick626262 avatar Sep 10 '24 13:09 nick626262

I was having this issue as well and have worked around it by switching to a PowerShell task in ADO temporarily so that I can specify the CLI version. I run commands like the following:

dotnet tool install --global Microsoft.PowerApps.CLI.Tool --version 1.33.5

pac auth create -mi -env XXX

pac pages upload --path XXX --deploymentProfile XXX --modelVersion 1

WretchedDade avatar Sep 10 '24 14:09 WretchedDade

I was having this issue as well and have worked around it by switching to a PowerShell task in ADO temporarily so that I can specify the CLI version. I run commands like the following:

dotnet tool install --global Microsoft.PowerApps.CLI.Tool --version 1.33.5

pac auth create -mi -env XXX

pac pages upload --path XXX --deploymentProfile XXX --modelVersion 1

To build on this, if you need to authenticate using a service connection I use this task to extract the connection info

    - task: PowerPlatformSetConnectionVariables@2
      name: conn
      inputs:
        authenticationType: 'PowerPlatformSPN'
        PowerPlatformSPN: 'service-connection-name-here'

Then you can extract the appId, secret and tenant like so

pac auth create --name UAT-SPN --applicationId $(conn.BuildTools.ApplicationId) --clientSecret $(conn.BuildTools.ClientSecret) --tenant $(conn.BuildTools.TenantId)

sebgauthier avatar Sep 10 '24 14:09 sebgauthier

I was having this issue as well and have worked around it by switching to a PowerShell task in ADO temporarily so that I can specify the CLI version. I run commands like the following:

dotnet tool install --global Microsoft.PowerApps.CLI.Tool --version 1.33.5

pac auth create -mi -env XXX

pac pages upload --path XXX --deploymentProfile XXX --modelVersion 1

To build on this, if you need to authenticate using a service connection I use this task to extract the connection info

    - task: PowerPlatformSetConnectionVariables@2
      name: conn
      inputs:
        authenticationType: 'PowerPlatformSPN'
        PowerPlatformSPN: 'service-connection-name-here'

Then you can extract the appId, secret and tenant like so

pac auth create --name UAT-SPN --applicationId $(conn.BuildTools.ApplicationId) --clientSecret $(conn.BuildTools.ClientSecret) --tenant $(conn.BuildTools.TenantId)

Hey Thanks, that seems to work perfectly on my local machine but for some reason in a pipeline i get the error "Sorry, the app encountered a non recoverable error and will need to terminate." any ideas on how to fix that?

ManuLeaN avatar Sep 18 '24 16:09 ManuLeaN

We had exactly the same problem, in our azure pipeline we were running the "Latest Version" of the CLI and thats where the issue hit! I copied in the version you were running @ManuLeaN on your local and it started magicly working!

Image

MickytHogFather avatar Oct 16 '24 14:10 MickytHogFather