It’s been 10 years between Zach Braff’s first feature film as a writer-director, “Garden State,” and his second, the newly released “Wish I Was Here.” In that first film, he was a listless 20-something searching for his purpose. This time, his face of perpetual stubble betrays his years, but if he’s lost his youthful aimlessness, he’s replaced it with a middle-aged aimlessness.

He inhabits that skin of Aiden Bloom, a strikingly similar Braffian avatar who has matured just enough to outgrow his Manic Pixie Dreamgirl from “Garden State” and settle down with Sarah, a smart career woman (Kate Hudson, her performance brightening this entire movie), with whom he is struggling to raise two children.

‘Struggle’ is the key word in “Wish I Was Here.” It colors Aiden’s flagging career as a wannabe L.A. actor reduced to auditioning for minimal speaking parts in disposable sci-fi shows, and not even getting those. It’s there in the relationship with his brother (Josh Gad), a once-brilliant engineer turned trailer park slugabed who devotes his life’s energy to Comic-Con costumes; and with his father (Mandy Patinkin), who has just informed him that his cancer has metastasized. Pere Bloom has opted for an expensive experimental treatment, which means that he can no longer fund the private yeshiva education for Aiden’s children, Grace and Tucker (Joey King and Pierce Gagnon).

All of these issues strike at Aiden and Sarah simultaneously, snowballing into each other the way crises often seem to do, and Braff’s film is a soul-searching study, if not a roadmap, in how to accept life’s inevitable curveballs. This involves par-for-the-course diversions like a road trip to the mountains, where he and his children stand on boulders and wait for an epiphany to strike; and a visit to Aiden’s local synagogue, where he discusses his lapsed faith and his idea of spirituality with a rabbi.

“Wish I Was Here” could have easily been a bleak journey, but jokes usually leaven even the most emotionally agonizing moments. As Patinkin’s dying man puts it, “Eventually things get tragic enough that they circle back to comedy.” Many scenes are laugh-out-loud funny, even when the punch lines are predetermined. Sometimes the movie is dramatic, politically pointed and breathtakingly funny all at once, like the blustery disaster in which Aiden tries to home-school his kids. And every once in a while, a scene will strike a chord that is so moving that it will touch nerves few films approach, and leave you speechless in its thrall.

The problem, darn it, is that Braff, who penned this movie with his brother Adam, is a facile writer prone to summarizing scenes with arch platitudes. This undercuts the movie’s core naturalism almost as much as the maudlin piano score, which adds unnecessary punctuation to scenes dramatic enough to sell themselves. It is, finally, an unwieldy attempt to make the Great American Movie, juggling so many plotlines that it takes a filmic eternity to tie up every loose end (we haven’t even gotten to Sarah’s conflict with a sexually inappropriate co-worker, which is resolved in an absurd deus ex machina).

As a result, this 102-minute film feels well over two hours. There’s some great stuff in this film, but Braff lacks the ability to separate the wheat from his chaff. Given that he wrote the movie with his brother, “Wish I Was Here” is doubtlessly an intensely personal movie for both of them. The idea of cutting any of these scenes must have felt like severing a child’s limbs. That’s why it could have used an especially judicious editor, one who could see beyond its creators’ myopia. But I suppose, if a Zach Braff movie wasn’t at least a somewhat navel-gazing experience, it wouldn’t be a Zach Braff movie. 

“Wish I Was Here” opens today, July 18, at Cinemark Palace in Boca Raton, AMC Aventura and Regal South Beach.