ChannelActiverecommended, while in the server context handlerAddedthey ChannelActiveare called one after another, when you transfer the handler to the client side, it handlerAddedis called before the call ChannelActive, which makes your code an error, since the record does not work until the channel is active.
Q handlerAdded: channel().isActive() there is either true or false
ChannelActive: channel().isActive() *
, channel().isActive() .