When I’m using hotswap on my project I get continuous page reloads and I don’t understand why. The moment I log in it starts.
You can see how my network console looks like while not doing anything on a page with just a grid and a couple of rows.
When I set a breakpoint in an onAttach method for example, I see that it continuously arrives there.
I’m using 21.0.5 jbr (installed by sdkman) and Vaadin 24.5.2. I followed the instructions on the vaadin documentation to enable live reload in Intellij. The JBR already has the hotswap-agent shipped with it, and I’ve set the additional flags en enable it in the Run configuration.
The page reloading doesn’t happen when I do a regular debug without Hotswap
You can try to set logs at debug level for both Flow Hotswapper ( category com.vaadin.flow.hotswap) and the Hotswap agent Vaadin plugin ( LOGGER.org.hotswap.agent.plugin.vaadin=DEBUG in hotswap-agent.properties) to see what is causing the reload.
Another option is to put a breakpoint in com.vaadin.flow.hotswap.Hotswapper.onHotswapInternal() where triggerClientUpdate is called and check what’s in the classes HashSet.
class com.oriumfit.web.ui.manager.UserOverview$SpringCGLIB$633
class com.oriumfit.web.ui.ManagerPage$SpringCGLIB$637
I see the same in the logs
HOTSWAP AGENT: 09:46:29.364 DEBUG (org.hotswap.agent.plugin.vaadin.VaadinPlugin) - Reloading class com.oriumfit.web.ui.ManagerPage$$SpringCGLIB$$305 because of DEFINE
HOTSWAP AGENT: 09:46:29.364 DEBUG (org.hotswap.agent.plugin.vaadin.VaadinPlugin) - Reloading class com.oriumfit.web.ui.ManagerPage$$SpringCGLIB$$305 because of DEFINE
HOTSWAP AGENT: 09:46:29.395 DEBUG (org.hotswap.agent.plugin.vaadin.VaadinPlugin) - Reloading class com.oriumfit.web.ui.manager.UserOverview$$SpringCGLIB$$305 because of DEFINE
HOTSWAP AGENT: 09:46:29.396 DEBUG (org.hotswap.agent.plugin.vaadin.VaadinPlugin) - Reloading class com.oriumfit.web.ui.manager.UserOverview$$SpringCGLIB$$305 because of DEFINE
HOTSWAP AGENT: 09:46:29.911 DEBUG (org.hotswap.agent.plugin.vaadin.VaadinPlugin) - Reloading class com.oriumfit.web.ui.ManagerPage$$SpringCGLIB$$306 because of DEFINE
HOTSWAP AGENT: 09:46:29.912 DEBUG (org.hotswap.agent.plugin.vaadin.VaadinPlugin) - Reloading class com.oriumfit.web.ui.ManagerPage$$SpringCGLIB$$306 because of DEFINE
When I click around in the app, this basically changes to whatever page I’m on, and it’s parent.
I don’t see anything that refers to why it’s happening though :/