“Sequence contains no matching element” when typing open curly bracket

Whenever I go to type an opening curly bracket, I get the error "Sequence contains no matching element. It doesn’t happen if I just type it into nothing, it has to be some kind of text field, whether it be in an assign, a log message or whatever. It’s happening across projects, but it doesn’t happen in a freshly made, empty project. I saw another post where it got fixed by opening another project here. That didn’t work for me though. I don’t have a dummy project where it happens, but I do have several regular projects where it does. I can clean it up and send it if that’s necessary.

@loginerror asked to be notified if it happened again, so I thought I’d throw out a tag.

If it helps, this is the log from the error:

21.4.5+Branch.support-v21.4.Sha.31d3be059a971ae7159b5b4a841a4327a74b8179

Sequence contains no matching element

Error: System.Exception: Sequence contains no matching element
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at UiPath.Studio.Plugin.Workflow.ExpressionEditor.Completion.CustomCompletionListBox.TryToggleFilterButton(Int32 shortcutKey)
at UiPath.Studio.Plugin.Workflow.ExpressionEditor.Completion.CustomCompletionListBox.CompletionSessionBehavior_PreviewKeyDown(Object sender, KeyEventArgs e)
at UiPath.Studio.Plugin.Workflow.ExpressionEditor.Completion.CompletionSessionBehavior.NotifyKeyDown(IEditorView view, KeyEventArgs e)
at UiPath.Studio.Plugin.Workflow.ExpressionEditor.Completion.CustomVBCompletionProvider.NotifyKeyDown(IEditorView view, KeyEventArgs e)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.ProcessKeyDown(KeyEventArgs e)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.OnKeyDown(KeyEventArgs e)
at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
at System.Windows.Input.KeyEventArgs.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.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
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 -2146233079

Hi @triban

Would you mind sending over one of those cleaned up projects (either here or via a private message to me @loginerror)?

It might also be that updating to the latest 21.10 version of Studio might resolve the issue, if that is an option for you.

There must be something in the xaml file code of an older project that is causing this. Just to double check - could you create a new project, then drop one of the problematic xaml files into that project folder and then open the broken file under that new project and see if it reproduces?

Hi @loginerror,

Of course now that I’ve made this post, none of my workflows do it anymore, even though it’s been happening more or less every time I had to do a curly bracket. I can’t update Studio as the version is controlled by other people and stuff needs to be whitelisted. We only just updated to this version after running 19 something for over a year.

If this happens again, I’ll try and isolate it somehow or just see if I can reproduce it in a cleaner environment. Can I pm you with it if it occurs again?

1 Like

@triban

Maybe you can relate this issue with the below thread

check for your reference too

Thanks

@Srini84,

If you look a little closer, you’ll see that that’s the post I referenced in my original post :slight_smile:

:sweat_smile:

Absolutely.

Perfect, thanks so much!