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:
See FBPortForwarding/README.md for an explanation of what this is.
It's required for the upcoming support for physical iOS devices.
To simplify development of the JS app, We're going to bundle the pre-built PortForwardingMacApp
inside the repo, and inside the electron app (static/PortForwardingMacApp.app).
Adding this source so users can build it from source if they choose to.
Reviewed By: danielbuechele
Differential Revision: D13276022
fbshipit-source-id: 99b18e0412cf443bb4a67eb4846cc780e0014de1
Summary: Previously an empty string would crash the flipper client. Now that we handled that ok, we can reenable the descriptors.
Reviewed By: jknoxville
Differential Revision: D13257534
fbshipit-source-id: 09be4834d5a7023b2fa4e2bee7e57e412916120b
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:
This does two things:
1. Change "Connect to desktop" to say which connection it's establishing instead, which makes it clearer what's actually happening. This step really does mean establishing a connection, because what happens during that connection is asynchronous after this step completes.
2. Call step->complete() after certificate exchange connection is established. This wasn't happening before, so you'd always get "[Failed] Connect to desktop" even after a successful cert exchange.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13256783
fbshipit-source-id: 5e8e3a54f52d2e0adbde4c6d82d1acc840f1eb59
Summary:
During certificate exchange, the mobile device creates a public/private key pair, and then requests a certificate from flipper to match it's public key.
Flipper responds with the cert and it's written to the sonar dir along side the key pair files.
If certificate exchange happens again for any reason, the mobile device will regenerate the key pair and request a new cert. If for any reason that cert never arrives, then the device is in a state where it has the new key pair, but the old certificate that doesn't match its new credentials. This would never work, but it means you get a strange SSL error because you're using inconsistent files.
To improve error messaging, I'm making the client wipe all files before starting the certificate exchange step, so you should never get key/cert mismatches. Now the device can tell it doesn't have all the necessary files and won't even attempt to connect until it does.
Reviewed By: passy
Differential Revision: D13256369
fbshipit-source-id: 28f3cb5ba5938c17f01294683ba86c418f651376
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:
Flipper uses SSL between device and computer. If, for example, the time on the mobile device is outdated. The server cert on desktop may appear to be from the future, leading to the connection being rejected.
Pull Request resolved: https://github.com/facebook/flipper/pull/336
Reviewed By: danielbuechele
Differential Revision: D13234612
Pulled By: jknoxville
fbshipit-source-id: 5eccc3abc763deb5bce3520d880a522a9a32ec86
Summary: The fb-stubs transform is getting applied when it shouldn't. Fix it by only applying it if src/fb exists.
Reviewed By: danielbuechele
Differential Revision: D13236217
fbshipit-source-id: 940def377839d16f34c49504948cb062916a3d6a
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:
The CSR generation code is written in C-like code with no excpetions because so is openssl, with no RAII structures.
So we don't have fine-grained insight on what could go wrong, but at least if it fails altogether we should error.
Reviewed By: passy
Differential Revision: D13233725
fbshipit-source-id: 75cb3c21144b591947f686b5ad529a14a011baa8
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:
This diff adds few tests for flipper client on iOS side. This tests are similar to the ones which exists in xplat but this tests the iOS side of flipper client.
Following tests are added
- connect , disconnect block called on plugin
- background plugin activated before init method
- crash getting suppressed
Reviewed By: jknoxville
Differential Revision: D13167637
fbshipit-source-id: 6c21d5cf2f08e7e3c17ecacbf3badfbde80fb5d1
Summary: Wraps flipper client methods to avoid crash. Also added a tests which makes sure that malcious plugin cannot cause a crash
Reviewed By: jknoxville
Differential Revision: D13153277
fbshipit-source-id: ac21731fa3c4eb447f189e61f61b9e83aad91e13
Summary:
This PR adds the barebone of a crash reporting plugin in android. Since there is no easy way to stack the PR's in git, creating a new PR, but this depends on the [iOS PR](https://github.com/facebook/flipper/pull/322)
Pull Request resolved: https://github.com/facebook/flipper/pull/328
Reviewed By: jknoxville, passy
Differential Revision: D13137447
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 3b86cebbb1ea01601405dd7ba58e1caa2b506065
Summary:
- Docs for UI components are now automatically published: https://fbflipper.com/docs/ui-components.html
- Stop caching source files in dev mode: ad98ba3235
- `createTablePlugin` now uses persisted State: db42e8e970
- HTML in network responses now gets formatted: a56d7d5d72
- Notification filters are persisted between sessions: 9fb3a56303
- Prevent Flipper SDK crashes from bringing down Android apps: ddbb3c7f89
- Fix Android devices from not showing up: a6765deec6
Full commit log since the last release available here: https://github.com/facebook/flipper/compare/v0.11.1...v0.12.0
Reviewed By: jknoxville
Differential Revision: D13153344
fbshipit-source-id: e67e2ac9469b2a5ef58d1963a38b1c8f448bd4fb
Summary:
Last one that's available through the DSL. The Android
plugin still isn't.
Reviewed By: jknoxville
Differential Revision: D13176791
fbshipit-source-id: 6684812bb4fee1dcd9db1503e660fb019160224e
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:
Doesn't change how it works, but using the new recommended mechanism for loading plugins.
Pull Request resolved: https://github.com/facebook/flipper/pull/331
Reviewed By: jknoxville
Differential Revision: D13167476
Pulled By: passy
fbshipit-source-id: ac0ae925f5780136ce5c1fcb666faa79c19e049c
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: Added tests for flipper client which makes sure that didconnect is called in the case of background plugin. It also checks the case of a non background plugin.
Reviewed By: jknoxville
Differential Revision: D13152686
fbshipit-source-id: 7850f66a42d669243f656a1e1c26584869ee919f
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
Summary:
Some network requests are yielding error: e.getMessage() is not a function.
It shouldn't be .getMessage(), it should be .message
Reviewed By: priteshrnandgaonkar
Differential Revision: D13137334
fbshipit-source-id: 72c782376c8e62a05c5e9ce1b956566ce1fc5bf0
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: This diff wraps all the important places where the java code is called in a try-catch block in order to avoid flipper bringing down an app.
Reviewed By: jknoxville
Differential Revision: D12839504
fbshipit-source-id: 4711bccbe6d50094d76ed7ecd1eb652cefc2a090
Summary: This diff just adds the changes done here D12829542 for the OSS
Reviewed By: jknoxville
Differential Revision: D12839582
fbshipit-source-id: 0bdfa9e8e661309454709819af703499cd540ab4
Summary:
This PR adds a stub podspec files which will be pushed to cocoapods master repo to reserve our project name on cocoapods master repo. This PR follows the suggestion given by KrauseFx in #132 132. I have reserved the name of [Flipper](https://cocoapods.org/pods/Flipper) and [FlipperKit](https://cocoapods.org/pods/FlipperKit) on cocoapods with these stub podspecs.
Pull Request resolved: https://github.com/facebook/flipper/pull/330
Reviewed By: passy
Differential Revision: D13118301
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 754a69ee9577c1357cf3284b5c89143d46f69c87
Summary:
This PR adds the example flipper plugin in swift sample app. Example flipper plugin acts as an example for the plugin authors. The example flipper plugin was already added in an objective c example but the swift sample app didn't have it.
Pull Request resolved: https://github.com/facebook/flipper/pull/329
Reviewed By: jknoxville
Differential Revision: D13085611
Pulled By: priteshrnandgaonkar
fbshipit-source-id: d86cca43e95592ecca8d9991d170e62170b8217b
Summary:
Bug report here: https://fb.facebook.com/groups/230455004101832/permalink/519062535241076/
This has broken layout plugin when NT components are used.
Removing the subdescriptors as a quick fix. At the moment, this means removing the new NT features.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13103790
fbshipit-source-id: 57c10a0a07507aaba0cd7a20d1b548470203f2f6
Summary: Stops them from jumping around if they try to connect more than once.
Reviewed By: passy
Differential Revision: D13084056
fbshipit-source-id: 803538298c45b9c28e5116f072518e8632b0f1cf
Summary:
Adds an optional interface that, when implemented, adds
a "Report Bug" button to the top of the screen.
This is a weird Android-ism that's sadly still the
recommended way of providing hooks into Fragments:
https://developer.android.com/guide/components/fragments#EventCallbacks
In order to keep things vanilla here, let's follow that pattern.
Reviewed By: jknoxville
Differential Revision: D13045578
fbshipit-source-id: 1506fcfc630c2d1183d7d1eaf470d23954e0c097
Summary:
This allows passing in some options in an easy way, like a callback
that contains all debug information for a bug report.
Reviewed By: jknoxville
Differential Revision: D13045282
fbshipit-source-id: 5698228ee9aef31d406313047b6836dc928448cf