intermitant crank/no crank on 2002 Pontiac Firebird

intermittantly will not crank, will always start if I turn the key enough reciprocations. relay clicks, keyswitch had error codes, it was changed.

2 answers 2 comments
Mine had similar problem and it turned out to be the anti-theft circuit in the key. My key has small black slug with contact strip in center
You may have faulty starter motor in your 2002 Pontiac Firebird causing your intermittent no crank condition.
forgot to mention the starter motor was replaced first, old starter motor tested on bench just fine, problem exactly same as before changing starter.
My car did this and the dealer replaced the battery cable, it was corroded about 6-8 inches up the cable. Hasn't done this since, of course the battery cable and replacement was about $300