Summary: This can be provided as an override, but is not needed for regular usage.
Reviewed By: antonk52
Differential Revision: D50405097
fbshipit-source-id: 7238f99ef08bfdf5c7adda0e8c3294341ae86e89
Summary:
**Issue**
From passy:
when one of the app server ports is occupied, Flipper PWA is stuck at the loading screen
Reviewed By: passy
Differential Revision: D50261985
fbshipit-source-id: 8ce90cd6d515c26a824645f642dacbe92e7f4105
Summary:
Even though node docs state
> Assigning a value to process.title might not result in an accurate label within process manager applications such as macOS Activity Monitor or Windows Services Manager.
Locally this worked for me on M1 machine. Will test on intel as well.
Reviewed By: lblasa
Differential Revision: D50228844
fbshipit-source-id: 69937ded7da259e05335df50332ea114ff566f21
Summary:
The logs written to the file shouldn't be JSON.
It just makes it hard to read and there's no tool to process this either.
Instead, write the logs as seeing in the console for easier reading.
Reviewed By: antonk52
Differential Revision: D50219806
fbshipit-source-id: a07fb53a10b36e1a3c2992a133b8c0c818bd816b
Summary:
There used to be a flag to control whether we wanted to replace an existing running instance.
No longer in use so safe to delete.
Reviewed By: antonk52
Differential Revision: D50077975
fbshipit-source-id: 8d7bad1f85e4520fd006cdcabe6e9899468688cc
Summary:
Get the authentication token before an open as either browser or PWA.
There could be cases whereas the PWA gets launched first before the token is exported to the manifest and thus it makes it not possible to connect on a first launch.
Reviewed By: antonk52
Differential Revision: D50004992
fbshipit-source-id: d58b7a75dcb9aaf7fadd3e3c3a773581441f9d92
Summary: One log was misplaced, also added another one.
Reviewed By: passy
Differential Revision: D49873310
fbshipit-source-id: b391e2be600070eb96e6cd53846f5665f8400edc
Summary:
If no version information is obtained, check if port is in use.
This is for the cases in which an older server which may not have implemented this endpoint fails to return version information.
In this case, send the shutdown command.
Reviewed By: antonk52
Differential Revision: D49830759
fbshipit-source-id: 6c9763d01f335ecc8a28df3b90d319f98016c2da
Summary:
Expose an endpoint to retrieve server environment information.
We can use version information and process number to aid engineers with troubleshooting Flipper.
Reviewed By: antonk52
Differential Revision: D49537325
fbshipit-source-id: 511fe4441638f91cd35f13706ceeeb515051416b
Summary: Use the newly exposed HTTP shutdown API. It is simpler.
Reviewed By: antonk52
Differential Revision: D49499264
fbshipit-source-id: 2d81db1d1a66c0b7550ee1245e51d8f1a8671aa6
Summary: Generate auth token on whenever we load the secure server config, and add more logs.
Reviewed By: antonk52
Differential Revision: D49272857
fbshipit-source-id: 1e549a8bfd7926e9a44b9480432e92ee3c0162b2
Summary:
A few things need to be done which are on this change:
- Certificate generation should execute as an atomic operation, hence, it needs to be synchronised.
- Do not generate client token as part of certificate generation. This causes a deadlock now.
- Add more logs for troubleshooting
Reviewed By: aigoncharov
Differential Revision: D49269624
fbshipit-source-id: 071a8e5b895198730b7d914cc4622837e9094e2f
Summary: This should be a blocking call and done later as it depends on the FlipperServerConfig to be set.
Reviewed By: antonk52
Differential Revision: D49193650
fbshipit-source-id: 4f74ca5de30b7f992880bbb9032792fd713203b7
Summary: Don't log it, otherwise it may end up in Scuba, we don't want that.
Reviewed By: antonk52
Differential Revision: D49187133
fbshipit-source-id: 38d4ea0801a9abbc463c23340e23f8b55e0d22f3
Summary: Changelog: FLIPPER_DISABLE_KEYTAR env var can be used to force in-memory implementation
Reviewed By: lblasa
Differential Revision: D49183501
fbshipit-source-id: 4ce886303678485673750417b09f272dd3f66623
Summary:
Flipper Launcher downloads, unpacks, launches Flipper, and closes itself.
This is fine except for the fact that Flipper may be initiating and thus there's a gap of a few seconds until engineers see the main Flipper UI.
This change improves this by launching earlier, even if just showing a loading page until Flipper is actually ready.
Reviewed By: passy, aigoncharov
Differential Revision: D48824479
fbshipit-source-id: aa6147a09f313d80592c9b08d089660ba73773a4
Summary: Updating the remaining tsconfigs to build for an ES2021 target.
Reviewed By: antonk52
Differential Revision: D48687661
fbshipit-source-id: 2761704d251f701594ca5d362a17731f287088ed
Summary:
This change replaces the existing logging infra with the one defined and exposed in flipper-server-core.
Functionality remains the same with the addition of having support for Scribe.
Reviewed By: aigoncharov
Differential Revision: D48515246
fbshipit-source-id: 7970f6ad069821ee4f15136adc8da40d0b1fb0c7
Summary:
This updates minor and patch level dependencies. Frustratingly, I had to revert a bunch
of changes in that version range that still caused incompatibilities and test failures.
If I find time, I'll dig a bit deeper.
Reviewed By: ivanmisuno
Differential Revision: D48433210
fbshipit-source-id: 9ab12e774c1992d4f22cc1428d34f102ce820b75
Summary: As TCP is the only option, remove all branches.
Reviewed By: passy
Differential Revision: D48265093
fbshipit-source-id: 174527f05d8a841797fd95256e77fdeb9b2e6ad5
Summary: UDS will be removed. The first step would be to remove the TCP optionality.
Reviewed By: passy
Differential Revision: D48264741
fbshipit-source-id: ca9e1b68be61e99240e95bcd4f26f2db63a64005
Summary: To avoid the cases whereas Flipper opens up in engineer's default browser which may be different than Chrome.
Reviewed By: aigoncharov
Differential Revision: D46682220
fbshipit-source-id: 38d0ddefbc67989c5ec97a66e4a419318a66bc95
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:
Add a few console logs as to highlight how long does it take for our server to start.
Additionally, do not wait until we are ready for client connections before attempting to launch. There's nothing else we do at this point. Instead, launch and wait until we are ready.
Reviewed By: passy
Differential Revision: D46639482
fbshipit-source-id: c098d229edc3cd52e5c876c509a7c81532635afa
Summary:
^
Token is no longer in the static directory. Also, we can now use a shared utility.
Reviewed By: aigoncharov
Differential Revision: D46516296
fbshipit-source-id: c38d024061653ac8b3fb587c8e3ad83dba0b151d
Summary:
^
There is an issue whereas when Flipper Server is launched NOT from the terminal, it doesn't inherit the user's terminal `$PATH` variable.
This causes a few different issues.
This change tries to address that.
Reviewed By: passy
Differential Revision: D46392435
fbshipit-source-id: 6201a1749134db8c50eca8751af149737dce57d7
Summary:
^
Basically, update Jest and fix any raised issues. Mainly:
- Update necessary dependencies
- Update snapshots
- `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx`
- `mocked` -> `jest.mocked`
Changelog: Update Jest to v29.5.1
Reviewed By: antonk52
Differential Revision: D46319818
fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2
Summary:
Replace an existing running instance, if any.
This is useful for:
- Applying updates
- Ensuring freshness of server
Reviewed By: passy
Differential Revision: D46146814
fbshipit-source-id: bfb760f3ab26b7632510773609f1c6ca3a97c4ec
Summary:
Right now, this simply avoids trying to create a server instance if one appears to be already running.
In a future change, we may decide to kill the existing instance and replace it with a new one.
But, in this case, running this as is will be useful as it will provide the connection URL with the auth token.
Also remove flipper server dependency from finding installation. In this case, we don't need it and can use `os.getPlatform()` instead.
Reviewed By: antonk52
Differential Revision: D46144843
fbshipit-source-id: 2922843b916d37e0126e43ae65a622f87a6920ec
Summary:
Clean initialisation by passing down the environment info to start server.
(Also rename dir to path as that's the name used in other places)
Reviewed By: passy
Differential Revision: D45731751
fbshipit-source-id: a60fdd49c567fc312d1f8da72db3a46a0828c140
Summary: The isHeadlessBuild flag was not properly set.
Reviewed By: antonk52
Differential Revision: D45728435
fbshipit-source-id: 3616c4358114d4f3d96372766dabf48b27b44333
Summary:
Until now, launching flipper-server with TCP would accept any incoming connection as long as it comes from the same origin (localhost) using web socket host origin verification.
This is not entirely secure as origin can be spoofed with tools like curl.
Our team created a security review and a proposal was written:
https://docs.google.com/document/d/16iXypCQibPiner061SoaQUFUY9tLVAEpkKfV_hUXI7c/
Effectively, Flipper can generate a token which is then used by the client to authenticate.
This diff contains the changes required to generate, obtain, and validate authentication tokens from clients connecting to flipper over TCP connections.
The token itself is a JWT token. JWT was chosen because it is a simple industry standard which offers three features which can immediately benefit us:
- Expiration handling. No need for Flipper to store this information anywhere.
- Payload. Payload can be used to push any data we deem relevant i.e. unix username.
- Signing. Signed and verified using the same server key pair which is already in place for certificate exchange.
Additionally, the token is stored in the Flipper static folder. This ensures that the browser and PWA clients have access to it.
Reviewed By: mweststrate
Differential Revision: D45179654
fbshipit-source-id: 6761bcb24f4ba30b67d1511cde8fe875158d78af
Summary: Combining a bunch of individual tasks for dep upgrades into one diff.
Reviewed By: ivanmisuno
Differential Revision: D42706074
fbshipit-source-id: 054b2545ad1295699f47f4c6eb5065b7b9a1d6a0
Summary: Some plugins import from shared directories. These directories are not plugins themselves, therefore the current plugin root searching mechanism does nto work for them. To support plugin reloading for this scenario, we start re-building all plugins if we fail to find a plugin root.
Reviewed By: lblasa
Differential Revision: D39693820
fbshipit-source-id: 33dd7de4121bd5665a39b0ea96adce4603dc7df0
Summary: Now that we build all plugins at all times and it is super-fast, these options are redundant
Reviewed By: lblasa
Differential Revision: D39542723
fbshipit-source-id: 1b30ba384267ec4fd0c35b4dc14f0223ffe414c9
Summary: Watch source plugin folders and notify frontend that any of them changed. In subsequent diffs, we will start reloading plugins that changed.
Reviewed By: lblasa
Differential Revision: D39539443
fbshipit-source-id: 726916c0bce336a2c0179558526bcb1b74e35b93
Summary: Move flipper local deps to prod deps, so yarn installs them later when we build a bundle
Reviewed By: lblasa
Differential Revision: D39475545
fbshipit-source-id: 5b61d15b45ee315c3b35d8e6836c114b90503b1a
Summary: Flipper server itself requires no babel transforms. We applied extra transforms only for the bundled plugins. However, we pack and ship all plugins in the /static folder. They are always available on the FS. Therefore we could stop bundling any plugins into flipper-server's source code.
Reviewed By: lblasa
Differential Revision: D38910251
fbshipit-source-id: b3e9fe5ae2ab69ce5579b01b6793ebf7e88baf66