M&P 40 not going into battery
I had the same issue with my M&P 40 It did not happen every round but 1-2 times per magazine. It happened with all of my mags so I knew it was not a magazine issue. I also found that if I was shooting a lot at a time (50-100+ rounds) that the issue seemed to go away after about 40 +/- rounds. Weird???
Finally after searching the internet and not finding any solution (but there were other similar reported issues) I contacted S&W and they said to send it in. The return / repair process was frustrating and very long but it did get a fix.
They told me that the extractor was replaced and that the issue was corrected. I was surprised and questioned the extractor being the cause but they said it was now fixed.
I finally got my M&P back from S&W (it took almost 3 months) and sure enough, no more issues. I have fired a few hundred rounds (400-450) through it since and have had zero issues.
Although I was not happy with the process and time involved, S&W did correct the issue and it was covered under their warranty. I also have a full size M&P 9mm as well as 2 Shield 9mm and this issue has not occurred in any of them. The full size 9mm is my IDPA gun and I am VERY happy with it.
I hope this helps shed some light and good luck.