diff --git a/flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java b/flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java index 62b52be34c7..b2902aaf4ac 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java @@ -42,6 +42,7 @@ import java.util.Optional; import java.util.ServiceLoader; import java.util.Set; +import java.util.concurrent.CancellationException; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.Future; @@ -2063,6 +2064,10 @@ public void runPendingAccessTasks(VaadinSession session) { try { pendingAccess.get(); + } catch (CancellationException ignored) { // NOSONAR + // Ignore canceled UI access tasks exceptions and don't + // let it to be processed by the error handler and shown + // on the UI } catch (Exception exception) { pendingAccess.handleError(exception); }