Exception Cannot invoke com.vaadin.flow.component.ComponentEventListener.onComponentEvent

Hi, any idea why we are getting this error in our error log. Is is not direct connected with our app (no class in stack trace). V24.1.3 + J17.
message.txt (11.6 KB)

It looks like you are passing a null listener to a ShortcutRegistration instance as a shortcut listener

Hm, I have check our code - we are not using any custom tricks - only Vaadin Java code. No plugins. This is all I can find about Shortcut in my code. Any idea how we cound " passing a null listener to a ShortcutRegistration instanc" in our code? Thank you.
image.png

Try to add a conditional breakpoint in ComponentEventBus.ListenerWrapper constructor, to stop when listener argument is null, then inspect the call stack.
You should be able to find from where the null listener comes from

By any chance are you passing the listener to the buttons as a variable that may be null at some point?
e.g.

ComponentEventListener<ClickEvent<Button>> myListener = null;
if (someCondition) {
   myListener = ev -> { ... }
}

....

btn = new Button("OK", myListener);
btn.addClickShortcut(Key.ENTER);