The CEL has been on for a long time on my 99 Ranger. Various shops and people have tried to diagnose it. Two years ago I cleared the light and the truck passed the CA smog test with no problem. CEL came back on shortly after the test. In the last two years I've tried off and on to figure it out with no success. The code is invariably the P0171 code, lean on Bank 1. I've done vacuum leak checks, visually examined vacuum hoses, cleaned the MAF sensor, replaced fuel injectors, O2 sensors, fuel pressure sensor, gas cap (almost all of these things for sure needed replacing).
This week it was time to get it smogged again. I cleared the light and took it in and it passed with flying colors. They check vacuum, fuel pressure, EGR, and a bunch of other stuff. Later in the day, the CEL came back on again. The truck runs great. I'm stumped. The only thing I haven't done is check/replace the DPFE sensor, but why wouldn't that show up in the smog test if it was bad? Maybe the MAF sensor is bad (but clean
)? Or the connection to the MAF is corroded? Starting to think it's an electrical thing.