Some of the canned foam won't react inside a stock, or any enclosure. It reacts with air, no air, no reaction.
I've used the two-part expanding foam, mix equal parts and pour it in. It reacts chemically, and works every time.