Yeah so there's a few complications... 

1. The system app often gives js exceptions like 'bluetooth is undefined' (from https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/bluetooth.js#L54)
2. These js exceptions can make `waitForBoot` error out.
3. They can also stop the `applicationready` event from being sent.

So I found polling and then retrying when we get an error to be the most robust thing. I know it's ugly, but I think b2g desktop is not super well supported :/