Ensure exactly one face is selected

You have a group in your selection, that’s the reason why you receive that answer.
Faces and edges are inside the group.
Change Sketchup::Face by Sketchup::Group in grep method and see the difference.