Commit Graph

292 Commits

Author SHA1 Message Date
Andrey Goncharov
d96cf8127f Add unit tests for ServerAddOn
Reviewed By: mweststrate

Differential Revision: D34303780

fbshipit-source-id: 03a4570a6e891d979b87caca14f51068d74df877
2022-02-28 03:50:34 -08:00
Andrey Goncharov
81d0057a8d Fix potential race conditions for starting/stopping server add-ons
Reviewed By: mweststrate

Differential Revision: D34301593

fbshipit-source-id: 2950de8a8567318cd3e87eff176657df5ba8fd1b
2022-02-28 03:50:34 -08:00
Andrey Goncharov
8b94186783 Load installed server add-ons
Reviewed By: nikoant

Differential Revision: D34300475

fbshipit-source-id: 6bb6c0ab811e28806a0924b3487931bdb0dd2c59
2022-02-28 03:50:34 -08:00
Andrey Goncharov
4067f5bd88 Implement sending messages from desktop to add-on
Reviewed By: antonk52

Differential Revision: D34239803

fbshipit-source-id: 1a18d522ba877ade3d0703fbb374c15b596241d7
2022-02-28 03:50:34 -08:00
Andrey Goncharov
2ce037d96b Load bundled server add-ons
Reviewed By: antonk52

Differential Revision: D34238883

fbshipit-source-id: 01b4b1c1c0a63cbfb639e903f6a77307ae370330
2022-02-28 03:50:34 -08:00
Andrey Goncharov
b655efc78e Migrate to default exports for server add-ons
Reviewed By: antonk52

Differential Revision: D34201906

fbshipit-source-id: 3ee2bf831d5a1f5c6c9252acce1b1731462871f1
2022-02-28 03:50:34 -08:00
Andrey Goncharov
04eab80c98 Move server add-on interfaces to flipper-common
Reviewed By: antonk52

Differential Revision: D34169419

fbshipit-source-id: 69fcc8da7d98f59818fbb5b486a488f19830cd81
2022-02-28 03:50:34 -08:00
Andrey Goncharov
b9294645d3 Limit methods server add on can access
Reviewed By: mweststrate

Differential Revision: D34076174

fbshipit-source-id: e51a1b08dab54de6b7dc82ca59ec18a10f81ddd7
2022-02-28 03:50:34 -08:00
Andrey Goncharov
db976d5113 Implement sending messages from a server add-on
Reviewed By: mweststrate

Differential Revision: D34074383

fbshipit-source-id: de85e7a22dc9bb780163fc5b522708e8bc976df3
2022-02-28 03:50:34 -08:00
Andrey Goncharov
842b2c810a Implement sending messages to server add-on
Reviewed By: mweststrate

Differential Revision: D34073403

fbshipit-source-id: eacd73811b436f2b5c4255a83d8eb09367a96a67
2022-02-28 03:50:34 -08:00
Andrey Goncharov
12151e4a71 Extend Flipper commands to support server add-on messaging
Reviewed By: mweststrate

Differential Revision: D34046466

fbshipit-source-id: 9acc172c1805ec724b8709999bacf9e899c39e6b
2022-02-28 03:50:34 -08:00
Andrey Goncharov
3b390b74ff Track client connections and autostop server add-ons when all clients leave
Reviewed By: mweststrate

Differential Revision: D34045584

fbshipit-source-id: 1ad0cfffb9d304f0359c973d76d6956f7e932f72
2022-02-28 03:50:34 -08:00
Andrey Goncharov
a60865f0be Intergrate ServerAddOn with PluginManager
Reviewed By: lblasa

Differential Revision: D34042338

fbshipit-source-id: 2ae3992738e647075f19c4dba0ebfb01e6c12b8f
2022-02-28 03:50:34 -08:00
Andrey Goncharov
016299b374 Add server-side ServerAddOn entity
Reviewed By: lblasa

Differential Revision: D33982373

fbshipit-source-id: a07589e515fe82d3735402cc26d1258e1d212931
2022-02-28 03:50:34 -08:00
Andrey Goncharov
fc20abf392 Add Flipper server command definitions
Reviewed By: lblasa

