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: Removes the iOS implementation of crash reporter plugin as its implemented as desktop plugin
Reviewed By: adamjernst
Differential Revision: D13451980
fbshipit-source-id: 19cca52a00bb4a6d350eff91ac405f6dd3b07818
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:
Disabling the port fordwarder.
On physical devices, when flipper isn't running and they don't have any certificates, they attempt to connect to the desktop.
They always connect to the portforwarder, even though it doesn't connect to flipper desktop.
After connecting to the portforwarder, they then try to generate the SSL certs. This is a CPU intensive operation and happens repeatedly in this condition when it really shouldn't be, causing high cpu usage.
Disabling for now. The fix will be to make sure that they only do that generation when they are fully connected.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13507353
fbshipit-source-id: a858a5da7352228b063150334ea443130763d888
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:
We can only do this when adb reverse is available, i.e. on Android 5+.
This also relies on a recent change to flipper desktop, to always run adb reverse on emulators.
Reviewed By: danielbuechele
Differential Revision: D10302579
fbshipit-source-id: cff07f0311d413fdd49424a42c641dfb3d225f7c
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:
The `getAllSharedPreferences` API is not implemented in the iOS UserDefaultsPlugin and thus the data is not shown in the `Shared Preference Viewer`.
This PR implements the missing API and present the Standard UserDefaults data from the target application.
Pull Request resolved: https://github.com/facebook/flipper/pull/340
Reviewed By: danielbuechele
Differential Revision: D13464765
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 8c6cf4e9f7094fcf75c71cce43cb6c34f9f957e7
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: Added the documentation of crash reporter plugin. Also removed the stale comment
Reviewed By: passy
Differential Revision: D13434177
fbshipit-source-id: bb8b14e989c91b35cd268daea12ac7fe590c5d5b
Summary:
`react-d3-tree` is using version `3.5.17` of `d3`. However, this version of D3.js makes some assumptions about the context, which are not compatible with the way metro is bundling our plugins.
In this version of D3, they reference the `window` by using `this`. However, in metro a top level `this` is `undefined`. This causes the library to break. New versions of D3 have removed referencing the `window` using `this`. Updating `react-d3-tree` to a more recent version of D3 is not easy, because there are many breaking changes in D3 (the current version of D3 is 5.x).
This is why we decided to fix the callsites in `d3@3.5.17`. As these thinks are fixed in `d3@4.x` as well, it doesn't make sense to bring these changes upstream. For this reason, we are committing the fixed version of D3 and use yarn resolutions to resolve D3 with the version including our fixes.
These things were patched in `d3.js`:
- adding `/* eslint-disable */`
- replacing `this.document` with `window.document`
- replacing `this.navigator` with `window.navigator`
- replacing `this.requestAnimationFrame` with `window.requestAnimationFrame`
Reviewed By: priteshrnandgaonkar
Differential Revision: D13377064
fbshipit-source-id: 492eaad4f283fb6901cab089f6092b0bf62d5499
Summary:
Adding the JS part for the ComponentTree plugin.
Native parts are added in D13377058.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13377066
fbshipit-source-id: dab8f2abdde604c3f78cfd80e17b433ef5e33505
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:
Copied over form Litho, but works in our repo too.
This can be used to verify that a given version number
is properly accessible via maven. Just used this to check
if `v0.13.0` was available and sadly it wasn't because
Travis was broken. Working on that now.
Reviewed By: danielbuechele
Differential Revision: D13449948
fbshipit-source-id: 7f113d971dac341938615e6352b5981f557ffecd
Summary:
- Crash reporter plugin: Get notified for crashes in Android and iOS apps. Currently in Alpha and not enabled by default.
- Support for physical iOS devices.
- `yarn start` in open source works again (54d09aa951)
- Prevent unnecessary UI rerenders (133788380e)
- Fixes a problem on macOS where external plugin from `pluginPaths` config weren't loaded (f7ddf3b496)
- Various improvements for certificate exchange and device connections.
Full changes here: 19485d076b...c6e0517640
Reviewed By: danielbuechele, priteshrnandgaonkar
Differential Revision: D13431074
fbshipit-source-id: ef2087742911e4c5ee98af1941bc7db5cfe75578
Summary:
First add a Flow Strict config, then enable Flow Strict Local for 13 files in xplat/sonar.
each change can land seperately:
drop-conflicts
Reviewed By: passy
Differential Revision: D13368791
fbshipit-source-id: 5bc1f9d3a179f4b9a554cc8cc629db0fda468a36
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: as per title. The updated doesn't have any breaking changes. Only improvements and bugfixes.
Reviewed By: jknoxville
Differential Revision: D13376391
fbshipit-source-id: 46f2462cec87600f06fb793a42092f054489c397
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: An empty .watchmanconfig is required inside the application resources for the plugin loading to work. This diffs adds the file to the `static` folder, which is copied to the application ressources.
Reviewed By: jknoxville
Differential Revision: D13376834
fbshipit-source-id: 1b34a89c5be6f938a640c79ddb3e9ea784bd2d22
Summary: This PR adds support to catch and report signal errors to the flipper. It also reports the callstack. Please look at the video in the test plan to understand the what it does.
Reviewed By: jknoxville
Differential Revision: D13328818
fbshipit-source-id: 304a68f47bb5ca5b0014c8b7d30f6a6fc2b6d147
Summary:
On iOS devices (internal only right now), when flipper desktop isn't running we get a Network Error instead of a Port not open error, because we can always connect to the port forwarding server running on the phone.
So in this case, don't count this error as a failure so we don't needlessly delete the certificates to attempt to fix it.
Reviewed By: passy
Differential Revision: D13358147
fbshipit-source-id: 8f9fb62cd2dcada058d104ef60f788a1b62d7094
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: This was recommended by my Android Studio 3.3 when starting up, so let's do this.
Reviewed By: jknoxville
Differential Revision: D13302768
fbshipit-source-id: c38601659bde4515d62b31efbd907b44304aafba
Summary:
This deprecates the `getPlugin(String)` method and introduces
a `getPluginByClass(Class<T>)` instead which avoids having
to `instanceof`-check and then cast the result, which provides
a nicer experience for Java users.
Reviewed By: jknoxville
Differential Revision: D13277568
fbshipit-source-id: fb7b5b8c0180470ef0ad322559b5b7424520848b
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:
Adding a a react-devtools plugin for Android.
This doesn't do much, but announces the plugin to be available.
To make this work on remote device, the hostname and port sent to the device needs to be set in the dev tools. This is isn't done yet, so this will only work for simulators.
Reviewed By: jknoxville
Differential Revision: D12897151
fbshipit-source-id: b874549925c395ff6356f6745b9706b182d544dd