adventure-time icon indicating copy to clipboard operation
adventure-time copied to clipboard

file tree fails to populate intermittently

Open blahah opened this issue 9 years ago • 3 comments

Approximately 3/4 times I load http://rik.smith-unna.com/command_line_bootcamp, the file tree fails to populate (see blahah/command_line_bootcamp#10).

expose-fs is working fine - when the error happens I can retrieve the JSON response manually.

My best guess is that the tree is trying to populate itself before the data source is ready - currently it waits for $(window).ready(). Is there a simple way to load it only after the container is ready? Like maybe connect a socket and only populate the tree after receiving a stdout response, as with the terminal?

Apologies if I've missed something obvious.

blahah avatar Feb 21 '16 15:02 blahah

Perhaps a more robust approach would be to retry the xhrs a set number of times, with a sensible delay, if they fail.

blahah avatar Feb 21 '16 15:02 blahah

The linked commit above completely fixes the issue. Shout if you want a PR back to this repo.

blahah avatar Feb 23 '16 19:02 blahah

Yeah a pr back would be great, thank you!

okdistribute avatar Feb 23 '16 21:02 okdistribute