Differential Revision: D33980529

fbshipit-source-id: b64f48134d4816d3502c70d15beff90a044490a4
2022-02-28 03:50:34 -08:00
Lorenzo Blasa
395708348d Remove RSocket documentation references
Summary:
^
Changelog: Remove RSocket documentation references

Reviewed By: jknoxville

Differential Revision: D34345316

fbshipit-source-id: 5b9fac8c04e325f3f02ef3713b0146b17e694c9d
2022-02-21 06:22:44 -08:00
Lorenzo Blasa
c45164ec2b Log unable to extract clientQuery as warning instead of error
Summary:
^
LogView is raising this up but I don't think there's an actionable item from our side. If a client doesn't have the right arguments on the query string then we effectively are unable to construct a valid query.

All our clients do this correctly, but there may be instances that either a browser or another process is 'trying' to connect to Flipper even if unintentionally. This behaviour I've observed in the past.

Changelog: Log 'Unable to extract the client query from the request URL' as warning

Reviewed By: passy

Differential Revision: D34340068

fbshipit-source-id: f5fc36a9803a83d6662b6383589bc0aa99774798
2022-02-18 05:50:07 -08:00
Pascal Hartig
3945675ca0 Remove dynamic data from error
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
2022-02-16 07:59:45 -08:00
Andres Orozco Gonzalez
b2dae4da81 Add support to load settings from options (flag) and default to specific options
Summary: This change gives priority to a user option settingsString to set up the flipper-server configuration and load them from a json string. Also giving the user the chance to avoid flipper-server looking at the launcher config files in the computer

Reviewed By: mweststrate

Differential Revision: D34210110

