Summary:
Session Id should be shared between client and server, but it was defined deep in the client (redux store).
The proposed solution presented below is to move the session id to the server configuration. By doing this, it becomes available to both server and client VERY early in the application life-cycle for both Electron and non-Electron builds.
Reviewed By: LukeDefeo
Differential Revision: D48520367
fbshipit-source-id: ca959b27ab18b1a2e4cd2fac1d28545664f1b514
Summary: The linter otherwise wants us to remove `awaits` which are in fact required.
Reviewed By: lblasa
Differential Revision: D48467534
fbshipit-source-id: 355aee4bc22098086600b85edf58c8ed077b8aaf
Summary:
For dev, let's not kill the server.
Also, reintroduce a timeout of 60 seconds before disconnecting.
Reviewed By: antonk52
Differential Revision: D48432317
fbshipit-source-id: bac6f67101e5be481af06a5ea6ccb3b3134c4075
Summary: Implementation was missing for the browser. This provides a default implementation.
Reviewed By: aigoncharov
Differential Revision: D48311198
fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
Summary: This change removes the UDS support and thus the need for having a proxy server.
Reviewed By: antonk52
Differential Revision: D48265244
fbshipit-source-id: c76bb4afba63959ddd17901b3887aa278b000beb
Summary: As TCP is the only option, remove all branches.
Reviewed By: passy
Differential Revision: D48265093
fbshipit-source-id: 174527f05d8a841797fd95256e77fdeb9b2e6ad5
Summary: Instead of delaying the shutdown by a set timer, immediately shutdown.
Reviewed By: antonk52
Differential Revision: D48264571
fbshipit-source-id: 5e6556f2ecafb7cf9a19b3075e72f2be1abf9f95
Summary:
If listing devices is successful, then don't record the event
as this is triggered every X amount of seconds.
Reviewed By: antonk52
Differential Revision: D47995681
fbshipit-source-id: 2d0fa68fd7b9c4ce74bad9e8cc0296691d9b8880
Summary: Commands can be idb or adb. If no ClientQuery is provided, set the OS accordingly.
Reviewed By: antonk52
Differential Revision: D47990745
fbshipit-source-id: 3e38b6ecb0a8ea21e584c1d6eff6feb53dd2cfab
Summary: OS will become useful later on, add it.
Reviewed By: antonk52
Differential Revision: D47989161
fbshipit-source-id: 3615544051b163b77f87e5c52e6ac9cae8c478d4
Summary: This is quite annoying and causes may un needed reboots of flipper server while developing
Reviewed By: antonk52
Differential Revision: D47949842
fbshipit-source-id: c2f18e16a4933e4209e74f51978cb7d05b80ee11
Summary:
^
A dashboard to display the logs from a user session will be built next.
Reviewed By: antonk52
Differential Revision: D47944634
fbshipit-source-id: fb9e53981de5abb401c93c47cdec68f72c944b94
Summary:
Styles are applied depending on entry type. This was an issue when we had 'cmd' as a type too.
So, let's simplify and keep type to denote info, warning, or errors.
Later on we can add a different tag if we want to differentiate between logs, command, others.
Reviewed By: passy
Differential Revision: D47912857
fbshipit-source-id: 213a0768a95f63cbd692ba96f6745ab740346a58
Summary: Migrate to new server event which allows troubleshoot
Reviewed By: passy
Differential Revision: D47875977
fbshipit-source-id: 2549bef6ebb26660176747d44e3f535ad9f1d213
Summary:
Some commands are run without a ClientQuery i.e. fetching devices.
Nevertheless, this can be provide insights when problems take place.
Reviewed By: antonk52
Differential Revision: D47795358
fbshipit-source-id: 0b7dc34475ae061f1b72843a087a798d305ed1c8
Summary:
If the proxy fails, exit.
The proxy server is the one listening on the supplied TCP port, used by PWA.
If it has failed, then quit the process.
Reviewed By: aigoncharov
Differential Revision: D47433631
fbshipit-source-id: 55750db5bf3e00876074a6b403747ec07718878c
Summary: If it is successful, we rarely care about stdout, which can be quite verbose. So don't use it.
Reviewed By: antonk52
Differential Revision: D47339446
fbshipit-source-id: 66f43d4184e44ed07364a6f33715139e19b2dc1d
Summary: Remove debug logs and add re-format other warn logs to have parity with iOS
Reviewed By: antonk52
Differential Revision: D47330455
fbshipit-source-id: ac8edde2124bbe99d0ea11f46f3b85dd77b96c7b
Summary: To dispatch events, we need a valid instance of FlipperServer. This is the place so enable the recorder with it.
Reviewed By: antonk52
Differential Revision: D47295986
fbshipit-source-id: f2231544c58ba8f76e9102265e10a99520260b0a
Summary:
CertificateProvider is intrinsically related to a client query, make it available to it.
This becomes the optional 'context' of shell executions. When these are recorded, the context is provider to the recorder which can then link an ongoing certificate exchange process with the success or failure of said command.
Reviewed By: antonk52
Differential Revision: D47295894
fbshipit-source-id: 9469d18bda02793d71a6a8b29c93f4af1db23569
Summary:
Centralise connectivity logging into a single place. By having all logs go through a single interface, then it becomes trivial to manipulate them as needed.
In this change, this is not done.
In subsequent diffs, logs will be dispatched via an event and will be visualised in the Connectivity Hub.
Reviewed By: passy
Differential Revision: D47185054
fbshipit-source-id: fb5eab98895be0c8f61fb9a77d3e66d6a8dbcb27
Summary:
Bit of refactoring, bit of improvements, maybe. Mainly:
- Name consistency
- Promise chaining to async/await
- Refactoring
Reviewed By: lawrencelomax, antonk52
Differential Revision: D47224620
fbshipit-source-id: 5f4515f576decc03d470c11f24577b43f34a5a28
Summary: Already have SecureClientQuery. No need to have this as a type as it's not used or needed anywhere.
Reviewed By: antonk52
Differential Revision: D47210345
fbshipit-source-id: d9f3026a0e2a0b5dd2e87f16dba34a388dacd75f
Summary: It should've been there with ClientQuery.
Reviewed By: antonk52
Differential Revision: D47210314
fbshipit-source-id: 869496918648f20b616c1a612296fff55597af77
Summary: Bit of reorganising as utils is a bit too generic and crowded.
Reviewed By: passy
Differential Revision: D47186536
fbshipit-source-id: 7b1dd26db95aef00778ff4f23d91f7371c4d07ad
Summary: It doesn't get more generic than 'comms'. So, narrow it down: app-connectivity.
Reviewed By: passy
Differential Revision: D47185255
fbshipit-source-id: 87e9c2487c9b07603d14e856de670757078c0da1
Summary: Make it more clear about that this is. `ServerAdapter` was VERY generic.
Reviewed By: passy
Differential Revision: D47185076
fbshipit-source-id: 7d9b30f423398004bedc92ad22bc0217d1c8453f
Summary:
`setProcessState` does some adjusting to PATH. This was only ever done for Electron.
This change moves that functionality to FlipperServerImpl which is the one what orchestrates. By doing this, flipper server also benefits from getting these adjustments.
Reviewed By: antonk52
Differential Revision: D46836659
fbshipit-source-id: f98291d320cf9b7f3808223af8745c068b1318ce
Summary:
When distributing plugin over Marketplace. Currently there is an issue with downloading a plugin to `tmp` folder if the plugin `packageName` starts with `company-prefix/flipper-plugin-name`. It would throw `ENONET` error while trying to stream the response data into `tmp` folder.
## Changelog
- add support for prefixed plugin package names (`shopify/flipper-plugin-name`,...)
Pull Request resolved: https://github.com/facebook/flipper/pull/4811
Test Plan: - Try install a plugin from Marketplace which has `/` in the plugin `package.json` `name`.
Reviewed By: lblasa
Differential Revision: D46679195
Pulled By: passy
fbshipit-source-id: f330896dae9da7cbe101b1c6d7ed07667fb7ae0a
Summary:
^
In addition to logging to the console bootstrap performance metrics, track these events to scuba as well.
Reviewed By: aigoncharov
Differential Revision: D46648876
fbshipit-source-id: 191704c13158884bb8cfbca614a23f2a64f1fd93
Summary: This is a better place as it takes place once the server starts listening.
Reviewed By: passy
Differential Revision: D46558350
fbshipit-source-id: f586defecc8e16d8f0b285615803662d8b6b75fb
Summary: This is necessary as we map from the protocol medium to our internal medium representation.
Reviewed By: mweststrate
Differential Revision: D46557431
fbshipit-source-id: 617307cd860e1c7e230be2441c06417c44af580e
Summary: If after 15min there are no connected clients, close flipper server.
Reviewed By: antonk52
Differential Revision: D46519563
fbshipit-source-id: c3396ed8987be8ca7075c644734793e4ebceba18
Summary: These are no longer that useful and can be quite verbose, remove.
Reviewed By: antonk52
Differential Revision: D46516093
fbshipit-source-id: e6c3a546d379ca20ff8757fdc3feaa11bf0788a0
Summary:
All clients need to provide an authentication token before connecting. Electron app is no different.
This change adds the authentication token whether we are connecting over UDS or TCP.
Before this change, if Flipper server was already running, launching the Electron app would look similar to this:
{F1016961594}
Reviewed By: antonk52
Differential Revision: D46418758
fbshipit-source-id: f00ffe675df78403d5921250e3e9ed9331a55bde
Summary:
Used to be stored in the static directory as it was meant to be used by connecting clients.
This is still the case, except that there may be different clients with different static directories all trying to connect to the same server.
Instead, store the authentication token with the other crypto files, in the user's home directory.
By doing this, all clients, as long as they have access to the local filesystem, can use it.
Reviewed By: mweststrate
Differential Revision: D46418639
fbshipit-source-id: 181e98346d86ad7b3fc1d0005aca3350deb6df32