Trying to add any activity to existing sequence "an internal error has occured it is recommended to restart UIPath Studio"

I have been working on a rather large automation project and out of the blue this afternoon, whenever I attempt to add an activity of any kind, UiStudio crashes. I rebooted the machine and it allowed me to add one activity (in this case try/catch) and then reverted to the same behavior. It does not matter which element I chose, the behavior is the same.

image

17:36:03.2896 => [ERROR] [UiPath.Studio.exe] [1] System.IO.IOException: Cannot locate resource ‘themes/icons.xaml’.
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.get_ContentType()
at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
at MS.Internal.WpfWebRequestHelper.GetResponseStream(WebRequest request, ContentType& contentType)
at System.Windows.ResourceDictionary.set_Source(Uri value)
at UiPath.Studio.Plugin.Workflow.Services.ActivityIconFinder.GetResourceDictionary(String assemblyName)

Hi @JamesinIT

Is it the Enterprise or Community version? Could you state which one is it?
Also, knowing the activity packages versions could help a little.

Hi,
I am having the same issue. I tried deleting the .json file and re-opening the file but still the xaml file wouldn’t open and it gives the same error. Were you able to find a solution???

It is for the community version in my case. Please help if you can. I tried contacting the support but they didn’t seem keen on helping a community version user.

I have already tried deleting the .json file and the .local file. Still didn’t work.

Error details:

18.4.3+Branch.master.Sha.9888b477be8d3ec8a832306fc59c34ba6edad108

An internal error has occurred. It is recommended to restart UiPath Studio.

Error: System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Activities.Core.Presentation.FlowchartDesigner.SetFlowElementModelItem(UIElement view, ModelItem model) at System.Activities.Core.Presentation.FlowchartDesigner.ProcessAndGetModelView(ModelItem model) at System.Activities.Core.Presentation.FlowchartDesigner.AddFlowElementsToDesigner(IList1 flowElementMICollection, Boolean addConnectorAfterLoaded)
at System.Activities.Core.Presentation.FlowchartDesigner.PopulateFlowchartChildren()
at System.Activities.Core.Presentation.FlowchartDesigner.OnFreeFormPanelLoaded(Object sender, RoutedEventArgs eventArgs)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
at System.Windows.Interop.HwndTarget.OnResize()
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2147467261

It seems like reinstalling Studio and then restarting your machine might solve the issue.