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:
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: Move User from reducers to flipper-common. User will now be usable by other modules.
Reviewed By: passy
Differential Revision: D37599802
fbshipit-source-id: 66412e7ed00bf27448fa2deae70f0e8e80303aba
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:
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
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: Allows to attribute errors to flipper server or flipper electron
Reviewed By: passy
Differential Revision: D36698504
fbshipit-source-id: 6d07216fd05aa48b7c8cca5b53145916b64526eb
Summary:
^
This change aims to extract some bits and pieces that are not specific to FBLogger and could be used by other Logger implementations.
Reviewed By: passy
Differential Revision: D36473286
fbshipit-source-id: 57f02d132673dbac97384da4dca51bf3e6fb8738
Summary: Allow subscribing to state updates from the plugin in headless mode
Reviewed By: passy
Differential Revision: D36516754
fbshipit-source-id: 14db51243e1d91332a7327c1792412149339f907
Summary: Expose uuid from flipper-common as it is required in multiple packages
Reviewed By: lblasa
Differential Revision: D36441889
fbshipit-source-id: 1fa539cb437976dbefe7d5d9a52e5e098a6402a7
Summary:
- Support loading globally installed DevTools
Background:
1. Initially, I wanted to use react-devtools-core as before. react-devtools-core standalone contains quite a few imports of node.js APIs. After [a conversation with Brian](https://fb.workplace.com/groups/react.devtools/permalink/3131548550392044), I pivoted to react-devtools-inline
2. Technical design doc of react-devtools-inline integration: https://docs.google.com/document/d/1STUSUhXzrW_KkvqSu7Ge-rxjVFF7oU3_NbwzimkO_Z4
3. We support usage of globally installed devtools. Code of react-devtools-inline is not ready to be used by the browser as is. We need to bundle it and substitute React and ReactDOM imports with the globals.
4. As we can't pre-compile what users install globally, we need to bundle global devtools on demand,
5. I tried re-using our Metro bundling pipeline initially, but gave up after fighting it for 2 days. Included, `rollup` instead.
6. Size of a `tgz` archive with a plugin is 2.1MB
allow-large-files
Reviewed By: mweststrate
Differential Revision: D34968770
fbshipit-source-id: 352299964ccc195b8677dbda47db84ffaf38737b
Summary: Adbkit configurations settings may be neccesary when we want to run flipper-server in an IPv6 stack machine as localhost would bind to [::1] rather than 127.0.0.1 which is where the adb server usually runs
Reviewed By: mweststrate
Differential Revision: D34964851
fbshipit-source-id: 9cf70f9bdc0c40e92382b1537013439f85983f65
Summary: Following up on D34787674 (f85def32fb).
Reviewed By: aigoncharov
Differential Revision: D34930249
fbshipit-source-id: f209a638c1281957fd2b03b6fc50389bd98bc5f6
Summary:
^
Usually, when launching Chrome, this error will take place a significat amount of times. By looking at the HTTP request, it is difficult to determine the origin other than being a Chrome extension.
There's no actionable items in Flipper, so do not emit the error.
Changelog: Do not emit errors when unable to extract client query
Reviewed By: antonk52
Differential Revision: D34898603
fbshipit-source-id: fbeb2db7ec2914669192cbebc2e6b15464e31827
Summary:
This is PR on top of: https://github.com/facebook/flipper/pull/3473
It adds an option to Settings to allow distribution of marketplace plugins.
Also includes a simple fetch function to retrieve data from external API/server.
## Changelog
Allow marketplace plugins
Pull Request resolved: https://github.com/facebook/flipper/pull/3491
Test Plan:
1. Enable marketplace
2. Provide custom marketplace server (it will serve the list of internal plugins with downloadURL)
3. Test if can see Available plugins and can download/remove the plugin
4. If new update for the plugin, it should also allow auto update
Reviewed By: antonk52
Differential Revision: D34586339
Pulled By: nikoant
fbshipit-source-id: c887982aa0f0f9abd3b5360f22e8692a2445d345
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:
This is just refactoring in preparation to open-sourcing internal plugin distribution code to make it available for other orgs so they can distribute their internal plugins. See other diffs in the same stack.
This diff moves recommended plugins handling from `pluginMarketplace` which will be the same for fb-internal and OS versions into `pluginMarketplaceAPI` which will differ for fb-internal and OS versions. This will make it possible for other orgs to define their own "recommended" plugins which then will be automatically installed/enabled for new users.
Reviewed By: aigoncharov
Differential Revision: D34379981
fbshipit-source-id: 5c3a4efb6d0171256cf508f9005d914d7332e14f
Summary:
We can detect an xcode-select failure earlier on, right now this will be misleading as later healtchecks around `xctrace`/`xcodebuild` will fail and it's not clear why.
If you don't have any Xcode selected, then we can detect this and mark it as an error. This can be done by looking out the output of the command.
To do this we have to propogate the stdout of the shell-out back, so there's a subtype of the regular healtcheck. This is then inspected for it's path since `xcode-select` returns the same exit code if xcode isn't selected or at it's default state.
Reviewed By: passy
Differential Revision: D34168673
fbshipit-source-id: c0aa846bb251aaf026beb976a042b727c7cf1c24
Summary: The `Error: Attempted to build clientId with invalid app: "` event shows up in our monitoring regularly, but it is unclear which kind of app is trying to connect, so adding some more info to the error, to be able to pin point it better a next time
Reviewed By: lawrencelomax
Differential Revision: D33982871
fbshipit-source-id: 34c2612a9fe86a6815f1cc655f6def1f734e4b1e
Summary:
Our existing `timeout` implementation was always throwing an exception, due to sleeping and then throw an exception, which is than handled but ignored by `Promise.race`.
This implementation has a few problems
1. Because it always throws, having a debugger session with 'break on caught exceptions' will pause on every usage of timeout (rather than just the ones that actually timeout). This makes this way of debugging a bit useless.
2. Throwing exceptions is in principle an expensive process (due to the stack trace generation)
3. Not cancelling the timeout used by sleep is a bit of a waste as well
Reviewed By: lawrencelomax
Differential Revision: D33982717
fbshipit-source-id: d739c02112e1c1bc4cd691af852371d08a99abc6
Summary:
This diff makes sure that errors are propagated similarly in flipper desktop and browser version, and that they are shown in either case.
Since in the browser version, the UI loads after the error happened, we'll store the error so that any client connecting in the future will read and report it.
Also added a `--failFast` flag to flipper-server, so that the process exits immediately if misconfigured, which is convenient in CI use cases and such
Reviewed By: nikoant
Differential Revision: D33348922
fbshipit-source-id: 0f584104f881141fde38da3f0031748415343ea2
Summary:
Changelog: Allow only a single crash watcher and a single log listener per device. Start log listener and crash watcher for every device upon connection. Remove commands to start/stop them externally.
Monitored CPU load for a physical Android device with the log listener on and off. Did not notice any real difference.
Resolved crashing adbkit-logcat by forcing the usage of 2.0.1. A proper fix would be to unify babel transforms for browser flipper and electron flipper, but we might re-think how we distribute flipper in the next half, so a simple hot fix might be a better use of time and resources.
Reviewed By: mweststrate
Differential Revision: D33132506
fbshipit-source-id: 39d422682a10a64830ac516e30f43f32f416819d