Updating from 3.x track
If you’re currently tracking 3.x/edge or 3.x/stable, you’ll have to first refresh to the latest revision. In other words your Rocket.Chat version must be 3.18.3 (latest in 3.x track) before you can switch to 4.x/stable or 4.x/edge channels.
sudo snap refresh rocketchat-server
Once this succeeds,
sudo snap refresh rocketchat-server --channel=4.x/stable
If you want to track edge then change the channel to 4.x/edge.
Upgrading from 2.x or latest track
If you’re still on track 2.x, you must first upgrade to 3.x before you can move to 4.x.
sudo snap refresh rocketchat-server --channel=3.x/stable
sudo snap refresh rocketchat-server --channel=4.x/stable
Again change to edge if neccessary.
Without being at the latest revision of 3.x, current installs cannot upgrade to 4.x. If you attempt to do so you’ll see an error like this -
error: snap "rocketchat-server" is not available on 4.x/stable