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:
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:
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: 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:
- 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: 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: Including a fix for OkHttp issues, contributed by NightlyNexus: https://github.com/facebook/flipper/pull/313
Reviewed By: jknoxville
Differential Revision: D12883196
fbshipit-source-id: e17b43b33694f46a2bd949eafc008a772777f83e
Summary:
We're seeing some crashes when attempting to send payloads larger than are supported by rsocket.
Instead of crashing, skip the message, but log it so we can see what it's containing.
This is where the failure occurs: https://github.com/rsocket/rsocket-cpp/blob/master/rsocket/framing/FramedDuplexConnection.cpp#L64
Reviewed By: passy
Differential Revision: D12857616
fbshipit-source-id: 2b02d7f5dd6499ba81783d3f8aefcbb64d9d408a
Summary: Currently we don't have a flag in iOS setup which lets us know if the code is going to be compiled in Open source or internally. Till now we didn't have a use case for it. But NT team is hacking a componentkit descriptor which is open sourced. This flag will come in handy for us to keep the open source setup build successfully.
Reviewed By: jknoxville
Differential Revision: D10854300
fbshipit-source-id: ac5da6f239b2066b6d7f0680cbfc1b7062ae0f36
Summary:
This won't affect runtime, but is useful when debugging issues with flipper itself.
Setting this flag means all state changes will be output in logcat.
Reviewed By: passy
Differential Revision: D10231148
fbshipit-source-id: 7ddd490290ad973fc339b2f5f93a6f9a1fab4577
Summary:
The code here is quite complicated so here's whats happening:
There's a disconnect hook, that waits and reconnects, so flipper never stops, except for the case where the desktop itself fails.
This makes some sense, but not total sense, as the client should really keep connecting, in case there's a different desktop that won't fail, or even if it was a transient failure.
Explicitly disconnecting, by setting the client to null, will trigger the disconnect hook and carry on the connect loop.
Reviewed By: passy
Differential Revision: D10231241
fbshipit-source-id: 90d823dce2221b1fb6501bd2797871dc1fb9770a
Summary: Makes QPL iOS plugin to work in background
Reviewed By: jknoxville
Differential Revision: D10446049
fbshipit-source-id: 02ad6f6f83b13e326b6fdd8aa972fa7d29c76eb9
Summary:
This diff sets up flipper for running plugins in background. This diff does the following
- Adds a function named `runInBackground` to the interface `FlipperPlugin` to make the plugins opt in to be run in background, default is false
- Changes the javascript side of the flipper to store the messages received by the plugins in background
- Process the stored messages when the plugin in background becomes active
- Currently I have just turned on network plugin to be in background mode.
- Remove the buffering from the network plugin, as it will run in background
- Write a batching layer to batch the messages and send to flipper.
Note: I haven't tested the wilde app yet, but the sample app works. I will remove the "[WIP]" from the title once I have tested it in wilde
Reviewed By: danielbuechele
Differential Revision: D10301403
fbshipit-source-id: 034eebf659a545d6b480a4ac1b73b0aa4b2f9797
Summary: New 0.8.0 release which includes name changes from sonar to flipper.
Reviewed By: passy, danielbuechele
Differential Revision: D10050160
fbshipit-source-id: 5394ea0d032cea39f40cc9ed8e0f054e506d4f04
Summary: This shouldn't have any effect on anything, it doesn't need to be any particular value.
Reviewed By: danielbuechele
Differential Revision: D9944462
fbshipit-source-id: f84c70b3cd18fdfe1d41f07b5b0ede2fdec3f44a
Summary: We are referencing a no longer existing folder.
Reviewed By: priteshrnandgaonkar
Differential Revision: D10009244
fbshipit-source-id: 710c363fdeaf4f8621eb5f5d0bde2cbd4295ae64
Summary: Part of sonar to flipper rename
Reviewed By: priteshrnandgaonkar
Differential Revision: D9929102
fbshipit-source-id: 88cdbd33aa5c76e386449f54f4eb8c6435865ed1
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9929101
fbshipit-source-id: f33e1ac7f88fbe88a9d48180d064b596603a3c58
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9920275
fbshipit-source-id: 02f97d1e51d58864283d26e8d3a724cac973e938
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9919821
fbshipit-source-id: a44a2a04d5463750f884f8bf1328e02d56593e82
Summary:
Part of Sonar -> Flipper rename.
It's about time this is renamed from *Websocket as well, since it doesn't use websockets anymore.
Reviewed By: passy
Differential Revision: D9919695
fbshipit-source-id: 78a63bfb7d5de19c093b7fb775d1426b4fc58f77
Summary:
Part of the Sonar -> Flipper rename
Intentionally left externally visible buck target as Sonar for now to minimize diff size.
Reviewed By: passy
Differential Revision: D9871684
fbshipit-source-id: 6926eb62c578a05cd895745c75ed7da3cfe965b5
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/277
Link all dynamically loaded libraries statically with the exception of libevent.
Reviewed By: jknoxville
Differential Revision: D9967422
fbshipit-source-id: b33cec5da0c2b34f47217353f205b9d77f1acae2
Summary: This diff wraps the call to refresh plugins in `performAndReport`. All the important methods are already wrapped in this function. This diff also logs the error in the standard error if the connection is not established. With this diff the iOS app should not crash due exceptions thrown in iOS and cpp code. For android the app won't crash due to exception of cpp but can crash due to exceptions thrown in java code of the plugin
Reviewed By: jknoxville
Differential Revision: D9848112
fbshipit-source-id: 689ef9240e47400e8ce8c89b4c0ccec43d2180f9
Summary:
Versions of flipper from before 7th August 2018 don't return any response, so we don't store any connection_config.json file.
To keep the functionality the same as with up-to-date app versions, when this happens, store an empty config file ("{}").
Reviewed By: danielbuechele
Differential Revision: D9682885
fbshipit-source-id: fd580f6bba6b6b20135aa2c076be10e1eea0f8bc
Summary: Loading the deviceId is not critical, so if it ever fails, we can live with that by swallowing the exception and using the default (possibly 'unknown' deviceId).
Reviewed By: danielbuechele
Differential Revision: D9682886
fbshipit-source-id: e5d60dd262fce683dd444167edd1475e0c029759