Yes, bumping into the glass is one cause.
But in a extreme wet or dry environement they are sensitive for developing some wounds due to the drie or wet atmosphere.
Just like humans that have dry skin that can become sore, or fungues that develop due to moist conditions like athletefeet or diaper rash.
Frogs have that as well, for most tree frogs that need a great contrast in seasons i witnessed this as well.
For my reinwardtii that developed this, it was clearly caused by keeping them in the rainchamber for an extended period of time.
For my tree frogs, when i put them in a rainchamber i give them 3-4 days,
if they didn't do anything i put them dryer again and start over.
In my experience, if they haven't proceeded with the amplexus after 3 days it won't work out that time.