Rifle randomly stops firing

Initially, the battery is disconnected. I connect the battery, turn off safety and pull the trigger, and nothing happens. I try several times, I switch firing modes back and forth- and still nothing happens? I disconnect the battery and reconnect it again, and then the rifle shoots a single bb and then doesn’t do anything when I pull the trigger again. I try disconnecting and reconnecting the battery, and it has no effect- and then I switch to full auto and it fires fine for a bit, and then it stops and starts… the rifle is an Army Armament SA80 so it could just be bad manufacturing, or does it have to do with some connection not fully connecting- idk any help would be appreciated.

Edit: sorry for not stating this previously- the rifle is a rifle I bought used from the boneyard. It seemed from the description that the seller had had the same problem.