WASHINGTON — States would continue to receive highway and transit aid for another two months under a bill the House passed Tuesday, the 12th such temporary patch in six years and a reflection of lawmakers’ lack of consensus on how to solve the nation’s infrastructure financing woes.

The bill was approved by a vote of 387 to 35. The current authorization to spend money from the federal Highway Trust Fund, which finances most aid to states, expires May 31. A Senate vote is expected later this week.

The fund relies on revenue from the 18.4-cents-a-gallon federal gasoline tax, but the tax hasn’t been increased since 1993 and the money it brings in isn’t enough to cover transportation spending. But most lawmakers are reluctant to raise it, seeing that as unpopular with voters.

Unable to find a politically acceptable solution, Congress has kept the trust fund teetering on the edge of insolvency since 2008. The extension passed by the House would expire July 31., when many lawmakers say they expect to go through the same exercise again.

“If we don’t change something, we’ll be right back here in July talking to each other” about another extension, said Rep. Bill Pascrell, D-N.J.