Summary:
This PR updates the openssl dependency with OpenSSL-Universal, which ships a fat-binary of libssl and libcrypto with all the architecture.
This PR also updates the travis to cache cocoapods checkout directory.
## Changelog
Updated Flipper-Folly deps
Pull Request resolved: https://github.com/facebook/flipper/pull/577
Test Plan: CI
Reviewed By: jknoxville
Differential Revision: D17877304
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 9d13308108b6665d4bf5dd6145fcaafa2a2a8a13
Summary:
Noticed a bunch of failures [here](https://our.intern.facebook.com/intern/scuba/query/?dataset=flipper_session_event_stats_scuba&drillstate=%7B%22sampleCols%22%3A[%22errors%22%2C%22event%22]%2C%22cols%22%3A[]%2C%22derivedCols%22%3A[%7B%22name%22%3A%22perfect_session%22%2C%22sql%22%3A%22CAST_AS_DOUBLE(no_failures)%22%2C%22type%22%3A%22Numeric%22%7D]%2C%22mappedCols%22%3A[]%2C%22enumCols%22%3A[]%2C%22return_remainder%22%3Afalse%2C%22should_pivot%22%3Afalse%2C%22is_timeseries%22%3Atrue%2C%22hideEmptyColumns%22%3Afalse%2C%22start%22%3A%22-90%20days%22%2C%22samplingRatio%22%3A1%2C%22compare%22%3A%22comparison%22%2C%22axes%22%3A%22linked%22%2C%22bucket%22%3A%221%22%2C%22overlay_types%22%3A[]%2C%22minBucketSamples%22%3A%22%22%2C%22dimensions%22%3A[%22time%22%2C%22event%22]%2C%22scale_type%22%3A%22absolute%22%2C%22num_samples%22%3A%22100%22%2C%22metric%22%3A%22avg%22%2C%22fill_missing_buckets%22%3A%22connect%22%2C%22smoothing_bucket%22%3A%221%22%2C%22top%22%3A20%2C%22markers%22%3A%22%22%2C%22timezone%22%3A%22America%2FLos_Angeles%22%2C%22end%22%3A%22now%22%2C%22time_bucket%22%3A%22604800%22%2C%22compare_mode%22%3A%22normal%22%2C%22aggregateList%22%3A[]%2C%22param_dimensions%22%3A[]%2C%22modifiers%22%3A[]%2C%22order%22%3A%22none%22%2C%22order_desc%22%3Atrue%2C%22filterMode%22%3A%22DEFAULT%22%2C%22constraints%22%3A[[%7B%22column%22%3A%22plugin%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A[%22[%5C%22null%5C%22]%22]%7D%2C%7B%22column%22%3A%22is_headless%22%2C%22op%22%3A%22!substr%22%2C%22value%22%3A[%22[%5C%22true%5C%22]%22]%7D%2C%7B%22column%22%3A%22event%22%2C%22op%22%3A%22substr%22%2C%22value%22%3A[%22[%5C%22getInstalledPlugins%5C%22]%22]%7D]]%2C%22c_constraints%22%3A[[]]%2C%22b_constraints%22%3A[[]]%2C%22metrik_view_params%22%3A%7B%22xaxis_type%22%3A%22auto%22%2C%22should_use_legacy_colors%22%3Afalse%2C%22view%22%3A%22Samples%22%2C%22width%22%3A%222126%22%2C%22height%22%3A%221132%22%2C%22y_max_hint%22%3A%221%22%2C%22yaxis_settings%22%3A[%7B%22yaxis_title%22%3A%22%22%2C%22yaxis_series_name%22%3A%22%22%2C%22yaxis_width%22%3A%220%22%2C%22yaxis_format%22%3A%22%25P%22%7D]%2C%22tooltip_outside%22%3Atrue%2C%22state%22%3A%22published%22%2C%22use_y_axis_hints_as_limits%22%3Atrue%2C%22legend_mode%22%3A%22nongrid%22%2C%22connect_nulls%22%3Atrue%2C%22yaxismin%22%3A0%2C%22title%22%3A%22Operation%20success%20rate%20over%20time%20(human)%22%2C%22tooltip_disabled%22%3Atrue%2C%22timezone_offset%22%3A420%2C%22y_min_hint%22%3A0%2C%22legend_position%22%3A%22none%22%2C%22title_use_v2%22%3Atrue%7D%7D&pool=uber&view=Samples&dashboard_id&tab_id&widget_id&widget_piece_id).
This fixes it.
Reviewed By: passy
Differential Revision: D17877108
fbshipit-source-id: 85586a1ce65033b98d793746c611b44f68e13eff
Summary: Take a snapshot with each field adjusted to prevent accidental changes.
Reviewed By: priteshrnandgaonkar
Differential Revision: D17832181
fbshipit-source-id: 016f99ec032036993a40fea310c6fd9887da6c38
Summary:
Adds an iOS "setting" to the settings, but it's automatically set based on xcode-select for minimum required effort.
Helpful text added to tell you how to enable it if it's disabled.
Reviewed By: passy
Differential Revision: D17830940
fbshipit-source-id: 53e1e40c5b96e29b30036259cc774ab14097a1da
Summary:
Queries xcode-select on ios dispatcher startup, to see if it's installed.
If it is, carry on with the ios device tracking, if not, don't bother.
This should stop it from emitting errors trying to track devices when things aren't installed.
I think it should also stop those install prompts from popping up.
Sets it in app state so we can tell the user about it, and maybe gate some other things too.
Reviewed By: passy
Differential Revision: D17830696
fbshipit-source-id: 960d09a9c5267afabf5e5e222379a0a7ed2cc444
Summary:
Takes the androidEnabled setting and uses it to gate the android dispatcher.
Enables people without android sdk to use flipper (e.g. iOS engineers).
Reviewed By: priteshrnandgaonkar
Differential Revision: D17829810
fbshipit-source-id: 7d25580e65dee93ebfda7c5cc4c4cea03744e2ca
Summary:
The UI could do with a bit more fine tuning, but it's a start.
Fully functional with updating the settings file. But nothing actually uses that setting yet.
Reviewed By: priteshrnandgaonkar
Differential Revision: D17810588
fbshipit-source-id: 791ee60616f3ee73f41813a5a442b08a5e395458
Summary: Property `device` on Clients for archived device never resolve. As it gets resolved when `addConnection` is called which happens for real non-offline devices. To get around this, I have added an argument to the constructor of the Client, as for offline case we can construct the device before client and can pass it as an argument.
Reviewed By: jknoxville
Differential Revision: D17831261
fbshipit-source-id: a14fb0b65343cccac731077e983026388611d323
Summary:
This diff sends flipper trace as a separate message so that the form can update the state which can be used for validation. If the user doesn't click on "Flipper Trace" then it will show a validation error.
WWW side changes are here D17810526. Merge this diff only when www is landed.
Reviewed By: jknoxville
Differential Revision: D17812023
fbshipit-source-id: 35f17f9e58fc08cde3928072dc66758b1c507bcb
Summary:
This should be an encapsulated component, not returning the building blocks of one.
So I'm changing the default to return a single component that contains the fragment previously returned.
Now elements appear side by side, are vertically aligned, and onClick works on the label as well, by default. This doesn't break anything in any of the uses inside the flipper code base, because only one used a label (regex search in Searchable.tsx), and these properties are all desirable there.
This could potentially break any plugins that aren't included in the flipper codebase, if they already have a label and don't layout the elements side by side. There are probably no such cases.
Reviewed By: passy
Differential Revision: D17810386
fbshipit-source-id: 588d7ed3243a9f0e5bcad805a3480393c031ff55
Summary: This diff adds the support to deeplink to the litho form.
Reviewed By: passy
Differential Revision: D17792341
fbshipit-source-id: b146993163b14df000c499236da48b7e8066f457
Summary:
This diff shows the error screen when one of the following condition is met:
- Selected device is not android
- No clients are active for selected device
- At least there is one client which supports inspector plugin.
For this I have added a SupportRequestManager class which loads the error screen or the litho form based on the above condition.
The UI is super basic. Will improve the design based on your feedback in the coming diffs.
Reviewed By: jknoxville
Differential Revision: D17790596
fbshipit-source-id: 2afc917c93c6e7321399633c5bf9d27a703742ee
Summary: Earlier we used to show the support form only when selected device was android. But this won't work because, I am planning to add a deeplink support for the form, so that the user can directly open flipper from workplace. Because of this we will have to show the litho support form always. In case when the selected device is not android, we will show an error screen with possible solutions to open the litho support form.
Reviewed By: passy
Differential Revision: D17787686
fbshipit-source-id: 13e15041238d8746f947563bb3c2ea3cec205a5e
Summary:
Integrate Flipper with React Native, is a bit different than a native app. I wrote this tutorial inspired by nparashuram 's blog. http://blog.nparashuram.com/2019/09/using-flipper-with-react-native.html
## Changelog
Flipper + React Native Documentation
Pull Request resolved: https://github.com/facebook/flipper/pull/567
Reviewed By: jknoxville
Differential Revision: D17809429
Pulled By: passy
fbshipit-source-id: a1172d36775f80f1ac849913cb855390d353ade0
Summary:
- Made side-effecting elements injectable via props.
- Added default props so usage doesn't change.
- Added testing-library/react snapshot test that waits for test data to appear in the list.
One slightly annoying part here is that this now that we have an `autoHeight` prop which is only useful for testing it as it prevents a problem with a height-detection in the test runner. We could even change the default as it doesn't affect the display in prod, but this still feels slightly cleaner.
Reviewed By: jknoxville
Differential Revision: D17808510
fbshipit-source-id: 2ae70886c58282d5bdc98ba4215e8248e4c7f159
Summary:
A bit ugly to have test-only code in prod logic,
but we don't need any of the logger logic in tests
and by pulling out the `StubLogger`, we can avoid
loading Electron during tests.
Reviewed By: jknoxville
Differential Revision: D17808479
fbshipit-source-id: d2295d7bbca2f09c3f23389ad9443648757d8d03
Summary:
The existing rendering library doesn't work properly
with hooks. This one provides some pretty powerful
DOM-based testing APIs like waiting for elements to
appear and clicking, which we can use in various
areas.
Reviewed By: jknoxville
Differential Revision: D17787423
fbshipit-source-id: 9eb12f34ae2bc76b679fd28ee25262ce01a5e772
Summary: You can do this in VSCode by selecting the lines, Cmd-Shift-P, "Sort Lines Ascending".
Reviewed By: passy
Differential Revision: D17710137
fbshipit-source-id: 3cef628b24dd86d4e307bd30761049c30cbc8f68
Summary:
see https://github.com/facebook/flipper/issues/450
If we want to control a custom SharedPreferences, we can create a Class as SharedPreferencesDescriptor's Subclass, override the getSharedPreferences() function to return a custom SharedPreferences instance.
## Changelog
add getSharedPreferences() function in SharedPreferencesDescriptor Class
Pull Request resolved: https://github.com/facebook/flipper/pull/571
Test Plan: No
Reviewed By: jknoxville
Differential Revision: D17738675
Pulled By: passy
fbshipit-source-id: d227e7d6461194f7a01ae7b2ba53434dd71fc0d2
Summary:
Added some notes to T55169042.
Also limited the acceptable result types.
Reviewed By: jknoxville
Differential Revision: D17787130
fbshipit-source-id: 19cefdde5ab195080281e9f2e26f5a236dd59629
Summary:
This is a programming error, not something that users
should ever be exposed to. This logs an error instead
and just doesn't show anything.
The big benefit is that the component no longer
needs to deal with `file` potentially being undefined.
Reviewed By: jknoxville
Differential Revision: D17786913
fbshipit-source-id: 32a357381e64cd9237ad4a0112c346d7121634ef
Summary:
The benefits of having things nicely encapsulated.
Not super sophisticated, but better than nothing.
Reviewed By: jknoxville
Differential Revision: D17786832
fbshipit-source-id: 0b321e8a4e56188b0eab86515bd777ed3e3e8cb7
Summary: It's copied apart from the status message, so let's centralise it.
Reviewed By: jknoxville
Differential Revision: D17786691
fbshipit-source-id: d5f7a5dccf56b96a58a9c1fc61652d7f9d1786d3
Summary:
From the name it's not clear that this is actually a fork off the "Share File"
variant of this. I'm planning to bring the two together as they share most of
the code, but for now this makes it a bit clearer.
Reviewed By: jknoxville
Differential Revision: D17786570
fbshipit-source-id: 8def3301ee4f79741391dc7e0b6a33a5fd7aa2c3
Summary:
Following https://developer.apple.com/design/human-interface-guidelines/macos/buttons/push-buttons/,
the primary button should be highlighted and the affirmative action be to the right.
Clicked a few times on the wrong one myself.
Reviewed By: priteshrnandgaonkar
Differential Revision: D17762516
fbshipit-source-id: 6be35cfde26ca10142c2c98df30672c0f739c17e
Summary:
As discussed on an earlier diff, the percentage alone
is a confusing indicator as the number of items to be
serialised can grow over time, causing the percentage
to go down.
This shows the raw numbers in addition to the percentage.
Reviewed By: priteshrnandgaonkar
Differential Revision: D17762477
fbshipit-source-id: 8911b520b2ea74542bc64e6a6662bed7d4f81860
Summary:
- Make sure it's "cancel" in all cases.
- Move cancel buttons to the left.
- Rename the callback to clarify purpose.
Reviewed By: jknoxville
Differential Revision: D17762466
fbshipit-source-id: 0f6a9d83ff0cab139f926fb5a512be4618471ee8
Summary:
Wanted to make a small change and found it a bit difficult to
follow, so I tried to make it a bit more TypeScript-y.
Logic should be unchanged.
Reviewed By: priteshrnandgaonkar
Differential Revision: D17762346
fbshipit-source-id: d0d8b2e25b532b7b10079907d6da86bdd878a75c
Summary: As per title, this diff makes the Mobile config plugin exportable. This involves moving the important property from `State` to `PersistedState`. Also had to implement the `exportPersistedState` function to fetch the experiments information for the Universes, configs and gatekeeper information.
Reviewed By: danielbuechele
Differential Revision: D17633986
fbshipit-source-id: 604225ba47112620bee0a6c704416b3ac350de9c
Summary: It's a bit nicer to be able to see if there are any changes made, and save restarting flipper when nothing has changed.
Reviewed By: passy
Differential Revision: D17738036
fbshipit-source-id: 3d7cdc5be1bf948094c3df54439625e5052a9a2f
Summary:
For "primary" and "danger" buttons, you previously couldn't see any difference between disabled and enabled ones.
This fixes that by greying them out when disabled.
Reviewed By: passy
Differential Revision: D17738031
fbshipit-source-id: 82e16b8881f3d404aafae8a7837151090bb6bbee
Summary:
Gets flipper to restart when settings are updated.
In theory most settings should not need this, but the current only one does (android home) because the path is set at startup only, and this modifies the input to it.
It would be a bit awkward to modify the path more than once, but doable.
Reviewed By: passy
Differential Revision: D17737582
fbshipit-source-id: d4669dcc7acc95469f15783fc6a5ba6794750234
Summary: A settings screen has been added where android home can be set. This changes the downstream code to use this value rather than the `env.PATH` variable.
Reviewed By: passy
Differential Revision: D17713288
fbshipit-source-id: 51551652c9c2f468e1117c18785123348e4b4576
Summary:
Moves the settings state from electron local storage into a json file in the users configured config location.
Unless modified by the user, this will usually be `~/.config/flipper/settings.json`
Settings will now persist across re-installs, and can now be easily inspected and backed up.
Reviewed By: passy
Differential Revision: D17712687
fbshipit-source-id: 1e778063e41d0a1a86145817b9797bf0458121da
Summary:
This will be used for the settings file.
It results in normal JSON, as opposed to json where the value of every key is an escaped string.
Reviewed By: passy
Differential Revision: D17712688
fbshipit-source-id: d37ed93707c7352719fa72a05bf51953611f52c0
Summary:
Adds a simple UI for editing settings, a reducer and persistance config for the data.
These values aren't yet used for anything.
Reviewed By: passy
Differential Revision: D17684490
fbshipit-source-id: e76ac43ffa17d3606e59f4a1ccb940e8d9fbd9e8
Summary:
Adds some very basic error handling. It's not great
because once you hit an error, you're basically stuck
and there's no retry yet, but it's still strictly
an improvement over being stuck with the looping
spinner, so I think it's worth shipping it in this state.
Reviewed By: jknoxville
Differential Revision: D17763467
fbshipit-source-id: b5b7996554dd1dce682fba87f96e3806432a475a
Summary:
Add some usage and failure rate stats to the PluginInstaller. Small
typo fix and added a helper to the metrics utils to make simple
usage tracking a little more intuitive.
Reviewed By: jknoxville
Differential Revision: D17760511
fbshipit-source-id: 957031d428f3124435925415619b1555a0c2dc2a
Summary:
Update the docs to include Windows and Linux.
Pull Request resolved: https://github.com/facebook/flipper/pull/572
Test Plan: eyes
Reviewed By: jknoxville
Differential Revision: D17738803
Pulled By: passy
fbshipit-source-id: 8e556fb6b3e57de6f3334286e83a59a48dbdd982
Summary:
Flipper's network plugin may cause crash on a frequency of about one time per 1~2 days(I think it depends on how many network request we send).

I assume the crash is caused by part of the code of HTTPParser is not thread-safe, and invoke it asynchronously may cause double-free crash. So I manually ask for HTTPBody synchronously, make the HTTPParser parse the request and cache them in advance, before any possible asynchronous invoking.
## Changelog
Fix potential crash cause by network plugin.
Pull Request resolved: https://github.com/facebook/flipper/pull/563
Test Plan:
1. Run our App with Flipper integrated
2. Make sure FlipperNetworkPlugin is active
3. It may take days to reproduce the crash
Reviewed By: passy
Differential Revision: D17739327
Pulled By: priteshrnandgaonkar
fbshipit-source-id: e814145c346bd2da1d2f5f87b6a2f7e200f0bf2d
Summary: This diff passes the idler and statusUpdate arguments to the export persisted state, as it is being used in the MobileConfig's export function
Reviewed By: passy
Differential Revision: D17715815
fbshipit-source-id: 98a0f0f5950254de2139c4aaa52cb73401c86c3c