Commit Graph

14 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
9d4bb45dbc Refactor CrashReporter plugin
Summary: This diff refactors CrashReporter Plugin. The business logic of crash reporter plugin was placed in the `iOSDevice.js` as it gets the hook to the initialisation of iOSDevice. This diff moves the business logic to the Crash Reporter plugin files under the plugins folder. To get the hook, so that we can add our watcher, I have added a static function over `FlipperBasePlugin`, which if exists, will be called once `REGISTER_PLUGIN` event is dispatched

Reviewed By: danielbuechele

Differential Revision: D13529035

fbshipit-source-id: 28216b273b4032727859107d8a6751c6465af9ac
2018-12-21 07:03:21 -08:00
Pritesh Nandgaonkar
9748aba878 show crash notifications only for a particular device
Summary:
Before this diff we used to show crash notifications for all kind of crashes. This diff adds the check, which makes sure that only the crashes of a selected device is shown

Also added tests and updated few tests

Reviewed By: danielbuechele

Differential Revision: D13518019

fbshipit-source-id: 6d640d078a43480274242a5d86f2d135d875d630
2018-12-20 05:21:37 -08:00
Pritesh Nandgaonkar
a12768539e Crashreporter plugin by adding a watchman for crash log
Summary:
This diff adds a watcher on `~/Library/Logs/Diagnostics/` library and fires a notification whenever a crash log is added there. This will only work for iOS crashes. With this change, for iOS we should be able to see all kind of crash notification be it due to uncaught exception or a native crash or signal errors.

For android, it will still show notifications due to uncaught exceptions. In upcoming diffs, I will change the logic for android too by parsing Logcat logs.

This diff doesn't support physical device crash reporting. The crashes for physical devices are synced to other folder and that too they are symbolicated.

Reviewed By: danielbuechele

Differential Revision: D13404648

fbshipit-source-id: 7219855ebc73451af87f77f90cc3ed0f2ab5287c
2018-12-18 13:42:40 -08:00
John Knox
140f846797 Track device register and unregister
Summary:
Now we get one event for every time an android or iOS device is detected by flipper.
This is different from a successfull connection. E.g. it may not have any flipper-enabled apps running.

Reviewed By: danielbuechele

Differential Revision: D13377316

fbshipit-source-id: 80e42ab0ae1c2ab50d4bec732a0fa86fcd941991
2018-12-10 02:21:33 -08:00
John Knox
606d689cae Don't do iOS-specific setup when not supported
Summary:
Now flipper will include iOS devices in the dropdown, but you'll also get a message saying they aren't yet supported.
Also doesn't start up the PortForwardingMacApp instances in this case, because it's pointless.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13319990

fbshipit-source-id: 75d72c6ed2478c7b999c5f43b764f097141b33de
2018-12-04 07:10:51 -08:00
John Knox
3057c0a6e7 Show indicator when client setup fails (#339)
Summary:
At the moment, when a client is failing to connect, you effectively get an infinite spinner, as it keeps retrying.

This keeps the spinner while it's retrying, but in between, shows a failure icon.

This isn't perfect. It's still shown under possibly the wrong device, but that already happens anyway, this just adds an extra icon.
Pull Request resolved: https://github.com/facebook/flipper/pull/339

Reviewed By: priteshrnandgaonkar

Differential Revision: D13319635

Pulled By: jknoxville

fbshipit-source-id: e16177ecc7058b779fb17b61e20fcbac8ccf0c29
2018-12-04 07:10:51 -08:00
John Knox
40f50d48e3 Add physical iOS support to internal build
Summary: Adds support for physical iOS devices, when the necessary dependencies are present. Unfortunately these aren't open sourced yet so the open source build won't get this feature yet.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13001473

fbshipit-source-id: d8c2bcd53b7972bec676717c8af0112800b918d0
2018-12-03 11:34:53 -08:00
Daniel Büchele
fede0b854e iOS device availability
Summary: Apple seems to have changed the key for device availablility. We check for both now.

Reviewed By: jknoxville

Differential Revision: D10401073

fbshipit-source-id: 284a168a701eb2d5d9b3cbcac2aa6276ee1a2211
2018-10-16 06:36:06 -07:00
Daniel Büchele
e86a756e3c remove PortForwarder
Summary: Removing PortForwarderMacApp as it is not used anymore. Before it was used to allow us to debug physical iOS device. However, the support for physical iOS device was removed a while ago for security reasons. The PortForwarder was not in use anymore so it is safe to remove it.

Reviewed By: passy

Differential Revision: D10337888

fbshipit-source-id: 93f508ec524a0fc055141176c06d7e7169d83f16
2018-10-15 03:03:35 -07:00
Daniel Büchele
a30e0b53e9 faster iOS device connection
Summary:
First connection attempt to iOS device was only made after 3000ms. This caused all iOS devices only show up after this delay.
Now, the devices are queried immediately.

Reviewed By: passy

Differential Revision: D9613057

fbshipit-source-id: a14e3f02576ec5e159f4002bf68efe53236dcc50
2018-08-31 10:13:06 -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 Buchele
6fda334a00 fbshipit-source-id: 5d9ecf33fca19e4a6b8c979b879ec9dd82af1ef9 2018-06-25 04:33:04 -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