Unless you determine the real cause, there's no guaranty that the parts ordered will fix it.
First, is it a new gun? Are you using the original mags? Does it do this with both mags?
What brand and bullet weight ammo are you using? Is it factory ammo or reloads?
Slide not locking back is a common grip related issue. During recoil, your thumb (or other part of your hand) can make contact with the slide stop preventing it from engaging. Try shooting a few mags one handed.
First, is it a new gun? Are you using the original mags? Does it do this with both mags?
What brand and bullet weight ammo are you using? Is it factory ammo or reloads?
Slide not locking back is a common grip related issue. During recoil, your thumb (or other part of your hand) can make contact with the slide stop preventing it from engaging. Try shooting a few mags one handed.