Summary:
Original commit changeset: b1eae542aaa6
This D13487864 has broken `adb start-server` command for the production builds, thus this diff backs out the changes done by that diff.
Reviewed By: danielbuechele
Differential Revision: D13532003
fbshipit-source-id: 1d169dcdab11a52f075187803219915f444952d6
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
Summary: Adding a PluginDebugger that gives the user some information why a plugin might not be loaded.
Reviewed By: jknoxville
Differential Revision: D13465143
fbshipit-source-id: f5d7037850874ca9545ac1523fb4e0f18ede7273
Summary:
The sheet was only used for the bug-reporter before and we had an explicit boolean flag in the redux store to keep track if the bug reporter is shown.
Changing this it an `activeSheet` property, which allows us to show arbitrary sheets, while making sure to only show one at a time.
Reviewed By: jknoxville
Differential Revision: D13516985
fbshipit-source-id: 3e83f719e2b61d0b2229268ebfdc910123b403d2
Summary:
If a plugin was not loaded we used to ignore it. This diff still ignores the plugins that weren't loaded, but adds some information about them to the redux store. This information is used in the PluginDebugger.
These are the three reasons, why a plugin might not be loaded.
* `gatekeepedPlugins`: Plugin was ignored because of a GK
* `failedPlugins`: Plugin could not be requried/failed to parse
* `disabledPlugins`: Plugin disabled in `~/.flipper/config.json`
Information for each them is added to the redux store.
Reviewed By: passy
Differential Revision: D13516986
fbshipit-source-id: b7a55a159cb586d1a88fbb976248131c52a909c5
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
Summary: this moves the `Sheet` into its own component, so it can be reused for other places than the bug reporter.
Reviewed By: passy
Differential Revision: D13468275
fbshipit-source-id: 5f6d07a54dda078bd08a4c4cd31a41c61b58a76f
Summary: The deeplink from crash notification to crash reporter plugin was broken. It always showed the latest crash.With this diff the crashreporter plugin shows the correct crash information.
Reviewed By: danielbuechele
Differential Revision: D13487792
fbshipit-source-id: eee6826bb0a84d0aab9b432a1c9a04aa7d528402
Summary: The test were broken, as the `CrashReporterPlugin.id` was empty. This value is populated when plugin is loaded, thus added a helper function for that. Also removed a duplicate test.
Reviewed By: danielbuechele
Differential Revision: D13517063
fbshipit-source-id: ffb99316933cd27068c6bce67cfa6e95633b6246
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
Summary:
This diff does the following
- Comments out the code in iOS which sends the message to the desktop side
- Also comments out the part where signal handler is initialised, as we no longer need it. I will remove the iOS implementation completely in next few diffs
- Updated the JS side to expect call stack as a string instead of an array
- Updated the android side to send callstack as a string
I have commented out the code for crash reporter plugin of iOS as for iOS I will be adding a watchman to a directory where crash logs are dumped. The diff related to this is in the stack
Reviewed By: passy
Differential Revision: D13424824
fbshipit-source-id: b1105da912292bf73cff948206c031de9b059abd
Summary:
For all plugins:
- move static fields `title`, `id` and `icon` to `package.json`
- adds "bugs" field for all plugins containing links to support groups/oncalls.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13417286
fbshipit-source-id: 7b341176915f3ed7b473b95c1d879f21d7d634ef
Summary:
Redesigns the bug reporting dialog:
- show information from `package.json`'s `bugs` field, where we can link to support groups or name oncalls.
- adds show/hide animation
- uses new button style
Reviewed By: jknoxville
Differential Revision: D13417287
fbshipit-source-id: 2948794e9b1f42bbd895981d5e4b0578a9b8ee2e
Summary:
Adding the properties from a plugin's `package.json` as static properties to the class.
The name from `package.json` is used as it's `id`.
This allows us in the future to add meta information about a plugin to it's package.json and still use the data inside the app.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13417288
fbshipit-source-id: 3d0a62d4cb0115153cce1aaee677b9680fefebf4
Summary:
`xdg-open` is blocking on Linux. That means we won't do our cleanup steps
(or reset the button for that matter) until the user closes their viewer app.
This changes the call to be a `spawn`, so we can continue the chain. As no
one had actually used the value captured in the promise, this shouldn't
make a difference API-wise.
Reviewed By: danielbuechele
Differential Revision: D13465571
fbshipit-source-id: 5f698916157906d76ab983109deb9abe142baa9e
Summary:
Record Android screen captures into a separate directory with a `.nomedia`
file to avoid it from getting indexed before it gets removed after being
pulled.
Reviewed By: danielbuechele
Differential Revision: D13465448
fbshipit-source-id: 4449ff3a927cc8621b015b018d2b743cedc4ce8c
Summary: We were relying on adbkit to do this, implicitly by calling listDevices(). However, this doesn't appear to be reliable, with retries, it usually succeeds, but sometimes still doesn't. I'm aiming to avoid all this entirely by just starting it directly using adb itself, which I expect to be much more reliable.
Reviewed By: danielbuechele
Differential Revision: D13487864
fbshipit-source-id: b1eae542aaa6ecb2b74b575a3582934093ccd588
Summary: Moving the `MarkerTimeline` from the QPL plugin to the Flipper UI library, so it can be used by other plugin.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13377065
fbshipit-source-id: 9ef1f0e044fa85b68a01e23071042600aa5c3c63
Summary:
Moving the scrolling to highlightedRows from `componentWillReceiveProps` to `componentDidUpdate` to make sure the rows are rendered, when this method is called.
The method is called, whenever the highlighted rows change, and on the first update. The reason why this is called on the first update is described in an inline comment.
Reviewed By: passy
Differential Revision: D13376566
fbshipit-source-id: 311a1f430e08fcfb4e31b39a2c5b34910694917f
Summary: changing the payload to work with the updated logs plugin
Reviewed By: passy
Differential Revision: D13376392
fbshipit-source-id: ccfb1b1a7a2ec3e9d3899e70c9bdd199a489da88
Summary:
The log plugin subscribed to the device logs, when it was mounted. Then, the device replayed all log messages that happened in before the plugin became active. While this works, this was not the most performant way to handle this, because it caused multiple rerenders.
In this diff, a method is added to `BaseDevice` to get all buffered logs. This method is called once the logs plugin becomes active. The processing of the logs is split into a couple smaller functions.
Reviewed By: jknoxville
Differential Revision: D13376393
fbshipit-source-id: bb151659c3335e10f647ae2dbf66e93b32d22913
Summary:
* using `includes` instead of `indexOf` for performance improvements
* fixing bug in Searchable overwriting `defaultFilter` variable
* adding default name for markers without name
Reviewed By: priteshrnandgaonkar
Differential Revision: D13397936
fbshipit-source-id: ee514dab7c2ac4acdaba86ccd41e0ef69815faeb
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
Summary:
Getting more visibility on this.
We're seeing cases where the wrong deviceId is getting stored in the device connection_config.json.
This comes from flipper desktop in the response of 'signCertificate', and is figured out using getTargetDeviceId.
If we ever see these logs then something is wrong, and seeing the csr should help.
Reviewed By: passy
Differential Revision: D13357882
fbshipit-source-id: eb6befe07e7f9e7606e8940a1fed619351946d37
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
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
Summary: I'm not sure if this ever happens, but currently if an empty csr came in from a device, it could cause at the very least confusing errors, and worse incorrect setup state in devices, meaning they can't connect.
Reviewed By: passy
Differential Revision: D13302621
fbshipit-source-id: 80ff79d2eabd0988059c34bfa92587c82516997a
Summary:
Improves the UI of crash reporter plugin
- Added max height on the value container with scrollable capabilities
- Fixed the bug in UI of the plugin where it showed the latest crash data even though one navigated to the plugin from old crash notification
Reviewed By: danielbuechele
Differential Revision: D13307302
fbshipit-source-id: 97eb96d3d9947a2835cd5572053256e0bdc01e27
Summary:
Updating react-devtools plugin to the latest version.
As Flipper doesn't use a websocket anymore, this plugin was not working. In this diff, we are creating a websocket connection parallel to the rSocket connection which is used by the devtools. First we thought about tunneling the websocket through our rSocket, but this would be a lot more work.
By default they create a web-socket running on port 8097. But if this port is in use another port is used. The hostname and port to connect to is sent to the client-plugin.
Reviewed By: jknoxville
Differential Revision: D12897150
fbshipit-source-id: 6652b3c91fd5bd87fe86b29c730c8b2076bbc6ba
Summary: Replace the console.error and lack of calling done(), with an explicit expect() call to make failure results clearer.
Reviewed By: danielbuechele
Differential Revision: D13254777
fbshipit-source-id: 602081323ad3cc1432ddb706f49f036f0fb8926d
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
Summary:
Updates of the redux store caused rerendering of UI components, even without the acutal UI changing. This diff ensures the UI is only updated, when
The PluginContainer received all plugin states and selected the pluginState of the active plugin to pass it down to the plugin. However, this caused a rerender everytime a pluginState changed (even if the plugin was in the background).
This diff moves the selection of the active plugin to the `connect`-function and only passes the state of the active plugin into the container. This makes sure the plugin rerenders only if it's own state changes.
The main sidebar displays the number of notifications. Therefore, it was passed the array of notifications. However, this array is regenerated, everytime a new notification **might** be triggered.
Now, the number of notifications is calculated in the `connect`-method and only the number itself is passed into the component. This makes sure the sidebar is only rerendered, when the actual number of notifications changes.
Reviewed By: passy
Differential Revision: D13276096
fbshipit-source-id: bf1e6c4a186f7a1cf7f7427cd3523b5b71eb003a
Summary: When a plugin has no gatekeeper defined, an incorrect warning was logged, saying that if fails the gatekeeper "undeinfed"
Reviewed By: jknoxville
Differential Revision: D13275803
fbshipit-source-id: 9ae5ed55031cc6a636c7c5ffa23bdd059a8ed35f
Summary: Adds crash reporter plugin in wilde under a gatekeeper `flipper_crash_reporter_plugin`. By default all the employees will be part of this gatekeeper
Reviewed By: passy
Differential Revision: D13258265
fbshipit-source-id: 1baa2a342f492781d8fb3e86c2a30140537c23f1
Summary:
- New improved UI
- Instead of sending the callstack as a string from android, now sending it as an array
- Deeplink to Logs support just for android. In iOS crash is not automatically logged in Logs plugin, atleast thats what happens in sample app
Reviewed By: jknoxville
Differential Revision: D13216477
fbshipit-source-id: d8b77549c83572d0442e431ce88a8f01f42c9565
Summary: When nodes didn't have any metadata, the data was an empty string, which fails json parsing. This causes data be passed to the InspectorSidebarSection as ''. The weak map inside that component expects data to be an object, not a string, and crashes if it's actually a string. This will ensure that data is always an object.
Reviewed By: jknoxville
Differential Revision: D13109384
fbshipit-source-id: 469a1b5c1c00130ef37636bf7c6796b2463fb34b
Summary: Makes a crash reporter plugin as a device plugin
Reviewed By: passy
Differential Revision: D13203954
fbshipit-source-id: 02ef2aff05d5a240eaff588f9b515d3d610fc182
Summary:
Previously this was checking that a client can successfully connect.
But that's useless for a user if flipper doesn't also detect the device running the app, or nothing will be shown on screen.
This checks that the device is also known about.
I've removed the `done.fail()` because if this gets called, you lose any failed expect messages.
Reviewed By: passy
Differential Revision: D13194856
fbshipit-source-id: 5461dc1bedb2f9af80ad0dad6780fc25a428db17
Summary:
We've seen this happen sometimes, e.g. when adb fails and we aren't showing any android devices, but the sdk still manages to connect.
When we detect this, log an error so we can track how often it occurs.
Reviewed By: passy
Differential Revision: D13175639
fbshipit-source-id: b0f79b77ac04ad804e56448b3696a3ffeb30631e
Summary: This diff fixes the improper plugin id getting assigned to the variable which lead to notifications not getting shown. The client id has `#` so pluginId is no longer the second argument when one splits the string by `#`. This diff fixes this problem.
Reviewed By: passy
Differential Revision: D13176776
fbshipit-source-id: cd5bdc33c61485e3cdc2f2dbcc615980c39c8b8c
Summary: Retry up to 5 times with exponential backoff.
Reviewed By: passy
Differential Revision: D13138244
fbshipit-source-id: 94c68b87aa281cfc3239b0bb8bdd75a2e0d7edc7
Summary:
Eslint / prettier are unhappy with the formatting of the FlowFixMe
comment, but the suggested solution is really ugly. Let's disable
the lint for now and remove this once it's addressed.
Pull Request resolved: https://github.com/facebook/flipper/pull/332
Reviewed By: jknoxville
Differential Revision: D13156552
Pulled By: passy
fbshipit-source-id: 680d151ea1022912e0e4a83fa42dc51005631c30