fbshipit-source-id: 9e852b79da106b5140c59116fd7d0c0f3155e620
2022-02-16 06:23:45 -08:00
Peter Velkov
9d2f11f505 Fix adb path check on Windows (#3434)
Summary:
The adb path check seem to be platform dependent

Instead of pre-validating the path we can execute the intended command and retry with an alternative adb path only if it fails with file not found error

Related to https://github.com/facebook/flipper/issues/3430 (adb is not detected)

## Changelog

Fix ADB detection and startup on Windows

Pull Request resolved: https://github.com/facebook/flipper/pull/3434

Test Plan:
#### adb is detected successfully when `adb.exe` is in `platform-tools`
![image](https://user-images.githubusercontent.com/12156624/153605414-b85c1aef-1e60-457d-be90-3673900d7cc5.png)

#### Falling back to alternative path when `adb.exe` is the SDK folder
![image](https://user-images.githubusercontent.com/12156624/153605693-0adb9c1b-e77f-44a1-9d2c-00cf40f59645.png)

#### Otherwise failing if `adb.exe` is not found
![image](https://user-images.githubusercontent.com/12156624/153605797-307304d3-e513-459a-9e28-53d95ba94642.png)

Reviewed By: passy

Differential Revision: D34240518

Pulled By: aigoncharov

fbshipit-source-id: db834bbdc9815e5ad41f7a1329ec8d5869f6f24b
2022-02-16 02:59:39 -08:00
Pascal Hartig
1910d3b713 Bump dependencies in /desktop
Summary: Combining green-ticked upgrades from GitHub into one push.

Reviewed By: lblasa

Differential Revision: D34212788

fbshipit-source-id: 12b207a05b9df08eac5b5c58fe1025932c448258
2022-02-14 09:55:15 -08:00
Lorenzo Blasa
dbe818c6e1 Port-forward websocket ports
Summary:
^
Changelog: Port-forward websocket ports

Reviewed By: passy

Differential Revision: D34210187

fbshipit-source-id: 8ec84a9ce89d9982519111417538b7bfa0964cfc
2022-02-14 04:37:21 -08:00
Lawrence Lomax
9973014116 Fix error message when there's no xcode-select'ed Xcode
Summary:
This error messaging is confusing for device only users. These users may only be running against a device **without xcode installed**, which is supported.

However, we also need to handle the case where a user has a sim running and they haven't xcode-select'd as this will mean that the sim is working fine, but the user has no way of knowing why Flipper is not working.

Reviewed By: passy

Differential Revision: D34140277

fbshipit-source-id: f9b035b6c7918424d6131d1dfcdba10acf438fa8
2022-02-11 00:33:48 -08:00
Lawrence Lomax
2a9983b1ef Use Promise.all for checking xcode-select and apps in parallel
Summary: These can be batched together rather nicely

Reviewed By: lblasa

Differential Revision: D34139753

fbshipit-source-id: 7388630dcae34d40308d54f18a37215cf18e5904
2022-02-10 07:59:24 -08:00
Lawrence Lomax
84fac685ac Actually use unit tested function in wrapped xcode check
Summary: Accidentally tested a function that should have been called from the internals. This makes the internal function use the check.

Reviewed By: lblasa

Differential Revision: D34139589

fbshipit-source-id: fac13f7b54ffb0b6f501fb9237f55766706e975a
2022-02-10 07:59:24 -08:00
Andrey Goncharov
3871755064 Fix extracting device ID from the path for iOS simulators
Summary: Changelog: Fix extracting device ID from the path for iOS simulators

Reviewed By: lblasa, antonk52

Differential Revision: D34142876

fbshipit-source-id: 57d3bffcda7bb7b4bf88ea837eb9bf2dc8405764
2022-02-10 06:52:38 -08:00
Andrey Goncharov
c33a5f9bef Fix cert exchange on iOS with multiple devices connected
Reviewed By: lblasa, nikoant

Differential Revision: D34142119

fbshipit-source-id: e5edc4962e75f2e6f91d9ed304ffd080fd29ff27
2022-02-10 05:41:06 -08:00
Liam Jones
8696349593 Fix Xcode version check (#3428)
Summary:
Fixes https://github.com/facebook/flipper/issues/3396 - the Xcode version mismatch check has been broken since 0.132.0.

## Changelog

Fixed Xcode version mismatch check

Pull Request resolved: https://github.com/facebook/flipper/pull/3428

Test Plan: No existing test, manually tested locally on macOS 11.6.3 via `yarn start` when launching the Simulator directly or via `yarn react-native run-ios` in an RN project

Reviewed By: lblasa, mweststrate

Differential Revision: D34139471

Pulled By: lawrencelomax

fbshipit-source-id: 97920de5c463b366ef7ecaef0441ee37debe5d46
2022-02-10 01:48:11 -08:00
Michel Weststrate
d81a9909e0 Fix error that is logged when device disconnected quickly
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
2022-02-09 04:22:25 -08:00
Michel Weststrate
597f679ed3 Propagate errors properly when cert exchange fails
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
2022-02-09 04:22:25 -08:00
Michel Weststrate
4f9cec718e Suppress recurring 'still connecting' errors
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
2022-02-04 01:20:08 -08:00
Andres Orozco Gonzalez
4b6fcb6aaf new look up for adb path
Summary: Look up for the path of the adb may sometimes fail when looking for the folder platform-tools because the adb configuration wasn't done by android studio

Reviewed By: aigoncharov

Differential Revision: D33888687

fbshipit-source-id: 4d0cad2f6b19717e45422632f5d459813a7b7ee0
2022-02-03 07:14:22 -08:00
Michel Weststrate
a31494f321 Fix unnecessary 'still authorizing' error
Summary:
When connection to Android, I always get an error popup with 'device still authorizing', which disappears itself and the device connects fine. It seems that this was a case we handled gracefully before, but the error message we check for has changed. Also updated the log message so that we get it in our monitoring I don't silently get stuck in this state.

Changelog: Fixed 'device still authorizing' errors showing up while connecting to an Android device

Reviewed By: aigoncharov

Differential Revision: D33976028

fbshipit-source-id: dbb055bbbd43bad129b10ffee4a8dbb50be8e87a
2022-02-03 04:20:54 -08:00
Andrey Goncharov
7376774a95 Add RSocket deprecation warning
Reviewed By: lblasa

Differential Revision: D33976369

fbshipit-source-id: c100c145d7c77369347200d32448015ad971d585
2022-02-03 03:52:22 -08:00
dependabot[bot]
e26540ddd7 Bump axios from 0.24.0 to 0.25.0 in /desktop (#3383)
Summary:
Bumps [axios](https://github.com/axios/axios) from 0.24.0 to 0.25.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/axios/axios/releases">axios's releases</a>.</em></p>
<blockquote>
<h2>v0.25.0</h2>
<h3>0.25.0 (January 18, 2022)</h3>
<p>Breaking changes:</p>
<ul>
<li>Fixing maxBodyLength enforcement (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3786">#3786</a>)</li>
<li>Don't rely on strict mode behaviour for arguments (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3470">#3470</a>)</li>
<li>Adding error handling when missing url (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3791">#3791</a>)</li>
<li>Update isAbsoluteURL.js removing escaping of non-special characters (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3809">#3809</a>)</li>
<li>Use native Array.isArray() in utils.js (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3836">#3836</a>)</li>
<li>Adding error handling inside stream end callback (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3967">#3967</a>)</li>
</ul>
<p>Fixes and Functionality:</p>
<ul>
<li>Added aborted even handler (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3916">#3916</a>)</li>
<li>Header types expanded allowing <code>boolean</code> and <code>number</code> types (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4144">#4144</a>)</li>
<li>Fix cancel signature allowing cancel message to be <code>undefined</code> (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3153">https://github.com/facebook/flipper/issues/3153</a>)</li>
<li>Updated type checks to be formulated better (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3342">https://github.com/facebook/flipper/issues/3342</a>)</li>
<li>Avoid unnecessary buffer allocations (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3321">https://github.com/facebook/flipper/issues/3321</a>)</li>
<li>Adding a socket handler to keep TCP connection live when processing long living requests (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3422">#3422</a>)</li>
<li>Added toFormData helper function (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3757">#3757</a>)</li>
<li>Adding responseEncoding prop type in AxiosRequestConfig (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3918">#3918</a>)</li>
</ul>
<p>Internal and Tests:</p>
<ul>
<li>Adding axios-test-instance to ecosystem (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3786">#3786</a>)</li>
<li>Optimize the logic of isAxiosError (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3546">#3546</a>)</li>
<li>Add tests and documentation to display how multiple inceptors work (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3564">#3564</a>)</li>
<li>Updating follow-redirects to version 1.14.7 (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4379">#4379</a>)</li>
</ul>
<p>Documentation:</p>
<ul>
<li>Fixing changelog to show corrext pull request (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4219">#4219</a>)</li>
<li>Update upgrade guide for https proxy setting (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3604">#3604</a>)</li>
</ul>
<p>Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:</p>
<ul>
<li><a href="https://github.com/axios/axios/blob/HEAD/mailto:jasonsaayman@gmail.com">Jay</a></li>
<li><a href="https://github.com/rijkvanzanten">Rijk van Zanten</a></li>
<li><a href="https://github.com/koh110">Kohta Ito</a></li>
<li><a href="https://github.com/bfaulk96">Brandon Faulkner</a></li>
<li><a href="https://github.com/NoriSte">Stefano Magni</a></li>
<li><a href="https://github.com/fanguangyi">enofan</a></li>
<li><a href="https://github.com/puzpuzpuz">Andrey Pechkurov</a></li>
<li><a href="https://github.com/doowonee">Doowonee</a></li>
<li><a href="https://github.com/emilbroman-eqt">Emil Broman</a></li>
<li><a href="https://github.com/remcohaszing">Remco Haszing</a></li>
<li><a href="https://github.com/BlackHole1">Black-Hole</a></li>
<li><a href="https://github.com/wolframkriesing">Wolfram Kriesing</a></li>
<li><a href="https://github.com/repl-andrew-ovens">Andrew Ovens</a></li>
<li><a href="https://github.com/PauloRSF">Paulo Renato</a></li>
<li><a href="https://github.com/carpben">Ben Carp</a></li>
<li><a href="https://github.com/wafuwafu13">Hirotaka Tagawa</a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/axios/axios/blob/master/CHANGELOG.md">axios's changelog</a>.</em></p>
<blockquote>
<h3>0.25.0 (January 18, 2022)</h3>
<p>Breaking changes:</p>
<ul>
<li>Fixing maxBodyLength enforcement (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3786">#3786</a>)</li>
<li>Don't rely on strict mode behaviour for arguments (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3470">#3470</a>)</li>
<li>Adding error handling when missing url (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3791">#3791</a>)</li>
<li>Update isAbsoluteURL.js removing escaping of non-special characters (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3809">#3809</a>)</li>
<li>Use native Array.isArray() in utils.js (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3836">#3836</a>)</li>
<li>Adding error handling inside stream end callback (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3967">#3967</a>)</li>
</ul>
<p>Fixes and Functionality:</p>
<ul>
<li>Added aborted even handler (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3916">#3916</a>)</li>
<li>Header types expanded allowing <code>boolean</code> and <code>number</code> types (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4144">#4144</a>)</li>
<li>Fix cancel signature allowing cancel message to be <code>undefined</code> (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3153">https://github.com/facebook/flipper/issues/3153</a>)</li>
<li>Updated type checks to be formulated better (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3342">https://github.com/facebook/flipper/issues/3342</a>)</li>
<li>Avoid unnecessary buffer allocations (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3321">https://github.com/facebook/flipper/issues/3321</a>)</li>
<li>Adding a socket handler to keep TCP connection live when processing long living requests (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3422">#3422</a>)</li>
<li>Added toFormData helper function (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3757">#3757</a>)</li>
<li>Adding responseEncoding prop type in AxiosRequestConfig (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3918">#3918</a>)</li>
</ul>
<p>Internal and Tests:</p>
<ul>
<li>Adding axios-test-instance to ecosystem (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3786">#3786</a>)</li>
<li>Optimize the logic of isAxiosError (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3546">#3546</a>)</li>
<li>Add tests and documentation to display how multiple inceptors work (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3564">#3564</a>)</li>
<li>Updating follow-redirects to version 1.14.7 (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4379">#4379</a>)</li>
</ul>
<p>Documentation:</p>
<ul>
<li>Fixing changelog to show corrext pull request (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4219">#4219</a>)</li>
<li>Update upgrade guide for https proxy setting (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3604">#3604</a>)</li>
</ul>
<p>Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:</p>
<ul>
<li><a href="https://github.com/axios/axios/blob/master/mailto:jasonsaayman@gmail.com">Jay</a></li>
<li><a href="https://github.com/rijkvanzanten">Rijk van Zanten</a></li>
<li><a href="https://github.com/koh110">Kohta Ito</a></li>
<li><a href="https://github.com/bfaulk96">Brandon Faulkner</a></li>
<li><a href="https://github.com/NoriSte">Stefano Magni</a></li>
<li><a href="https://github.com/fanguangyi">enofan</a></li>
<li><a href="https://github.com/puzpuzpuz">Andrey Pechkurov</a></li>
<li><a href="https://github.com/doowonee">Doowonee</a></li>
<li><a href="https://github.com/emilbroman-eqt">Emil Broman</a></li>
<li><a href="https://github.com/remcohaszing">Remco Haszing</a></li>
<li><a href="https://github.com/BlackHole1">Black-Hole</a></li>
<li><a href="https://github.com/wolframkriesing">Wolfram Kriesing</a></li>
<li><a href="https://github.com/repl-andrew-ovens">Andrew Ovens</a></li>
<li><a href="https://github.com/PauloRSF">Paulo Renato</a></li>
<li><a href="https://github.com/carpben">Ben Carp</a></li>
<li><a href="https://github.com/wafuwafu13">Hirotaka Tagawa</a></li>
<li><a href="https://github.com/lzxb">狼族小狈</a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="5c5cbdf4ba"><code>5c5cbdf</code></a> Removed cancel token request test till debugging on FireFox can be done</li>
<li><a href="63dfce85ab"><code>63dfce8</code></a> Releasing v0.25</li>
<li><a href="dccaeb1b68"><code>dccaeb1</code></a> Updated changelog for release</li>
<li><a href="51f3ccb08e"><code>51f3ccb</code></a> Updating follow-redirects with security updates (<a href="https://github-redirect.dependabot.com/axios/axios/issues/4379">#4379</a>)</li>
<li><a href="ccc9516af8"><code>ccc9516</code></a> Fixing removing package-lock from gitignore (<a href="https://github-redirect.dependabot.com/axios/axios/issues/4346">#4346</a>)</li>
<li><a href="ea0d9c69f7"><code>ea0d9c6</code></a> Adding error handling inside stream end callback (<a href="https://github-redirect.dependabot.com/axios/axios/issues/3967">#3967</a>)</li>
<li><a href="4fbf61dc75"><code>4fbf61d</code></a> Adding responseEncoding prop type in AxiosRequestConfig (<a href="https://github-redirect.dependabot.com/axios/axios/issues/3918">#3918</a>)</li>
<li><a href="a76571abec"><code>a76571a</code></a> Use native <code>Array.isArray()</code> in <code>utils.js</code> (<a href="https://github-redirect.dependabot.com/axios/axios/issues/3836">#3836</a>)</li>
<li><a href="a8cd75a081"><code>a8cd75a</code></a> Update isAbsoluteURL.js (<a href="https://github-redirect.dependabot.com/axios/axios/issues/3809">#3809</a>)</li>
<li><a href="95792908f0"><code>9579290</code></a> Adding error handling when missing url (<a href="https://github-redirect.dependabot.com/axios/axios/issues/3791">#3791</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/axios/axios/compare/v0.24.0...v0.25.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=0.24.0&new-version=0.25.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/3383

Reviewed By: nikoant

Differential Revision: D33892131

Pulled By: cekkaewnumchai

fbshipit-source-id: 50c82da299e0e8ca025e0a0868a3f5deb31f475c
2022-02-02 11:14:39 -08:00
Andrey Goncharov
c238cef5b0 Verify certificate provider medium
Reviewed By: antonk52

Differential Revision: D33917041

fbshipit-source-id: 91a9554397063d53a903a5b1406b46ddf07360b2
2022-02-02 03:07:00 -08:00
Andrey Goncharov
c7492a83c7 Remove global access to adb client and idb config
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
2022-02-02 03:07:00 -08:00
Andrey Goncharov
51ef1810b2 Defer initialization of Android and iOS device managers
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
2022-02-02 03:07:00 -08:00
Andrey Goncharov
fd13399cb9 Extract WWW certificate provider
Summary: Extract WWW certificate provider from the iOS certificate provider. Hide its implementation from OSS since it is not relevant for OSS folks.

Reviewed By: mweststrate

Differential Revision: D33895378

fbshipit-source-id: 376afda3b5fa3857c0eb280b92555314eb1a0d1f
2022-02-02 03:07:00 -08:00
Andrey Goncharov
29f6d0e711 Add device-specific Certificate Providers
Reviewed By: mweststrate

Differential Revision: D33821880

fbshipit-source-id: c75c71db4d7dc680f75cf41ba2d5dad009a5fd03
2022-02-02 03:07:00 -08:00
Andrey Goncharov
b9aeaa9339 Enhance iOS device manager tests
Reviewed By: lawrencelomax

Differential Revision: D33915694

fbshipit-source-id: fc4bfd30b8f504f2f242f94e61967ee68cc83100
2022-02-02 03:07:00 -08:00
Andrey Goncharov
7bf89a840a Remove a circular dependency between KeytarManager and FlipperServerImpl
Reviewed By: passy

Differential Revision: D33846051

fbshipit-source-id: c83f5609308ad732a02b2ee55466f5ed0918d733
2022-02-02 03:07:00 -08:00
Andrey Goncharov
b1f19ecd68 Extract certificate utils
Summary: Extract utilities for certificate server-side certificate handling

Reviewed By: lawrencelomax

Differential Revision: D33820263

fbshipit-source-id: 21f1a9ed5f3b83b8350151bdf6d8862aa0b18e8f
2022-02-02 03:07:00 -08:00
Andrey Goncharov
e686766e5f Simplify CertificateProvider setup
Summary:
Currently, certificateSetup is called in two places:
- processCertificateSigningRequest
- loadSecureServerConfig

`loadSecureServerConfig` is a mandatory step of Flipper server initialization ([ServerController.init](https://www.internalfb.com/code/flipper/[24785758018a2ffbd4751ad2b9093b5ef97c611d]/src/fbsource/xplat/sonar/desktop/flipper-server-core/src/comms/ServerController.tsx?lines=118)). Flipper cannot start without executing it.

As a result, calling `certificateSetup` in `processCertificateSigningRequest` always results in the early return.

This diff removes executing `certificateSetup` from `processCertificateSigningRequest`. Since it's called only during server setup (so only once), it no longer makes sense to use `didCertificateSetup`.

Next steps:
- Extract Android and iOS certificate utils. Remove the dependency on accessing adb/idb dynamically. See D33711652 (da618fd3f3).

Reviewed By: jknoxville

Differential Revision: D33817119

fbshipit-source-id: 675d1e2fe468782da458832c2e88259c92951fdb
2022-02-02 03:06:59 -08:00
Lawrence Lomax
ed03f1b107 Use idb to record devices
Summary:
`idb` has supported video recording on devices for quite some time now. We even have the implementation in `iOSDevice`, but it's currently unused.

As a result, we just need to remove the check within `iOSDevice` that the target is an "emulator" and it will use the `idb` implementation. Removing this check means that the button is now selectable within the UI.

Reviewed By: passy

Differential Revision: D33913383

fbshipit-source-id: b3d6b4c480c79b54f0d2c206c68092ab62bf71ed
2022-02-01 04:57:16 -08:00
Lawrence Lomax
3a9c875e03 Avoid double recording in iOSDevice
Summary: This should in theory never happen since the state of the recording is also managed within the UI. However, it's better to ensure that if `startRecording` is called twice, without calling `stopRecording` first it will error rather than leak a recording (the first process will still run but the object representing it is oprhaned)

Reviewed By: passy

Differential Revision: D33913298

fbshipit-source-id: f8fa6b0e4fdbdf4282633fa29a736d3e7dedf3bb
2022-02-01 04:57:16 -08:00
Lawrence Lomax
7d34c86f78 Remove recording invariants
Summary:
The state of the destination and the process are coupled together. As a result it makes sense to move these to an object type.

This prevents destination and process being independently settable. No change in behaviour, just a removal of invariants that need to be checked

Reviewed By: passy

Differential Revision: D33913213

fbshipit-source-id: ed18650cac4f72d40e82d20254674f7fa12cbb48
2022-02-01 04:57:16 -08:00
Lawrence Lomax
a9b9a1bff4 Remove redundant xcodeCommandLineToolsDetected
Summary: This is public but never read, no need for it to exist

Reviewed By: passy

Differential Revision: D33893097

fbshipit-source-id: aa423464f9cc0c35768a549fd5cb481784d8bcd6
2022-02-01 00:44:34 -08:00
Lawrence Lomax
9cbdc3038f Remove mising iOS Bridge invariant in iOSDeviceManager
Summary:
There's no need for us to have a property that can be undefined, since we can use the magic of *passing arguments* to achieve the same end result.

The unit test a bit more precarious, but it's left here for posterity or until we decide to kill it otherwise.

Reviewed By: passy

Differential Revision: D33892407

fbshipit-source-id: 3b499511189862e2265d8d6d29f849a7b813050e
2022-02-01 00:44:34 -08:00
Lawrence Lomax
757b82757e Use polymorphic IOSBridge to perform iOS target listing
Summary:
Bulding on the work from prior diffs we can use the created bridge directly. No need to have if statements calling out to sub-functions, just use the base type itself which will use the appropriate implementation.

There's no behavioural change here. Either idb was queried for sims/devices or simctl was queried for just sims, they were always mutually exclusive.

Reviewed By: passy

Differential Revision: D33842604

fbshipit-source-id: 0bf63ffc34368c70df31c105ea0ba5df941e72cc
2022-02-01 00:44:34 -08:00