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 662200837a8..9f2e66d3e72 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 @@ -38,6 +38,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; @@ -2059,6 +2060,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); }