Trigger has to be cocked before installation and when fitting the unit back safety needs to be pressed down until at least one pin is engaged and the safety held by the trigger unit.
Trigger has to be fired to reset or it wont cock. If trigger hasn't been cocked before installing it wont cock / fire.
One would assume this has been correctly reassembled.
But the OP has stated it developed the fault where it was previously working. I'd suggest something being out of kilter hence my previous comment about a broke guide leg or other comments about worn piston slot etc meaning piston will not go far enough back to engage.
I guess its also possible that a badly bent spring is tipping the piston and catching the nose of the guide or otherwise preventing cocking. A spring can't become coil bound and OP states its been fitted for 4 years or so.