Ed Harris in a scene from the (C)Universal Pictures film: Apollo 13 (1995).

The actor Ed Harris plays NASA flight director Gene Kranz in the 1995 film Apollo 13, directed by Ron Howard.Credit: Landmark Media/Alamy

“Failure is not an option,” NASA’s legendary flight-operations director Gene Kranz is said to have remarked, as seen in the 1995 film Apollo 13. Actor Ed Harris portrayed Kranz as he guided his team to save a spacecraft that had run into trouble on the way to the Moon. In the movie, as in real life, the three astronauts on the Apollo 13 mission pulled off a spectacular fix and returned safely to Earth.

Not all space ventures have such a tidy ending. A 2019 attempt by Israeli company SpaceIL to land on the Moon crashed. On 20 April this year, a spectacular intentional detonation ended the first major test flight of Starship, the world’s largest rocket, which SpaceX in Hawthorne, California, is building to carry humans back to the Moon and to Mars. The craft had spun out of control four minutes after lifting off its launch pad in Texas. Five days later, a robotic mission from the Japanese company ispace, based in Tokyo, tried and failed to land safely on the Moon.

Its crash-landing was devastating not only for the small team of engineers that had built and flown the spacecraft, but also for others whose hopes were riding along with it. When the lander crashed, it pulverized two rovers designed to travel around and explore the Moon’s surface — one built by the space agency of the United Arab Emirates and the other by the Japan Aerospace Exploration Agency. A camera system built by Canadensys Aerospace of Toronto, Canada, which was designed to photograph the rovers deploying, also went up in smoke.

The scientists and engineers involved should not be discouraged by these failures. Space is hard. This is a truism trotted out every time there’s an attempt to launch from this planet or land on another. But it is accurate. Those who wish to explore the cosmos should expect to fail — perhaps many times — before they can succeed.

Engineering requires iteration, time and again: first to design machines that might work and then to test them against as many possible scenarios in which things could, and of course do, go wrong.

As with all failures, the Starship explosion will teach scientists and engineers valuable lessons before the craft attempts to fly again. Along with studying why the rocket’s 33 engines did not all ignite and burn as they were supposed to, SpaceX also needs to reckon with the extensive environmental damage caused when Starship’s launch pelted nearby communities with more sand and debris than expected. NASA is watching this process closely, because it is depending on Starship for its plans to send humans back to the Moon in the coming years.

Ispace, too, will study and learn from its mission’s problems, ahead of a planned second launch next year. It looks as if the spacecraft ran out of propellant just before reaching the surface, causing it to crash-land.

Humans live in a culture in which it seems as if everything must go right the first time we try it, but that is not how successful products are developed, nor how science unfolds — especially in space. Back in the 1960s, both the US space programme and the Soviet Union’s equivalent went through a process of trial and error, as they tried time after time to land the first Moon missions, and failed repeatedly. Both learnt from each attempt and incorporated those lessons the next time around.

Kranz did not actually say “Failure is not an option” — although that didn’t stop him using the phrase as the title of his 2000 autobiography. In research and development, failure is indeed an option. In fact, it can be a necessary learning objective on the path to success.