Close but no cigar
Fall just short of success and get nothing for the effort, an American expression for which the earliest citation is the script of the 1935 movie Annie Oakley, “Close, Colonel, but no cigar.” Fairgrounds and carnivals used to give out cigars as prizes.