The course of true love never did run smooth — especially when nuclear weapons are involved.

For months, President Trump had talked up his affection for North Korea’s dictator, Kim Jong Un. “We fell in love,” Trump said.

But when they met in Hanoi last week for their second nuclear summit, it seems the spark was gone. Instead of celebrating a new agreement with a ceremony in front of the world’s cameras, the two leaders walked away from the table without even shaking hands in public.

Gone were the unrealistic hopes of a quick deal toward dismantling North Korea’s nuclear arsenal or even closing its weapons factories. Gone too was Trump’s hope for an easy Nobel Peace Prize.

After all the sweet talk, the two sides discovered they were still far apart on basic issues.

Trump blamed the North Koreans, saying they demanded a complete end to U.S. economic sanctions as a first step. Aides to Kim disputed that account.

Other U.S. officials said the disagreements were broader and included differences over how many nuclear facilities North Korea should close.

The two sides still haven’t resolved the most fundamental issue that divides them: Should “denuclearization” apply only to North Korea, or should it apply to U.S. forces in the region too?

Normally chiefs of state are brought in as closers after lower-ranking diplomats have settled the details of a deal — or at least produced a framework. In Hanoi, Trump and Kim were still wrangling over the basics, trading maximalist demands across the floral arrangements.

The fiasco that followed was, if not predictable, at least not surprising. Lesson for the president: In diplomacy, personal chemistry isn’t everything. National interests matter too.

Trump was at least partly to blame. The president made clear for weeks that he yearned for another television spectacular like his first summit with Kim in Singapore last June. But he undercut his own case by suggesting he might settle for almost any deal Kim offered.

“I’m not in a rush,” he said last month. “I just don’t want testing. As long as there’s no testing, we’re happy.”

Korea experts I’ve spoken to are relieved that Trump didn’t give anything away in Hanoi. But they say the collapse of the talks leaves the United States at a disadvantage. Even if Kim doesn’t restart nuclear or ballistic missile tests, as he promised, his regime can continue producing plutonium and enriched uranium, the fuel for nuclear bombs.

In the nearly nine months since the Singapore summit, North Korea produced enough fuel for seven additional nuclear weapons, according to an estimate by experts at Stanford. That’s on top of the 20 to 60 that U.S. experts say the regime already has.

The president also gave away an important piece of moral high ground in Hanoi: He praised Kim as “a great leader” and gave him a free pass on the gruesome torture of Otto Warmbier, a University of Virginia student who died in 2017 after more than a year of imprisonment in North Korea.

Korea had been one of the few potential bright spots for Trump’s foreign policy.

His notion of negotiating a peace deal between Israel and the Palestinians (without actually consulting the Palestinians) has never gotten off the ground. His decision to withdraw from President Obama’s 2015 nuclear disarmament deal with Iran not only hasn’t brought Tehran to its knees, but it’s also alienated U.S. allies while Iran widens its influence in Iraq, Syria and Yemen.

The negotiations with North Korea aren’t over; officials on both sides say they want to try again. It’s still possible to envision a multiyear step-by-step deal that trades a bit of nuclear infrastructure for partial easing of U.S. sanctions, allowing each side to gain confidence in the other. That’s what Trump’s chief negotiator, Stephen E. Biegun, has been working toward.

But these are diabolically complex problems; just ask the diplomats who spent years hammering out the Iran nuclear deal. A rushed leadership summit, in the glare of the cameras, was precisely the wrong place to try to sort out all the moving parts.

The first step is for the two leaders to declare confidence in their negotiators and restart quiet working-level talks. We’ll know whether the process is back on track when that happens — or doesn’t.

If it’s done right, the next round won’t be very dramatic. It probably won’t produce another summit meeting soon.

Trump won’t like that. But he needs to get out of the way and give the negotiators time to do their jobs.

The president never admits to failure, so it’s impossible to know whether he’s in the mood to learn any lessons from this setback. But if he’s looking for a moral from his humiliation in Hanoi, here it is: He alone can’t fix this.

Doyle McManus’ column appears on Wednesday and Sunday.