See Unrecognized type 'FSocket' - C++ - Epic Developer Community Forums for a recent example.
The error message does not indicate that the UnrealHeaderTool is looking for USTRUCT or UCLASS.
I also stumbled upon this error message and was confused until I realized it was due to a missing USTRUCT.