Not enough water would be my guess, especially, if they were planted in ordinary multipurpose compost, as these dry out very quickly when it is very hot, like it was earlier this year. Bags also loose moisture much quicker than pots,
A soil based compost
may have held onto moisture better, as may pots...but that said, June was exceptionally hot
Keep on watering, ideally with a liquid feed occasionally, and fingers crossed your later ones will have a better yield.