Short Description
When attempting to remove a parameter from an Execute Query (App Integration → Database), the parameter fails to be removed.
Attempting to close the Edit SQL block after this results in an exception causing UiPath Studio to close.
Exception Text:
19.4.2+Branch.master.Sha.e17a3bedca2a7da0d0b716b5f8f765d1d5ef1ddc
An internal error has occurred. It is recommended to restart UiPath Studio.
Error: System.ArgumentException: An item with the same key has already been added.
at System.Activities.Presentation.DictionaryItemsCollection`2.InsertItem(Int32 index, ModelItemKeyValuePair`2 item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Add(Object value)
at System.Activities.Presentation.Model.ModelItemCollectionImpl.AddCore(ModelItem item)
at System.Activities.Presentation.Model.CollectionChange.ApplyInsert()
at System.Activities.Presentation.Model.CollectionChange.Apply()
at System.Activities.Presentation.Model.EditingScope.OnRevert(Boolean finalizing)
at System.Activities.Presentation.Model.ModelEditingScope.Revert()
at System.Activities.Presentation.Model.ModelEditingScope.Dispose(Boolean disposing)
at System.Activities.Presentation.Model.ModelEditingScope.Dispose()
at UiPath.Database.Activities.Design.GenericDatabaseDesigner.SqlButton_Click(Object sender, RoutedEventArgs e)
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.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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 -2147024809
Restarting the app does not appear to have any effect. Likewise, deleting the SQL Query block and recreating it has no effect. I do believe this points to an error in my project, however I’ve noticed the project file does not appear to match what I would expect given the designer. Here’s the relevant xml block and a screenshot of how things appear in my designer.
Restarting the designer as recommended failed twice to produce any changes, which is why I a making this post. On the third time, I opted not to restart and manually deleted the execute query block and saved before manually restarting. After recreating the execute query block, I seem to have achieved a non-error state. So while this is technically resolved, I felt it pertinent to inform the developers to the nature of the issue.