com.vaadin.flow.server.communication.rpc.MapSyncRpcHandler and com.vaadin.f

Hello!

I see following in my server console (see Screenshot toot):

19:13:48,458 WARN [com.vaadin.flow.server.communication.rpc.MapSyncRpcHandler]
(default task-23) Property update request for disabled element is received from the client side. The property is ‘value’. Request is ignored.
19:13:48,458 WARN [com.vaadin.flow.server.communication.rpc.MapSyncRpcHandler]
(default task-23) Property update request for disabled element is received from the client side. The property is ‘value’. Request is ignored.
19:13:48,458 WARN [com.vaadin.flow.server.communication.rpc.MapSyncRpcHandler]
(default task-23) Property update request for disabled element is received from the client side. The property is ‘value’. Request is ignored.
19:13:48,552 WARN [com.vaadin.flow.server.communication.ReturnChannelHandler]
(default task-23) Ignoring update for disabled return channel: {“type”:“channel”,“node”:1681,“channel”:0,“args”:[null]
}

How can I find this.

Thank you very much,
Thomas
18034780.jpg

Hi Thomas. The warning bloat in logs means that the server has received updates for the properties named there for components (elements) that are disabled (eg. with component.setEnabled(false), meaning that the user should not be able to interact with them, but for some reason something there is something changing the state on client side and sending updates to the server side.

The server is ignoring the updates as a security feature, but logging this since it should not really happen. So to know more, you need to figure out what is the disabled part and why are there updates coming from the client side.

Hi Pekka,
we encountered a similar problem (using Vaadin 14.2.0.alpha6)

You wrote

but for some reason something there is something changing the state on client side and sending updates to the server side.

What can be such a reason? All of the component handling is done on the server side. What can cause such a change on the client side?

Same issue here.

However, I’m wondering, if this can be related to slowdown of page-rendering. For more complex form it takes 13s to load the page. Rendering phase is about 8s.

I’ve been having this for a long time now, I always ignored them. I have many layout nestings and I have different businesslogic rules for disabling any of them, so I always just assumed it was because some side effect from vaadins own inheritance logic for the disabled attribute discussed [here]
(https://github.com/vaadin/flow/issues/3538)

This is not just about setEnabled. I removed all setEnabled lines from code, so in logs I do not see:
Property update request for disabled element is received from the client side. The property is 'value'. Request is ignored

however, I still have

2020-04-09 10:01:28,333 WARN  [http-nio-8080-exec-9]
 com.vaadin.flow.server.communication.ReturnChannelHandler: Ignoring update for disabled return channel: {"type":"channel","node":132,"channel":0,"args":[null]
}
2020-04-09 10:01:28,334 WARN  [http-nio-8080-exec-9]
 com.vaadin.flow.server.communication.ReturnChannelHandler: Ignoring update for disabled return channel: {"type":"channel","node":132,"channel":2,"args":[null]
}
2020-04-09 10:01:28,335 WARN  [http-nio-8080-exec-9]
 com.vaadin.flow.server.communication.ReturnChannelHandler: Ignoring update for disabled return channel: {"type":"channel","node":266,"channel":0,"args":[null]
}
2020-04-09 10:01:28,335 WARN  [http-nio-8080-exec-9]
 com.vaadin.flow.server.communication.ReturnChannelHandler: Ignoring update for disabled return channel: {"type":"channel","node":266,"channel":2,"args":[null]
}

etc.

First of all, It is not my error, when I set some component as disabled. but I want to set some value in disabled component. That should be correct behaviour (e.g. calculated value, that user should not be allowed to change, but should be displayed in textfield)

Second … what is the cause of Ignoring update for disabled return channel?

OK, here is the cause: https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/server/communication/ReturnChannelHandler.java

        if (!node.isEnabled() && channel
                .getDisabledUpdateMode() != DisabledUpdateMode.ALWAYS) {
            getLogger().warn("Ignoring update for disabled return channel: {}",
                    invocationJson);
            return Optional.empty();
        }

but I still don’t understand how to avoid that.

btw: that message should have level DEBUG, not WARN. Warn is error we can handle somehow. Either this is correct, or when incorrect, should be written how to avoid this behaviour.

OK, here is the cause: https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/server/communication/ReturnChannelHandler.java

        if (!node.isEnabled() && channel
                .getDisabledUpdateMode() != DisabledUpdateMode.ALWAYS) {
            getLogger().warn("Ignoring update for disabled return channel: {}",
                    invocationJson);
            return Optional.empty();
        }

but I still don’t understand how to avoid that.

btw: that message should have level DEBUG, not WARN. Warn is error we can handle somehow. Either this is correct, or when incorrect, should be written how to avoid this behaviour.

I leverage the following workaround (Spring boot application):
application.properties

	# Suppress WARN  c.v.f.s.c.ReturnChannelHandler - Ignoring update for disabled return channel: 
	logging.level.com.vaadin.flow.server.communication.ReturnChannelHandler=ERROR
	# Suppress WARN  c.v.f.s.c.rpc.MapSyncRpcHandler - Property update request for disabled element is received from the client side. 
	logging.level.com.vaadin.flow.server.communication.rpc.MapSyncRpcHandler=ERROR

It seems like this issue might be related: https://github.com/vaadin/flow/issues/3147