Summary:
When flipper starts it writes to both env vars the value from settings. This is needed for subprocesses to have access to them.
The problem with the check for both env vars is
- In prod environment applications does not have access to them
- In dev, when developers launch flipper from terminal (`yarn run flipper-server`) it picks up these env vars if they are set which can cause different behaviour in dev and prod
To make flipper work more deterministic, for users and us. I removed this check and now we always write to these env vars what the user has provided in flipper settings or the default.
Reviewed By: lblasa
Differential Revision: D51266495
fbshipit-source-id: cf3adfd4ba83a733a30b5b0b29c270b32ff3a61a
Summary:
^
Also, if an error happens, do not swallow it, rethrow.
Reviewed By: passy
Differential Revision: D49912780
fbshipit-source-id: 30451110d8c5776e2b0826d6e924ab5fe98cd7e2
Summary: Implementation was missing for the browser. This provides a default implementation.
Reviewed By: aigoncharov
Differential Revision: D48311198
fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
Summary: Migrate to new server event which allows troubleshoot
Reviewed By: passy
Differential Revision: D47875977
fbshipit-source-id: 2549bef6ebb26660176747d44e3f535ad9f1d213
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:
`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:
Simplifies medium usage. Clients report this value as an integer. Internally, we transform this integer as type (a set of valid strings).
Instead of transform this value in different places, do it once when the client query is received.
Reviewed By: antonk52
Differential Revision: D46358024
fbshipit-source-id: ecd2b6c6ccbe7c38787a89d4e2f81930c7b91864
Summary:
Design doc: https://docs.google.com/document/d/1HLCFl46RfqG0o1mSt8SWrwf_HMfOCRg_oENioc1rkvQ/edit#
Some files on the devices could be unavailable due to lack of permissions (hello SELinux and enterprise builds of iOS apps). Instead of failing the export, we should fetch what we can.
Reviewed By: passy
Differential Revision: D40551931
fbshipit-source-id: 698e157b1283b9e959909b6439cd09d2dc8dc8d6
Summary:
Design doc: https://docs.google.com/document/d/1HLCFl46RfqG0o1mSt8SWrwf_HMfOCRg_oENioc1rkvQ/edit#
In later diffs, we'll start fetching the actual files as well. The list of available files itself might be useful already to see what we have in our folder on the device
Reviewed By: passy
Differential Revision: D40508960
fbshipit-source-id: 96193fef3fed64d509cd3397513ae3e94438ae22
Summary:
When we start using Flipper from the CLI for automation, we want to have the list of currently connected devices as soon as flipper server is alive.
Otherwise, we would have to poll flipper server waiting for some magical moment in the future when devices connect.
This way, we can be certain that if flipper server started, but we do not see a device, it is not connected at all.
Reviewed By: mweststrate
Differential Revision: D40184106
fbshipit-source-id: ce4c2b897a2df0081e3a0b6a8c26640599e0f9e8
Summary: Stop bundling plugins into Flipper Server bundles. In later diffs, we will start building all plugins even in dev mode which removes the need to bundle them.
Reviewed By: lblasa
Differential Revision: D39276249
fbshipit-source-id: 091405cfcf58aa7e1bd2b382da40f8d9841ae6b1
Summary:
If there's a device client disconnect during request execution, no response is ever given back to the client (flipperd).
This change effectively subscribes to client disconnect events and notifies flipperd of any disconnection during request processing.
Reviewed By: passy
Differential Revision: D37787986
fbshipit-source-id: 31737a50b83b0cbe4141ce814064aebef7e09bfc
Summary:
Expose two new methods as to be able to:
- List plugins from marketplace
- Install a plugin from marketplace
Reviewed By: passy
Differential Revision: D37749817
fbshipit-source-id: 82b78f7906c5664d5747289fa4f8eadebcde1d73
Summary: There is a new flipper server command to install apps. For android it uses adb (via adb kit) For ios depending on idb availablity it will use idb or xcrun. Consumed in the next diff
Reviewed By: lblasa, aigoncharov
Differential Revision: D36936637
fbshipit-source-id: e09d34d840a9f3bf9136bcaf94fb8ca15dd27cbb
Summary: The part I'm most interested in is the `appVersion`. For non-debug builds this will allow us to check if a flipper-server version is compatible with flipperd/arc_uiqr or any other tool that builds on top of it.
Reviewed By: lblasa
Differential Revision: D37456699
fbshipit-source-id: 50eeb6da0f55e3a3552d43fa7c9ea34608090f97
Summary: Make it possible to ask whether a user is logged in. This won't tackle token expiration but it's consistent with the internal API we have through the `isLoggedIn` atom.
Reviewed By: lblasa
Differential Revision: D37422274
fbshipit-source-id: 2d3a5e27f5dbbe866d5392403e690faf2f1156b2
Summary:
Introduce a 'shutdown' command which effectively kills the process.
Killing the process, for flipper-server, will close down the server and active ws connections.
Reviewed By: passy
Differential Revision: D37209193
fbshipit-source-id: 83303e8209530a41ba870009603cfb383915b7a6
Summary: We have several folders Flipper uses that sometimes we forget to create before Flipper starts. With this diff we have a single place to initialise the necessary folder structure.
Reviewed By: lblasa
Differential Revision: D37036601
fbshipit-source-id: f945f2bfdfc6be24ba87bd4b13c7fcef3fd74451
Summary:
Currently, Flipper Server has a few productions dependencies (mac-ca, node-fetch) that are not bundled with the Flipper Server. It makes it harder to distribute Flipper Server, as now all potential consumers need not only to download the bundle, but also install these additional dependencies.
This diff makes it possible to bundle `mac-ca` and `node-fetch` with Flipper Server. As a result, Flipper Server becomes dependency-free in production.
Reviewed By: lblasa
Differential Revision: D36345213
fbshipit-source-id: 2cd6ba1b3301b45dc2295891964ba020fd107586
Summary:
There will likely be more so I added a place for inspecting
these messages to the top.
Reviewed By: antonk52
Differential Revision: D34681084
fbshipit-source-id: ad32145d44dba08b813d8a2ddc63d500a0c360d8
Summary:
1. Identify if device supports screenshots/screen recording when it is created.
2. Disable screen recording/screenshot buttons when they are not supported
Reviewed By: passy
Differential Revision: D34611133
fbshipit-source-id: 82ad2d67e4af482d9becf7995187667b5d99bc36
Summary: Provide server add-on writers with a well-known fetch API
Reviewed By: mweststrate
Differential Revision: D34447630
fbshipit-source-id: 70386940c12f9e53aa97b3530a7edf1d40b5f2e2
Summary:
Dynamic information means we can't deduplicate on the backend.
Logging the serial as a warning instead.
In general, I'm not convinced this is a good error to begin with
as it seems expected that devices can disappear on disconnect
but getting a better count should help to make that decision.
Reviewed By: aigoncharov
Differential Revision: D34247723
fbshipit-source-id: ace3c32d2370433dcca2debbea3a2c5d7a2ecb57
Summary: If a device disconnects quickly, trying to determine whether screenshots and alike are supported would throw, showing up in our monitoring (see attached tasks). This change fixes that
Reviewed By: nikoant
Differential Revision: D34105451
fbshipit-source-id: 8d3d6dd4c2c82f70cdff710722d789e7c1d73693
Summary:
Certificate exchange errors should be communicated back to the user, as they are often actionable, and otherwise leave users in a stuck state.
Also removed the ServerController interface, upgraded the listener types to get at the necessary internal apis typewise that were already available.
Removed that error wrapping utility complaining about idb installation, this is rarely ever the problem anymore, and it hides the underlying error.
Reviewed By: nikoant
Differential Revision: D34105452
fbshipit-source-id: 3b3cd0b99cecbda26dfd0744a90690fe568a5ea5
Summary:
https://fb.workplace.com/groups/flippersupport/permalink/1304868459993809/
Changelog: Don't show errors for clients that fail to connect in a timely fashion repeatedly.
I think this change is fine, as even once the error is supressed, the clients will show up as 'still connecting...' in the app selector dropdown, which gives the same signal, but a bit less in the face.
Reviewed By: lawrencelomax
Differential Revision: D33976460
fbshipit-source-id: 7c5a02f3cd645ed1cbda47d186798857a05906f1
Summary: Idb and adb sholuld not really be accessed out side of Adnroid and iOS device managers
Reviewed By: lawrencelomax
Differential Revision: D33915162
fbshipit-source-id: 0d1bb028b9a53254cf5b0ce6289ae76339c5a254
Summary: Remove hidden async initialization of adb and idb. Make it explicit. Remove nullable fields in Android and iOS device managers.
Reviewed By: lawrencelomax
Differential Revision: D33915177
fbshipit-source-id: 882f79310410e0dfde6169abf343ab808644e4a2
Summary:
This is related to `simctl` functionality, so can be extracted there.
This will aid in future changes whereby we can hide `getDeviceSetPath` in the IOSBridge module
Reviewed By: passy
Differential Revision: D33842987
fbshipit-source-id: de292ce5afba3e7d79d8ba27c2b8852909d7e6f3