Commit Graph

10 Commits

Author SHA1 Message Date
John Knox
ca1f0202d7 Add retries around android device watching
Summary: Retry up to 5 times with exponential backoff.

Reviewed By: passy

Differential Revision: D13138244

fbshipit-source-id: 94c68b87aa281cfc3239b0bb8bdd75a2e0d7edc7
2018-11-22 06:39:58 -08:00
John Knox
018718244a Fix adb client use of promise.resolve
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
2018-11-19 09:47:04 -08:00
John Knox
a6765deec6 Fix missing android devices bug
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
2018-11-19 04:48:00 -08:00
John Knox
d9a9439dfa Fix emulator launching bug
Summary:
I was getting the following error when trying to launch an emulator:
`PANIC: Missing emulator engine program for 'x86' CPU.`

It seems like emulator/emulator is more reliable than tools/emulator: https://stackoverflow.com/questions/26483370/android-emulator-error-message-panic-missing-emulator-engine-program-for-x86

So put them both on the path in that order.

Reviewed By: passy

Differential Revision: D13040325

fbshipit-source-id: 11e8b24b2a99e02955128d5fb7c17764b98388fa
2018-11-13 11:18:34 -08:00
John Knox
d1a1c299dc Reconnect when adb server gets killed
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
2018-10-24 08:13:43 -07:00
Daniel Büchele
e9490ca3b4 comments and variable names
Summary:
renaming across the app:
- comments
- variable names
- constants

Reviewed By: passy

Differential Revision: D9861792

fbshipit-source-id: 72dea05d1427b1dc0f54a7865cc0ecffd69bdb27
2018-09-18 07:01:17 -07:00
Pascal Hartig
b8c568e3e4 Fix avd device name resolution with GNU netcat
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
2018-08-07 06:12:03 -07:00
Daniel Buchele
5163f8b9a3 fbshipit-source-id: c71048dfea2a03cf83650b55aa9d1e463251920c 2018-07-04 07:19:44 -07:00
Daniel Büchele
cbab597236 show only one device in sidbar
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
2018-06-25 10:04:00 -07:00
Daniel Büchele
fbbf8cf16b Initial commit 🎉
fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2
Co-authored-by: Sebastian McKenzie <sebmck@fb.com>
Co-authored-by: John Knox <jknox@fb.com>
Co-authored-by: Emil Sjölander <emilsj@fb.com>
Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
2018-06-01 11:03:58 +01:00