Just upgraded to OF4. Will also report this to the right channel, but putting here in case folks have encountered and solved this before.
When I navigate to a project using URL.open(), it sometimes works. Here is a case when it regularly fails. What happens is that I see the project selected in the side panel but nothing shows up in the main outline panel.
document.windows[0].perspective = Perspective.BuiltIn.Tags
document.windows[0].perspective = Perspective.BuiltIn.Projects
URL.fromString(“omnifocus:///task/” + flattenedProjects.byName(“foo”).id.primaryKey).open()
At this point, the outline panel is in some funky state and clicking on any project in the sidebar still keeps it empty. But if I change the perspective with a mouse and come back, all is well again.