-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pending FutureAccess throws CancellationException #13610
Comments
HawkSK
added a commit
to HawkSK/flow
that referenced
this issue
Apr 24, 2022
Ignore CancellationException if the task is cancelled in the meantime. Closes vaadin#13610
9 tasks
mshabarov
added a commit
that referenced
this issue
May 9, 2022
Ignore CancellationException if the task is cancelled in the meantime. Fixes #13610
9 tasks
taefi
pushed a commit
that referenced
this issue
May 13, 2022
Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov
vaadin-bot
pushed a commit
that referenced
this issue
May 13, 2022
Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov
vaadin-bot
pushed a commit
that referenced
this issue
May 13, 2022
Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov
vaadin-bot
pushed a commit
that referenced
this issue
May 13, 2022
Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov
vaadin-bot
pushed a commit
that referenced
this issue
May 13, 2022
Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov
vaadin-bot
pushed a commit
that referenced
this issue
May 13, 2022
Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov
vaadin-bot
added a commit
that referenced
this issue
May 13, 2022
#13779) Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov Co-authored-by: Mikhail Shabarov <[email protected]>
vaadin-bot
added a commit
that referenced
this issue
May 13, 2022
#13778) Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov Co-authored-by: Mikhail Shabarov <[email protected]>
mshabarov
added a commit
that referenced
this issue
May 16, 2022
#13766) Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov Co-authored-by: Mikhail Shabarov <[email protected]>
mshabarov
added a commit
that referenced
this issue
May 16, 2022
#13767) Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov Co-authored-by: Mikhail Shabarov <[email protected]>
mshabarov
added a commit
that referenced
this issue
May 16, 2022
#13765) Ignore CancellationException if the task is cancelled in the meantime. Authored-by: @HawkSK Fixes #13610 Co-authored-by: @mshabarov Co-authored-by: Mikhail Shabarov <[email protected]>
This ticket/PR has been released with Vaadin 23.1.0.beta2 and is also targeting the upcoming stable 23.1.0 version. |
This ticket/PR has been released with Vaadin 23.0.11. |
This ticket/PR has been released with Vaadin 22.0.16. |
This ticket/PR has been released with Vaadin 14.8.13. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug
Some cancelled UI access tasks produce CancellationException that is propagated to
com.vaadin.flow.server.ErrorHandler
.Basically, the problem is, that even though there is a check for
!pendingAccess.isCancelled()
, the state can change to cancelled before execution comes topendingAccess.get();
(line 2075VaadinService.runPendingAccessTasks
). As a consequence, false alarm errors are shown on the UI.Expected behavior
Cancelled tasks should not be run and should not throw CancellationException.
Minimal reproducible example
Sorry, I don't have an easily reproducible example, but the situation is, that the UI receives events from the server. The UI reacts to the event with registering a
UI.access()
callback (f.e. reload data / UI components). It can happen that multiple events of the same type arrive in quick succession, which had previously led to fillingpendingAccessQueue
with a lot of duplicate callbacks - this had resulted in constantly reloading the UI.In some of these duplicate cases we decided to cancel the future tasks of the same type when the event arrives (to prevent filling
pendingAccessQueue
).Otherwise, the future access task is cancelled when the UI component is detached (
onDetach
).Here's an example of the event communication & cancellation. I simplified it a lot, but it's not reproducible, just a showcase.
Versions
The text was updated successfully, but these errors were encountered: