Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure DevOps Pipeline PowerPages Fails #1025

Open
Leuret opened this issue Sep 4, 2024 · 13 comments
Open

Azure DevOps Pipeline PowerPages Fails #1025

Leuret opened this issue Sep 4, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@Leuret
Copy link

Leuret commented Sep 4, 2024

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 Leuret added the bug Something isn't working label Sep 4, 2024
@devonuto
Copy link

devonuto commented Sep 4, 2024

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 }}'

@sebgauthier
Copy link

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

@polks71
Copy link

polks71 commented Sep 5, 2024

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' ]

@devonuto
Copy link

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

@sebgauthier
Copy link

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

@devonuto
Copy link

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

@ManuLeaN
Copy link

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

@Ingogogo
Copy link

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.

@nick626262
Copy link

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.

@WretchedDade
Copy link

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

@sebgauthier
Copy link

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)

@ManuLeaN
Copy link

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?

@MickytHogFather
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants