More errors in log jmix 2.6.0: UIDetachedException after log out

Not only am I getting this error in dev mode: Upgrade to 2.6.0 Gives Copilot Error on Logout - #2 by mbucan
But I also had the ExecutionFailedException: PWA icons generation failed error when doing a production build, which the org.gradle.jvmargs=-Xmx1024M seems to fix.

Now I also get this error after logging out of my AWS deployed/production environment. I think this happens about 1 second after logging out. I believe I have also seen this in dev mode.

I understand these don’t interrupt the user, but we cannot have errors logged that require investigation each time.

Thank you for your help!

Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: 2025-07-13T16:36:21.066Z ERROR 1559545 --- [  UiAsyncTask-0] io.jmix.flowui.asynctask.UiAsyncTasks    : UI async task error
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: java.util.concurrent.CompletionException: com.vaadin.flow.component.UIDetachedException
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:791) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1810) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: Caused by: com.vaadin.flow.component.UIDetachedException: null
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at com.vaadin.flow.component.UI.handleAccessDetach(UI.java:466) ~[flow-server-24.7.5.jar!/:24.7.5]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at com.vaadin.flow.component.UI.access(UI.java:566) ~[flow-server-24.7.5.jar!/:24.7.5]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at com.vaadin.flow.component.UI.access(UI.java:553) ~[flow-server-24.7.5.jar!/:24.7.5]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at io.jmix.flowui.asynctask.UiAsyncTasks$RunnableConfigurer.lambda$runAsync$0(UiAsyncTasks.java:258) ~[jmix-flowui-2.6.0.jar!/:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[na:na]
Jul 13 16:36:21 ip-172-31-35-36 web[1559545]: #011... 5 common frames omitted

@chicojeff I have been struggling to run 2.6.0 almost whole day without success. Getting below error. I wonder if you/anyone else faced the same issue:

2025-07-13T22:44:38.972+02:00  INFO 3436 --- [in-dev-server-1] c.v.f.s.frontend.TaskRunDevBundleBuild   : Creating a new development mode bundle. This can take a while but will only run when the project setup is changed, addons are added or frontend files are modified
2025-07-13T22:44:50.574+02:00 ERROR 3436 --- [in-dev-server-1] c.v.f.s.frontend.TaskRunDevBundleBuild   : Command `/opt/homebrew/bin/node /Users/xx/git/xx/xx/node_modules/vite/bin/vite.js build` failed:
vite v6.3.5 building for production...
transforming...
Comment replacement failed to change anything
✓ 2388 modules transformed.
vite v6.3.5 building for production...
transforming...
✓ 79 modules transformed.
rendering chunks...
computing gzip size...
../build/dev-bundle/webapp/sw.js  65.32 kB │ gzip: 15.90 kB
✓ built in 350ms
✗ Build failed in 10.44s
error during build:
Cannot add property 0, object is not extensible
    at Array.push (<anonymous>)
    at ConditionalExpression.getLiteralValueAtPath (file:///Users/xx/git/xx/xx/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:12270:45)
    at ConditionalExpression.getLiteralValueAtPath (file:///Users/xx/git/xx/xx/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:12262:53)

Well at least yours is working, I have still some work on mine :slight_smile:
The error basically says that something is trying to access your view after it has been detached.
Detachment happens when a view is navigated away, closed or the session has expired.
UiAsyncTasks …
Are you using this
https://docs.jmix.io/jmix/flow-ui/async-tasks.html
or this maybe
https://docs.jmix.io/jmix/flow-ui/background-tasks.html
in your application?

If yes, try to wrap it in
try {

} catch (UIDetachedException e) {
log.warn(“Skipping”)
}

If not, hopefully the Jmix team will know.

Kind regards,
Mladen

Hello,
this looks nasty :slight_smile:
I’m not having this error, but I have an idea.
So, Jmix 2.6 whats new

The following major dependencies have been updated:
* Spring Boot [3.5](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.5-Release-Notes).
* Vaadin [24.7](https://github.com/vaadin/platform/releases/tag/24.7.0).

and when I follow vaadin link
* **Change supported Node from 18 to 20**: Node 20 is the active LTS version for Node. Node 18 will be end of life soon and new libraries like React 19 support Node 20+
and you get some Node related errors, could it be you need to upgrade it to latest version?

Kind regards,
Mladen

Thanks for the ideas. I do not use any jmix async or background tasks, which is why I thought it was strange for the stack trace to start there.

The jmix addons I am using are: auth-server, rest, appsettings, quartz, gridexport, jmxconsole, audit. The other jmix imports are from the initial project creation, which started in jmix 1.x:
image

For your second response, maybe you were replying to getshahzad, but I thought Node was only used during the build process? I confirmed the GitHub action runners I use for the production build are using Node 20.

Doing more testing this morning, I get this error about 1 minute after logging out in dev mode:

2025-07-14T08:56:42.686-04:00 ERROR 16056 --- [  UiAsyncTask-0] io.jmix.flowui.asynctask.UiAsyncTasks    : UI async task error

java.util.concurrent.CompletionException: com.vaadin.flow.component.UIDetachedException
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:791) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1810) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Caused by: com.vaadin.flow.component.UIDetachedException: null
	at com.vaadin.flow.component.UI.handleAccessDetach(UI.java:466) ~[flow-server-24.7.5.jar:24.7.5]
	at com.vaadin.flow.component.UI.access(UI.java:566) ~[flow-server-24.7.5.jar:24.7.5]
	at com.vaadin.flow.component.UI.access(UI.java:553) ~[flow-server-24.7.5.jar:24.7.5]
	at io.jmix.flowui.asynctask.UiAsyncTasks$RunnableConfigurer.lambda$runAsync$0(UiAsyncTasks.java:258) ~[jmix-flowui-2.6.0.jar:na]
	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[na:na]
	... 5 common frames omitted

Hi,

Unfortunately, I cannot reproduce the problem. The stack trace clearly shows that some UiAsyncTasks are trying to execute. Since you were able to reproduce the issue in dev mode, you could try setting a breakpoint and checking what task is trying to run.

Any information that will help reproduce the issue is greatly appreciated.

Regards,
Gleb