Epoxy does have a shelf life. Usually a couple years. If it hardens
completely though, then it’s working fine. If part was soft and part
was hard, blame your mixing. Not mixed well enough. It’s easy enough
to miss a little bit on your mixing surface.
As to the margarine lids, while they’re a nice disposable surface,
epoxy won’t stick to it. Nylone, teflon, plastics like that, can be
hard to glue with epoxies… Plus, chances are, your lids are nowhere
near chemically clean. Through the dish washer, I’d expect films of
either soap or the water spot preventing rinse additives, for example.
Be aware, also, that many epoxies are quite sensative to having the
right proportions of the two resins. With some, that specify equal
parts, if you’re off by as little as ten percent, the bond strength
can be cut in half or more. The best bet, for critical joints, is to
weigh the glue. I use a small carat scale on the bench. Put a piece
of paper (I use 3 x 5 index cards) on the weighing platform, and tare
the scale. Dispense one resin, tare again, then dispense the second
resin in the same amount. since typically one resin is more viscous
than the other, it can easily appear that you’ve the same amount,
when in fact you don’t.
Hope this helps.