How to fix "UiPath.Studio.Forms.Runtime.FormsRuntimeException: Could not display the form" error

Why is customer getting a "UiPath.Studio.Forms.Runtime.FormsRuntimeException: Could not display the form Form [FORM ID] (NavigateTimeout)" error when trying to use a Show form activity.

Issue Description

When trying to run a "Show Form" activity, one or more machines run into the following error:

UiPath.Studio.Forms.Runtime.FormsRuntimeException: Could not display the form Form [FORM ID] (NavigateTimeout) at UiPath.Studio.Forms.Runtime.WinForms.BrowserStates.Common.LoadPageBase.SetUrlAndWaitLoaded(Uri uri) at UiPath.Studio.Forms.Runtime.WinForms.BrowserStates.FormIo.LoadFormIoHost.Load() at UiPath.Studio.Forms.Runtime.WinForms.BrowserStates.WindowLoaded.NavigateTo(FormEntry entry) at UiPath.Studio.Forms.Runtime.WinForms.BrowserStates.WindowLoaded.NavigateIfFormAvailable() at UiPath.Studio.Forms.Runtime.WinForms.BrowserController.Show(IRootWindow parentForm) at UiPath.Studio.Forms.Runtime.WinForms.EngineStates.InitializedBehavior.Show(ShowFormArgs args, IWindowsFormsExecutionService service, IRootWindow rootForm) at UiPath.Studio.Forms.Runtime.WinForms.EngineStates.WarmingUp.Show(ShowFormArgs args) at UiPath.Studio.Forms.Runtime.WinForms.EngineStates.InitializeApplication.Show(ShowFormArgs args) at UiPath.Studio.Forms.Runtime.WinForms.WindowsFormsExecutionService.Show(ShowFormArgs args) at UiPath.Forms.Activities.Base.ShowFormActivityBase.ShowAsync(ShowFormArgs args, CodeActivityContext context) at UiPath.Forms.Activities.Base.ShowFormActivityBase.ExecuteAsync(ShowFormArgs args, TaskCompletionSource`1 tcs, CodeActivityContext context) at UiPath.Forms.Activities.Base.ShowFormActivityBase.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity`1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager

Root Cause

The issue is caused due to a discrepancy with the WebView2 expected to be used with the Forms.Activities package, and the WebView2 version found in the system:

  • When upgrading the Forms.Activities package, the newer activities might require the newest version of WebView2.
  • If only certain machines have this issue, the WebView2 version found in each machine could be different. To find this, you can go to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}

Resolution

Download and install the latest version of WebView2 on all of the machines that will run Forms activities with the following link: Microsoft Edge WebView2 | Microsoft Edge Developer.