Minecraft wiki entry for bossbar, associated text: Specifies the set of players to whom the bar is visible.
Must be a player name, a target selector or a UUID. And the target selector must be of player type.