The Giants’ struggles and the Yankees’ surge both continued Friday night as San Francisco shortstop Brandon Crawford committed an eighth-inning throwing error that helped New York generate the tiebreaking run in a 3-2 victory. It was San Francisco’s season-high sixth consecutive loss.