Ezekiel chapter 32 has similar language, "When I snuff you out, I will cover the heavens and darken their stars; I will cover the sun with a cloud, and the moon will not give its light. All the shining lights in the heavens I will darken over you..." (verses 7 & 8). Note Isaiah 5:25-30 and chapter 13 (verse 10 has similar language).
In Micah chapter 3, "the day will go dark" (verse 6) for the prophets who lead the Lord's people astray. Also note chapter 4!
If the death & destruction during the first, second & third trumpet are the result of volcanic eruptions, then there is a good chance the darkening of the sky in 8:12 is also the result of a volcanic eruption.