We use a combination of X-shooter spectroscopy, ULTRACAM high-speed photometry and SOFI near-infrared photometry to measure the masses and radii of both components of the eclipsing post common envelope binaries SDSS J121258.25−012310.1 and GK Vir. For both systems, we measure the gravitational redshift of the white dwarf (WD) and combine it with light-curve model fits to determine the inclinations, masses and radii. For SDSS J1212−0123, we find an inclination of i= 857 ± 05, masses of MWD= 0.439 ± 0.002 M⊙ and Msec= 0.273 ± 0.002 M⊙, and radii RWD= 0.0168 ± 0.0003 R⊙ and Rsec= 0.306 ± 0.007 R⊙. For GK Vir, we find an inclination of i= 895°± 06, masses of MWD= 0.564 ± 0.014 M⊙ and Msec= 0.116 ± 0.003 M⊙ and radii RWD= 0.0170 ± 0.0004 R⊙ and Rsec= 0.155 ± 0.003 R⊙. The mass and radius of the WD in GK Vir are consistent with evolutionary models for a 50 000 K carbon–oxygen (CO) core WD. Although the mass and radius of the WD in SDSS J1212−0123 are consistent with CO core models, evolutionary models imply that a WD with such a low mass and in a short period binary must have a helium core. The mass and radius measurements are consistent with helium core models but only if the WD has a very thin hydrogen envelope (MH/MWD≤ 10−6). Such a thin envelope has not been predicted by any evolutionary models. The mass and radius of the secondary star in GK Vir are consistent with evolutionary models after correcting for the effects of irradiation by the WD. The secondary star in SDSS J1212−0123 has a radius ∼9 per cent larger than predicted.