Toyota Repair: 1998 corolla auto, mass airflow sensor, intake air temp


Question
QUESTION: hi ted, i started recieving a check engine light reading lean on bank 1   i also noticed a big loss in fuel mileage about 120 miles a tank. i replaced o2 sensor no help. called toyota and they insisted i needed there sensor. they got me there 170.00 no help.. the only time engine light would come on was after being on the interstate at high speeds. after restarting the car or shortly after at low speeds enigine light on. drive car 2hrs home at high speeds and plugs are lean. wife drives to work 5 miles at low speeds and plugs go back to tan color. fuel pressure is 45 at the rail. new plugs and wires. put a can of sea foam through and engine light has went out but gas milage hasnt improved.  my guess is vacume leak but where ? i have sprayed 2 times with no increase in idle. car has 178,000. car runs every day and starts right up. a little rough on idle at a stop. intake gasket ? ? thanks art

ANSWER: I need to know the diagnostic trouble code number please.

---------- FOLLOW-UP ----------

QUESTION: lean on bank 1 code is the p0171 code

ANSWER: Remove the MAF (mass airflow sensor) from the intake tube from the air filter and clean the inside of the openings on the sensor using some electronic cleaner, if that doesn't work replace the sensor.

---------- FOLLOW-UP ----------

QUESTION: are you meaning the temp sensor in the air box where the air filter is ? I dont believe there is a MAF on the 98 corolla.. I also wanted to know something else. I was looking at things again this evening same issue and noticed the fans aren't coming on with a hot engine. is it possible the engine temp sensor is not working and thats why the fans are not coming on so the engine is hot but the gauge reads normal and could this give the computer a signal that would lean the fuel ? thanks for any help on this..

Answer
Correction: it uses a MAP (manifold absolute pressure) sensor which is probably not the problem but it could be. The sensor inside the air box is the intake air temp sensor, it could be the problem but this code is mostly caused by either an intake or exhaust leak in front of the cat converter, I recommend connecting a diagnostic tool that can read O2 sensor voltages and check the voltages of both the #1 and the #2 sensors. The #1 sensor voltage should fluctuate between
-0.05V to +0.05V while the rear sensor should show a steady voltage of around 0.03V+or-.  If the front sensor does not fluctuate then the sensor should be replaced.