99 Nissan Sentra won’t stay on!

So I have a 99 Nissan Sentra with 113k miles on it , one day it just sputtered and died on me every since then it won’t stay on ! I’ve changed the spark plugs , the mass air flow sensor , throttle position sensor and the fuel filter and still the same problem, can’t seem to figure it out ! It will turn over and go to 100 rpms then a few seconds later the rpms will start bouncing up and down getting lower and lower till it dies ! I did have a error code but the code was only the maf but I changed it and still won’t stay running

I had this problem when the fuel pump failed in my Dodge Caravan. I was stopped at a light, and it suddenly started running really rough and then stalled out. It would restart, but wouldn’t stay running once I shifted the transmission out of “P”. I had it towed home, and tried a new MAP sensor and idle air control, since information online showed those were the two most common causes of this problem.

When those did not help, I sprayed starting fluid into the intake while someone else started it and revved up the engine. Then I knew it was a fuel problem, and since I had already changed the fuel filter, fuel injector, and fuel pressure regulator due to another problem, this time it had to be the fuel pump. I bought it online, for a fraction of what the local chain auto parts stores were charging, and replaced it.

If you do this, and find a failed fuel pump, then I strongly suggest buying a QUALITY brand such as Denso First Time Fit, Delphi, or AC Delco. Do not buy the cheapo brands such as Airtex/Wells or Spectra Premium. The effort required to do this repair, even if you DIY it far exceeds the cost savings!

The problem might be with the crankshaft position sensor.

https://www.rockauto.com/en/catalog/nissan,1999,sentra,2.0l+l4,1356825,ignition,crankshaft+position+sensor,7196

If the computer loses the signal from this sensor the engine won’t run.

The reason it could be the crank sensor is, the tach gets its signal from this sensor.

Tester