Stalling 2002 nissan altima

car runs fine,stalls any timeor any place. wait 3or4 minutes starts right up and away you go until next time. next time may be a few miles ar quite a few.Cam and crank sensors have been replaced, new fuel pump and coil pack. Hasn’t helped!

Join the club. This is really tough to find without being able to duplicate it in the shop. I assume there were no trouble codes found. Could be fuel pump or relay cutting out, ignition switch shutting off, dirty throttle plate, coil, ignition module, etc. You need to pay particular attention when it does it to see if it was decelerating, accellerating, steady speed, etc. and whether you still have electrical power when it does it. I would guess the next part should be a module but just throwing parts at it at this point unless it gets worse. One key is waiting a few minutes for it to cool off which could point to a coil or module but just wild guesses.