I know I go to lengths not to use one component foams if there is any way to use a 2 component. 1 component foam cures by using moisture in the air as a catalyst. That means it really isn't a good option for packing foam. If you put it on or in anything in a bead (or pile in a box, in your case), the outside will cure and seal the moisture out and the inside will remain semi-liquid. Ideally, you would layer it an inch at a time and wait for whatever cure time it says on the can goes by before applying another layer, but you may have better luck just cutting up some styrofoam blocks to fit the component and the box.
Next question will be where do you get 2 component foam. There are some small Fomo Foam kits at
formatting link
that do like 15 or 20 board feet (sq. ft. @ 1" thick) for smaller jobs and Tiger Foam kits are good for bigger jobs. This kind of foam is really too expensive to use as a packaging foam, unless there's a good profit built into the product. Although, I did once see an airplane fuselage, looked like a lear jet, crated up and they had 2 guys each with a foam kit just pumping it into the crate. They had a pallet of the foam there. I talked to them and they said that they would use the whole pallet to ship that one fuselage. I commented that their must be a good profit margin in selling fuselages if the packing foam cost $5,000 or more! I'm in the wrong business.
To get back to your question, bad can, wrong application, get some styrofoam and pack it tight. Shoot the can and enjoy life!
abi