What type of spray are you using?
Here are some "types" I guess you could say.
Appliance, Chalkboard, Epoxy Enamel, Frosted, High Heat, Lacquer, Stain Fix, and Vinyl.
Depending on what material you are using, you need to get the correct spray.
For instance, when I was working on my power ranger helmets, the primer kept cracking and getting all wavy. I thought nothing of it, and sprayed a layer of paint. The primer went through it and it look cracked. The primer "ate" through the paint.
Turns out, I use the wrong type of spray for resin based castings. The answer to fix my problem....epoxy enamel primer and paint. Originally, I used a car automotive primer, but that does not stick well with resin based items, or at least the one I bought.
The best solution is to figure out what "sticks" well with your castings.
For most people, that paint models and casts, epoxy is best, but lacquer can work, if it's like foam, but again u need to figure out what "sticks" best.