Increase Timeout for pac pcf push

Published

If you are using the latest versions of the PowerApps CLI then much of the implementation now uses the new dotnetcore DataverseServiceClient. You may find that you occasionally get the following error when performing pac pcf operations:

The request channel timed out while waiting for a reply after 00:02:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

Previously we could solve this by adding the configuration  MaxCrmConnectionTimeOutMinutes  - but since the move to the Dataverse Service Client, the key has now changed to  MaxDataverseConnectionTimeOutMinutes. We can see this from the source code in GitHub.

To increase the timeout on the PowerApps CLI PCF operations to 10 minutes you need to:

1. Locate the file for the latest version of the Power Apps CLI that will be at a location similar to: C:\Users\YourProfileName\AppData\Local\Microsoft\PowerAppsCLI\Microsoft.PowerApps.CLI.1.6.5

2. Edit the file \tools\pac.exe.config

3. Add the following underneath the startup element:

<appSettings>
  <add key="MaxDataverseConnectionTimeOutMinutes" value="10"/>
</appSettings>

Note: The value is in minutes!

4. Save

5. Ensure you are using the latest version of the Power Apps CLI by using:

pac install latest
pac use latest

Now you should no longer receive a timeout when using pac pcf push ! 🚀

Continue to website...

More from Develop 1 - Dynamics 365 Architecture Services

Related Posts