Loading...

Decode & Fix : Shared App host initialization has timed out in Microsoft Power Apps

Decode & Fix : Shared App host initialization has timed out in Microsoft Power Apps

 Issue :

While working with apps in the Microsoft Power Platform, we encountered a critical issue where the application failed to load properly. This error appeared intermittently, especially when using custom pages and embedded components.

Shared App host initialization has timed out

Error Log : 

Shared App host initialization has timed out

UciError: Shared App host initialization has timed out at s (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:38:222131) at Object.execute (https://content.powerapps.com/resource/uci-infra-web/scripts/mds.ca217cfe2bc4dbe9b337ff1da6ed7c28.js:4:9805) at https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:669926 at new Promise (<anonymous>) at w._executeAsyncAction (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:669627) at w._executeAsync (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:669471) at w.executeAction (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:668736) at t.dispatch (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:674161) at Object.dispatch (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:934840) at Object.dispatch (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:673586) at dispatch (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:669794) at Object.execute (https://content.powerapps.com/resource/uci-infra-web/scripts/custompage.7d14da912497527952785eaa16d9f3bc.js:4:25788) at https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:669926 at new Promise (<anonymous>) at w._executeAsyncAction (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:669627) at w._executeAsync (https://content.powerapps.com/resource/uci-infra-web/scripts/app.4e71963626213ae9901b5ff59d931193.js:14:669471)


Root Cause Analysis

After detailed analysis, the issue was primarily related to performance and load delays in the app.

Key contributing factors:
  • Heavy data loading during app initialization
  • Complex logic in OnStart / OnVisible events
  • Multiple API calls executed simultaneously
  • Large datasets retrieved from Microsoft Dataverse
  • Custom pages or scripts taking longer to render
As a result, the system exceeded the allowed initialization time, causing a timeout.

Resolution / Fix

The issue was resolved by optimizing app performance.

Key fixes implemented:

Reduced initial data load
  • Loaded only required data instead of full datasets
Optimized queries
  • Used filtering instead of retrieving entire tables
Used Concurrent() for parallel execution
  • Improved performance of multiple data calls
Implemented lazy loading
  • Loaded data only when needed (on demand)
Simplified custom pages
  • Removed unnecessary controls and logic
Reviewed scripts and components
  • Eliminated long-running or blocking operations

Best Practices / Learnings
  • Avoid heavy logic in App OnStart
  • Always use delegation-friendly queries
  • Load minimal data initially
  • Use lazy loading for better performance
  • Regularly monitor app performance using tools
  • Keep custom pages lightweight and optimized
Conclusion:

In conclusion, this issue highlights how important performance optimization is when working with apps in Microsoft Power Platform. Even when the app logic is correct, heavy data loading and inefficient design can lead to critical failures like timeout errors. By focusing on efficient data handling, reducing unnecessary processing during startup, and adopting best practices such as lazy loading and optimized queries, you can ensure a more stable and responsive application. Proactively monitoring and refining performance will not only prevent such issues but also significantly improve the overall user experience.

Published on:

Learn more
Power Platform , D365 CE & Cloud
Power Platform , D365 CE & Cloud

Dynamics 365 CE, Power Apps, Powerapps, Azure, Dataverse, D365,Power Platforms (Power Apps, Power Automate, Virtual Agent and AI Builder), Book Review

Share post:

Related posts

Power Apps- Enhance row summaries in model-driven apps

We are announcing the ability to enhance row summaries in model-driven apps in Power Apps. This feature will reach general availability on Jun...

2 days ago

Calling Dataverse Actions and Functions from Power Apps Code Apps

When building Power Apps code apps, one of the most powerful things you can do is reach directly into Dataverse to trigger business logic. Whe...

2 days ago

Respond to a Power Automate Flow Approval in a Power Apps Custom Page or Canvas App

How to respond to Power Automate approval requests directly within a Power Apps custom page or canvas app, rather than email buttons or in Mi...

4 days ago

Inside Built-In and Custom Copilot UI Widgets powered by Power Apps

Custom app-powered Widgets feels like one of those shifts that will change how we think about Copilot experiences. Until recently, a lot of th...

4 days ago

Video: Transform Copilot With Custom UI Widgets Built In Power Apps

What you’re looking at here in Copilot is an interactive widget that I built with ... The post Video: Transform Copilot With Custom UI Widgets...

6 days ago

How to Automate Project Assignment in Dynamics 365 Using Power Automate and Power Apps Code Apps

This blog demonstrates how to automate project assignments in Microsoft Dynamics 365 using Microsoft Power Automate and Power Apps Code Apps, ...

8 days ago

Microsoft Power Automate – Build better forms with integrated Power Apps

We are announcing the ability to build better forms with integrated Power Apps in Power Automate. This feature will reach public preview on Ma...

16 days ago

Power Apps MCP server introduces closed-loop learning for enterprise agents

Building agents is fast. Teaching them how your organization works has been the hard part. Introducing closed-loop learning on the Power Apps ...

18 days ago

Microsoft Power Apps: A Complete Guide (2026)

In this era of constant change and digitization, it is a genius idea to use the PowerApps development platform to create applications for mobi...

18 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy