I was trying to make a command block device when I found this out. Entities that are not players are unable to be accessed by the @r selector by name. For example, /say @r[type=Villager] will work, as well as /say @r[name=bernie] if bernie is a player. However, if bernie is not a player, this will say incorrect UUID or that that player could not be found. See images for confirmation.
@r needs a type. By default, it's
.
will look for players named "bernie". Did you try
?