Step 1,
Pull back on the charging handle and make sure that the face of the bolt stops 1/8" to 1/4" in front of the back edge of the ejection port window, and during the last inch'ish of the pull, the charging handle tension does not increase from either too long of a recoil spring that is binding up, or a too long butt stock screw that is protruding into the back void of the receiver extension. A-1 butt stock bolt is 3/4" shorter than a A-2 butt stock bolt since the A-1 does not use the tube end spacer.
With that out the way, make sure that the gas block is correctly indexed with the gas port, and that the block is not leaking between the barrel or the gas tube. Hence the quick way to check for leaks and to make sure gas block passage to gas port (and the gas tube has been installed correctly so it bottom side port is aligned with the blocks gas port. CLP around the front and back of the block to the barrel, block to the gas tube, then using a piece of rubber tubing, pressuized the gas tube from withing the receiver to around 100lb of air pressure from a compressor. On the bolt to make sure that bottom of the key is not leaking from the top of the carrier, CLP around the base of the key, hold the bolt inward, and 100lbs of compressed air into the front of the key.
Now if we can weed these out as not being the problem, next is to remove the bolt from the carrier, and with the carrier with key, dry fit it into the upper receiver. The will tell you if the key is too wide for the upper receiver slot to cause binding, and even if you have the gas tube correctly indexed for the carrier key as well.
Lastly, while you have the CLP out, break out a chamber brush and start with cleaning the chamber by hand with it and the CLP, move on to cleaning the bore, then once you have to two cleaned and dry, make sure to clean the rest of the rifle with CLP as well (including the buffer, tube, and recoil spring as well. Once you have correctly lubed the upper receiver bearing areas, then it time for the stroke test.
Note, once you scrubbed the chamber clean and it and the bore are dry, shine a light in to the chamber to confirm that the chamber wall conditions are smooth as mirror glass. Hence not reamer chatter that has produced either ridges or grooves in the chamber.
Now the stroke test, Hence the first round fired out of the correctly cleaned and lubed rig should be with only a single round in the mag, the round charged with the empty mag still in the well, and with the loaded round fired, the bolt should be locking back on the bolt catch. If the bolt does not lock back, then time to go back and check for blocks/leaks in the gas system, if the correct buffer parts are in play, and even parts binding up that are not allowing the rifle to correctly stroke instead.