Sometimes my car jerks while I'm driving and it's anoyon on 2011 Nissan Altima

Not all the time it happens service engine soon light came on still on happen two weeks ago car was jerks t h en it stopoed

2 answers 2 comments
bad sparkplug or coil
Have it scanned to see why light on.
Just wanna have an idea I was told it might be the crankshaft position sensor because the car runs fine just that problem
Possible still covered under warranty.