Empty multicast group error


Chirpstack-application-server throws error if no device is added to multicast group inside the UI. It is expected that multicast-group contains at least one device. Service restart fails and cannot recover if multicast-group is empty. I read the commit log (df4ef7) but still don’t understand the reasoning behind this. If user does not add any device to multicast-group, no error is thrown at UI also. When service is restarted , user cannot reach UI interface as the service is in failed state. Probably, only way to restart service is deleting the multicast group from postgresql with psql scripts.

I think, user must be forced to add a device when a multicast group is created.

The code snippet below causes the error.

chirpstack-application-server\internal\storage\migrations\code\multicast_group_validation.go > validateMulticastGroupDevices()

	for _, item := range items {
		if item.Count == 0 {
				"multicast_group_id":   item.ID,
				"multicast_group_name": item.Name,
			}).Fatal("Multicast-group does not contain any devices. Please read the changelog why you are seeing this error.")

Please note that this error is raised in case of a data migration. Without any device, ChirpStack doesn’t know to which application it must migrate the multicast-group: