web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Error when uploading S...
Power Pages
Answered

Error when uploading SPA to Power Pages while server logic is present

(1) ShareShare
ReportReport
Posted on by 136
Hello everyone!
 
I'm having some issues with uploading a single-page application to Power Pages, and wonder if there's anyone who's got the same problem, and has found a better solution. 
 
I've followed the steps in the documentation described here: Create and deploy a single-page application in Power Pages | Microsoft Learn
 
I've successfully managed to upload the site several times, but once in a while I get this error when trying to use the pac pages upload-code-site command:
Sorry, the app encountered a non-recoverable error and will need to terminate. The exception details have been captured and will be forwarded to the development team, if telemetry has been enabled. Session Id: [ID], Exception Type: System.AggregateException
 
2026-03-19 14:35:21.7516 | ERR | bolt.module.paportal.PortalDataImporter :: System.AggregateException: One or more errors occurred. (The given key 'adx_serverlogicid' was not present in the dictionary.)
 
The first time was March 19, and it also happened today, 21 April. I've successfully managed to both download the site settings and upload the app with changes several times during this period, and haven't done anything differently that I'm aware of. 
 
Both of the times, this was the only thing that worked for me:
1. Delete all server logics in the Power Pages studio (Set up > Server logic)
2. Run the pac pages download-code-site command
3. Build the app locally 
4. Run the pac pages upload-code-site command
5. Recreate the server logic in Power Pages studio 
6. For new changes, upload the app directly without downloading site settings first - now it's working!
 
This seems like a bug to me, since it's working again after deleting the server logic before the first upload. Anyone found a better solution? 
 
Categories:
I have the same question (0)
  • Verified answer
    11manish Profile Picture
    1,381 on at
    This is very likely a PAC CLI bug related to Server Logic metadata handling.
     
    Your workaround works because it:
    • removes corrupted references
    • forces clean metadata regeneration
  • StineN Profile Picture
    136 on at
    Thank you, @11manish!
    I updated the PAC CLI from version 2.4.1 to version 2.6.4, and tried downloading the site settings again (including server logics) and then uploaded. It worked! 

    It seems like there's been some issues with the PAC CLI, so yeah, it's probably just a bug. Hope it's worked out now. Thanks again!
    Known issue: pac code commands fail in PAC CLI v2.5.1 and v2.6.3 · microsoft/PowerAppsCodeApps · Discussion #297 · GitHub

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 61

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 40 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 26

Last 30 days Overall leaderboard