Summary: Plugin download failure is typical a transient error, no need to trigger monitoring for that
Reviewed By: ivanmisuno
Differential Revision: D43118116
fbshipit-source-id: 0cd0f87f0ed6123adcba28139308ecea92b1b508
Summary:
The 'screenrecord' command is not in some Android phones e.g OPPO. So 'screenrecord' command can't be used as a basis for determining whether or not you can take a screenshot. Replace it with 'screencap' command to determine whether you can take a screenshot.
## Changelog
Fixed a bug where the screenshot of some Android phones was unavailable
Pull Request resolved: https://github.com/facebook/flipper/pull/4366
Test Plan: It passed the test on my Mac and OPPO phone Reno2.
Reviewed By: ivanmisuno
Differential Revision: D42918902
Pulled By: passy
fbshipit-source-id: c1f02f075817d90e0d447f466a1168b6ec932e4e
Summary: Combining a bunch of individual tasks for dep upgrades into one diff.
Reviewed By: ivanmisuno
Differential Revision: D42706074
fbshipit-source-id: 054b2545ad1295699f47f4c6eb5065b7b9a1d6a0
Summary:
In our organization, Flipper is distributed in a version controlled way. As a result, we do not want users to manually update or receive prompts to update when a new version is available. There is already a `--updater` flag in the command line arguments for flipper.exe, but it isn't piped through. This change pipes it through and disables all update related UI when `--no-updater` is passed in.
## Changelog
Support --updater and --no-updater options for flipper.exe
Pull Request resolved: https://github.com/facebook/flipper/pull/4277
Test Plan: Ran `yarn build --win` in flipper/desktop, and launched flipper.exe from flipper/dist/win-unpacked with the `--updater`, `--no-updater` and no flags and ensured the proper behavior was observed (update UI shows by default or when `--updater` is specified, and doesn't show when `--no-updater` is specified).
Reviewed By: passy
Differential Revision: D41298321
Pulled By: mweststrate
fbshipit-source-id: 5ddfede2700954f0fdd6a111b20d0836fab25565
Summary:
Not in all environments keytar is available, but still it will be useful to be able to login to intern with Flipper, even for temporarily sessions. This solution falls back to in memory storage.
Note that the underlying assuption is that multiple different users are not connected to the same Flipper server, as this would share their session!
https://fb.workplace.com/groups/flippersupport/permalink/1498550730625580/
Reviewed By: passy
Differential Revision: D41218132
fbshipit-source-id: 6e518d742df639bfbdc9a36ed1fa56ecb363a0b0
Summary: On older Android devices (API 24) `-printf ` is not available
Reviewed By: lblasa
Differential Revision: D40980640
fbshipit-source-id: d1a1bcadc496deaf3d514c1e45b2e0104a937b18
Summary:
Flipper plugins fail when importing css from third-party dependencies. This diff tries to fix that.
Effectively, the plugin can import the css and export it when is bundled.
When we load the plugin, we check if there's a css file for it. If there's one, we return it and try to use it.
Reviewed By: aigoncharov
Differential Revision: D40758178
fbshipit-source-id: e53afffcc481504905d5eeb1aea1f9114ee2a86b
Summary:
Closes https://github.com/facebook/flipper/issues/4203
CHANGELOG: Stop doing eval to load server add-ons
On Windows `details.path` contains backslashes. When we interpolate it, it loses one of the backslashes and subsequently `require` fails to load it. If we do not interpolate it (by ditching eval) it has the double backslash and work just fine.
Reviewed By: lblasa
Differential Revision: D40715523
fbshipit-source-id: 50c52f2a53690b585a32d3009f1692cf0b0d8428
Summary: When Flipper starts with Flipper Server enabled, on Windows we forgot to attach the WebSocket handler. It led to a white screen on Electron or to connection timeout messages on Flipper Server.
Reviewed By: passy, lblasa
Differential Revision: D40679781
fbshipit-source-id: 1c8df8012efc54077409eb8891b1d82ddaf16689
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: pull/push might fail when run-as fails on insufficient permissions. When this happens, try to perform the command as root.
Reviewed By: aigoncharov
Differential Revision: D40623363
fbshipit-source-id: a4cc71d70f83ce1a390b14c9af9d3a3fa09f1307
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:
We would like to version control Flipper and some of our custom plugins that are installed on developers' systems.
Flipper by default prompts users to upgrade so they sometimes do the update and then all our custom plugins break because they were compiled for an older version.
See https://github.com/facebook/flipper/issues/3947 for feature request info.
## Changelog
Adds notifyAvailable flag to config.json to disable prompting for users that "an update is available"
Pull Request resolved: https://github.com/facebook/flipper/pull/3992
Test Plan:
Tested by running locally.
Had to comment out the isProduction() check to confirm this it worked properly because this flag is false on dev versions.
Couldn't figure out how to manually test the handleOpenPluginDeeplink.tsx change but made a similar change there; happy to test that if you can tell me how to exercise that path.
Reviewed By: antonk52
Differential Revision: D39654481
Pulled By: antonk52
fbshipit-source-id: cef6b48d870915c48f620269c42d24b8ef1f4c29
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: 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: 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
Summary:
flipper-server-companion depends on flipper-plugin. flipper-plugin includes dependencies that run only in a browser. Splitting flipper-plugin into core and browser packages helps to avoid including browser-only dependencies into flipper-server bundle.
As a result, bundle size could be cut in half. Subsequently, RSS usage drops as there is twice as less code to process for V8.
Note: it currently breaks external flipper-data-source package. It will be restored in subsequent diffs
Reviewed By: lblasa
Differential Revision: D38658285
fbshipit-source-id: 751b11fa9f3a2d938ce166687b8310ba8b059dee
Summary: Do not remove dummy devices as they are created during WWW cert exchange and are not picked up by IDB
Reviewed By: lblasa
Differential Revision: D39430458
fbshipit-source-id: 249efda23f324522ae2ae3a0ee4f198ab701d22d
Summary:
Starting a screencapture longer than 30 seconds would timeout as the start command waits for the process to finish. Removed that wait is it is the stop command that should only wait for the finish.
(n.b. please ship after accepting, as I'm on PTO)
Reviewed By: LukeDefeo
Differential Revision: D38918570
fbshipit-source-id: fd93e1239985c81a2143ceb79312518e7ebb27f5
Summary:
GraphQL plugin sends garbage JSON at the moment (see T129428800). Still figuring out if that is caused by the plugin on client side, or that the Flipper SDK should escape that properly.
In the mean time, closing the Flipper connection on not being able to handle an individual message seems a cause of unnecessary connection ping-pong and instability. Changing the strategy to instead merely log and drop the message.
Changelog: Stop applications from disconnecting if a single plugin message cannot be processed.
Reviewed By: LukeDefeo
Differential Revision: D38825940
fbshipit-source-id: 4d45c8eea457375ec677238ad09b5e02bc2eb5bf
Summary:
This is the first diff to implement the feature for the Flipper logs plugin to have an option to persist logs in the table between crashes, disconnections, etc.
Since this is not a local change, the UI option for persistence will be located in the settings for the Flipper UI(as seen in the test plan). The setting is associated with the Redux Store `Settings` and is stored globally to be used across all plugins. So the plan is making the persistence pertain to all plugins.
Reviewed By: mweststrate
Differential Revision: D37786988
fbshipit-source-id: 7ffc6077cbca559b3401b16770eda657a6c45620
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: For the Flipper Server Companion, if a plugin is being requested which is not yet installed, try to install it first from the marketplace.
Reviewed By: passy
Differential Revision: D37716962
fbshipit-source-id: d618fbc597f82b540dbb02e8ffc296dcee9e1eb9
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: Expand PluginManager as to be able to load and install plugins from Marketplace.
Reviewed By: passy
Differential Revision: D37749802
fbshipit-source-id: 7d7e23427cc9d01f5c953b90e5b346a9d6bab19f
Summary:
Implementation taken from:
https://www.internalfb.com/code/fbsource/[85c1fe5afee7]/xplat/sonar/desktop/flipper-ui-core/src/fb/pluginMarketplaceAPI.tsx
As with the previous diff, the marketplace API for flipper-server-core accesses the existing config in a different way and depends on FlipperServer, instead of User, to execute intern request as to obtain marketplace plugins.
Reviewed By: passy
Differential Revision: D37749775
fbshipit-source-id: 968ea3f7a412893f032e5a7a50ecf17c298e18ff
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: We no longer need to Tail the logs as we stream the logs over WebSockets (see D37459924 (dcbc7c40bb))
Reviewed By: lblasa
Differential Revision: D37550482
fbshipit-source-id: 92a87f2ba1ecec140bbbb9e71df107341765ad46
Summary:
Provide an option to enable/disable TCP connections on flipper-server.
The only change at this stage is that Flipper Desktop will use UDS to connect to flipper-server.
Reviewed By: passy
Differential Revision: D37519656
fbshipit-source-id: 3d02084666fde532ec76134edf8cf6a231060a48
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:
There's one setting: to enable or disable flipper-server.
However, I've added some current running state to it. If there's a better way of doing this, please do let me know.
Reviewed By: aigoncharov
Differential Revision: D37276670
fbshipit-source-id: f6c941cf0cfe55c267b9bcb9f799934fba1e28ef