Summary: Retry up to 5 times with exponential backoff.
Reviewed By: passy
Differential Revision: D13138244
fbshipit-source-id: 94c68b87aa281cfc3239b0bb8bdd75a2e0d7edc7
Summary: This was misusing promise.resolve by calling it before the result is produced, meaning there was a race condition. It would also resolve as success even if listDevices failed.
Reviewed By: passy
Differential Revision: D13121173
fbshipit-source-id: f120a1b199d1e3168059c537461f65a8dc125a94
Summary:
Finally tracked down this bug that's been annoying me.
If you start flipper while the adb daemon is not running, then flipper will start the daemon, but it won't wait for it to have finished starting before telling the client to watch for devices. This is a race condition, and in practice never seems to work.
To avoid this, I'm calling `adb devices` on the client and waiting for it to complete before doing anything else. This forces it to wait for the daemon to start up if it hasn't already, and if it has then it instantly returns.
Reviewed By: passy
Differential Revision: D13101963
fbshipit-source-id: b85bed24751ce5c8efdfc6e841400e4db2580ab0
Summary:
Flipper tracks devices on an adb connection. If the adb server gets killed, it deletes all devices, but doesn't attempt to reconnect.
This gets it to rety after 500ms.
Reviewed By: priteshrnandgaonkar
Differential Revision: D10526974
fbshipit-source-id: a2101067f2245b728f458fc5e06dc68833c5e772
Summary:
Device connection didn't work on Linux due to netcat behaving differently.
I also played around with the `nc` and `node-netcat` packages, but they would
either crash the node stack or fail to compile with Babel. Oh glorious
JavaScript world.
Reviewed By: danielbuechele
Differential Revision: D9194591
fbshipit-source-id: 58e5b8d6b4a66e791e750de2f1449dcb8fc338ae
Summary:
Refactors the plugin architecture of Sonar:
- Before plugin rendering had it's own implementation of the react lifecycle. This means the `render`-function was not called by react, but rather by the application it self. In this diff, the render method is now called from react, which enables better debugging and allows react to do optimizations.
- Business logic for querying emulators is moved away from the view components into its own dispatcher
- All plugin handling is moved from `App.js` to `PluginContainer`.
- The sidebar only shows one selected device. This allows us to add the screenshot feature as part of the Sonar main app and not a plugin.
- This also fixes the inconsistency between the devices button and the sidebar
Reviewed By: jknoxville
Differential Revision: D8186933
fbshipit-source-id: 46404443025bcf18d6eeba0679e098d5440822d5