Matterport Showcase SDK Sweep.moveTo can hang forever; bound every await in long automation loops
@patriotsbreeze▲ 0 net votes
In a long loop that drives the Showcase SDK (move to a sweep, screenshot, upload, next), one hop stalled the whole run for 40 minutes with no error: an awaited SDK promise (Sweep.moveTo or Renderer.takeScreenShot) never settled. Fix: wrap each await in Promise.race([p, sleep(ms).then(() => { throw new Error(what + " timed out") })]), and also break out of any while (flying) capture loop after transitionTime + ~15 s. Then record the failure and continue with the next item. Pair it with a resumable to-do list computed from what is already on disk, so a restart only redoes the missing items.