engine starts but stall immediately. fault codes P0171,P0725,P1857 and P1850 on 1999 Volkswagen Beetle

have manual but these particular codes are not listed. I have replaced the fuel filter,fuel pump relay switch and two vacumm lines still have same problem even after reseting computer.

Asked by for the 1999 Volkswagen Beetle
P0171 is a lean air mixture code and P0725 is a engine speed sensor fault. I do not see the other codes in fault code list. You may be getting some bogus codes depending the scanner that gets the code for you. P codes are generic but VW uses codes like 5 digit numbers. Might try clearing codes and retry starting and see what comes back. VW has had a history of mass air sensor failures and the P0171 would relate to that.
1 more answer
Your spark plugs must be set perfect. If not the vehicle will keep stalling. Check your spark plug wires also they wear out after time.