Increase Timeout for pac pcf push

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:

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

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 ! 🚀

Comments are closed