LiveView server as subscriber to a PubSub service

You need to make sure the subscribe is protected by connected?/1 as described here:
[Phoenix.LiveView — Phoenix LiveView v1.2.5]

Use connected?/1 to conditionally perform stateful work, such as subscribing to pubsub topics, sending messages, etc.