It sounds like an ootheca, an eggcase, that was rejected and expelled. Females will air out their eggsacs to adjust the temp, or when expelling a dud sac. A healthy ootheca will be pulled back inside the female once it is at the correct temperature to continue incubating, unhealthy ones are discarded/eaten.