So i bought my wife a newer car to get rid of her terrible mustang and now its backfiring on me. I bought the car about 5 months ago and it has only ran for 3 of those months. It is an 03 sentra ser spec v. Things ive replaced so far are all gaskets on the top end (including headgasket) both oxygen sensors, thermostat's, brakes all the way around, spark plugs, timing chain tensioner, and many other things not engine related. I followed the instructions on this site that i found to do the headgasket. I got the ajusa headgasket set and arp head studs. After i replaced it i put it all back together and it ran good, and kinda had a rough idle but it always had a rough idle since we got it. After two days of driving it with no isues she went out to drive it to work and she has a very hard time starting and it idles terribly, it doesnt seem to have an issue revving but it pops alot. It shows p0300 random cylinder missfire as the only code although i did notice that its reading ignition advance pegged around 27-28 degrees at idle, wich is way too high. I have checked and the previous owner replaced the cam and crank position sensors over to the metal ones. I have not fucking clue how this could happen, i own a 07 civic si and a 91 240sx and neither one has given me as many issues as this car since day one. Im pretty shure its not something mechanical since it didnt happen immediatly after i started it after doing the headgasket, and the car ran and drove fine for two days with no codes after that. Ive tried looking all over the place and the only two things i seem to be pointed towards are bad coils or a bad ecu. If anyone knows something to look for or check or has had issues like this please help me.