Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/3473
This diff is the first one which addresses https://github.com/facebook/flipper/issues/3320.
In this diff we are making a part of the code used for internal Flipper plugin distribution in Meta also available publicly for re-using in other orgs.
Some explanation on how plugin installation and updates is designed now:
1) We periodically poll for plugins available for download. API for retrieving available plugins list is abstracted and will be different between public and fb versions, however all other logic is re-used.
2) In addition to "Enabled" and "Disabled" plugins in the left panel Flipper shows "Detected in App" list. Plugins in this list are those which are known compatible with the currently selected device/app, but not yet installed.
3) User can install any of "Detected in App" plugins by clicking to "Download and install" button near them in the left panel similarly to enabling plugins in "Disabled" list.
4) If we detect that for some installed plugin we have a newer version available for download - we download it silently and store on disk.
5) If the plugin for which we have new downloaded version is disabled - we update it silently without any notifications by loading new version from the disk and unloading the previous version from cache.
6) If the plugin for which we have new downloaded version is enabled then we avoid updating it automatically (because we need to reset plugin state in such case) and instead show notification on top of the plugin and ask user to reload it to apply new version. On reloading we reset the plugin state.
7) On Flipper startup we always update all plugins to their latest versions available on the disk.
Reviewed By: aigoncharov
Differential Revision: D34380308
fbshipit-source-id: a94d724e42aa5ef78445af266fcd4c424226a703
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:
^
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
Summary:
This diff has been automatically generated by the inpage editor.
If you want to update this diff, go through the preview link that would be attached to the test plan.
Please ensure you are editing the same page that was used to create this diff.
Reviewed By: nikoant
Differential Revision: D34249537
fbshipit-source-id: cc64c219d3400633af7bbcb5ab002c13dfb83899
Summary:
Done using
```
./gradlew wrapper --gradle-version=7.4 --distribution-type=all
```
Waiting for CI result to check if this also addresses the build problem.
Note for reviewers: This is generated. Scanning for Bad Things is appreciated but you don't need to carefully read every line.
Depends on https://github.com/facebook/flipper/issues/3436.
Pull Request resolved: https://github.com/facebook/flipper/pull/3437
Test Plan: The recently added test step for verifying that this doesn't regress our APK creation is passing: https://github.com/facebook/flipper/runs/5188576639?check_suite_focus=true
Reviewed By: lblasa
Differential Revision: D34218046
Pulled By: passy
fbshipit-source-id: 20d3c543db8f1c12f996977d0bb34d62ea5bcd0b
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: 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
Summary:
'Failed to start connection server' is a bit misleading. 'server-error' is used for both server and client errors.
Changelog: Better notification messaging
Reviewed By: aigoncharov
Differential Revision: D34269045
fbshipit-source-id: f51a28fc0e9ba394b464e5bfca4d0e497f740b1b
Summary:
Bumps [metro-runtime](https://github.com/facebook/metro) from 0.66.2 to 0.68.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/metro/releases">metro-runtime's releases</a>.</em></p>
<blockquote>
<h2>Release v0.68.0</h2>
<ul>
<li><strong>[Breaking]</strong> <code>resolver.resolveRequest</code> moved to the front of the resolution algorithm and <a href="https://facebook.github.io/metro/docs/configuration/#resolverequest">has a new API</a> (d81d8877c05637eac2b4ea946a9fa1e8ae869b06)</li>
<li><strong>[Feature]</strong> <code>metro-react-native-babel-preset</code>: Support async iterators, "for await ... of" (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/747">https://github.com/facebook/flipper/issues/747</a> by <a href="https://github.com/newyankeecodeshop"><code>@newyankeecodeshop</code></a>)</li>
</ul>
<p>Thanks to all of our contributors for helping improve Metro! 🚇</p>
<h2>Release v0.67.0</h2>
<ul>
<li><strong>[Breaking]</strong> Use custom resolvers (<code>resolver.resolveRequest</code>) before checking the Haste map. (96fb6e904e1660b37f4d1f5353ca1e5477c4afbf)</li>
<li><strong>[Feature]</strong> Update React Native lazy imports list with the removal of <code>StatusBarIOS</code>. (2a0f77925e3299e01c2bfe82d0356145a643adc0)</li>
<li><strong>[Feature]</strong> Allow configuring the path of the canonical empty module, which now lives in <code>metro-runtime</code> by default. (bd5f9323337b03a77bc219636937bb75cd8c18ca, 6e3e789b685b95ea59a58364a751e8010d536e8b, 7723be545795c936cb81cad214ee202f72e169b3)</li>
<li><strong>[Feature]</strong> Add <code>initialize_done</code>, <code>transformer_loading</code>, and <code>transformer_loaded</code> events to the <code>Reporter</code> interface. (d19cf5d7e88207a8d46c17b570f14a239dae8926)</li>
<li><strong>[Feature]</strong> Add <code>waitForBundler</code> option to the <code>runServer()</code> and <code>runMetro()</code> APIs. (57d8a92583185a97dffcdc1c95fef7780be9104d)</li>
<li><strong>[Feature]</strong> Add <code>resolver.disableHierarchicalLookup</code> option. (01416f1bc41a3d557b24e4b508fed5f158990108)</li>
<li><strong>[Feature]</strong> Remove confusing troubleshooting steps from missing module errors. (1fa45c21f7508cc3a852071b775f592873700ad0)</li>
<li><strong>[Feature]</strong> Infer names for anonymous functions in optional calls. (4ced2a1be8a42a9c7df71b566918a457bad207c1)</li>
<li><strong>[Feature]</strong> Infer names for anonymous functions memoized with useCallback. (2611f618b245fd2bd2c3558d2536011269bb5a68)</li>
<li><strong>[Feature]</strong> Update terser to v5 in <code>metro-minify-terser</code>. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/754">facebook/metro#754</a> by <a href="https://github.com/rockwotj"><code>@rockwotj</code></a>, <a href="https://github-redirect.dependabot.com/facebook/metro/pull/606">facebook/metro#606</a> by <a href="https://github.com/janicduplessis"><code>@janicduplessis</code></a>)</li>
<li><strong>[Fix]</strong> Fix a caching issue with custom resolvers. (793b1a03c1f0b5e63869b471adab3f1ad61b199b)</li>
<li><strong>[Fix]</strong> Specify UTF-8 encoding when serving bundles. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/695">facebook/metro#695</a> by <a href="https://github.com/zhiqingchen"><code>@zhiqingchen</code></a>)</li>
<li><strong>[Fix]</strong> Support <a href="https://github.com/defunctzombie/package-browser-field-spec#replace-specific-files---advanced">package.json module replacements</a> for requires with implicit extensions. (41522a25bec9325d1df5981b55d4672db7126895)</li>
<li><strong>[Fix]</strong> Resolve <a href="https://github.com/defunctzombie/package-browser-field-spec#replace-specific-files---advanced">package.json module replacements</a> when the replaced module isn't a physical file. (171393a6319e507935eeb3d40561e908c1a2abfe)</li>
<li><strong>[Fix]</strong> Fix stack trace symbolication when input files have non-Unix line endings. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/691">facebook/metro#691</a> by <a href="https://github.com/danielsmc"><code>@danielsmc</code></a>)</li>
<li><strong>[Fix]</strong> Decrease the precedence of <code>resolver.nodeModulesPaths</code> to respect transitive dependencies. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/738">facebook/metro#738</a> by <a href="https://github.com/sharmilajesupaul"><code>@sharmilajesupaul</code></a>)</li>
<li><strong>[Fix]</strong> Respect <code>mangle: false</code> & <code>sourceMap: false</code> in <code>minifierConfig</code>. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/749">facebook/metro#749</a> by <a href="https://github.com/mfbx9da4"><code>@mfbx9da4</code></a>)</li>
<li><strong>[Fix]</strong> Update hash function from MD4 to MD5 for Node 17 compatibility. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/752">facebook/metro#752</a> by <a href="https://github.com/tobua"><code>@tobua</code></a>)</li>
</ul>
<blockquote>
<p>NOTE: Experimental features are not covered by semver and can change at any time.</p>
</blockquote>
<ul>
<li><strong>[Experimental]</strong> Add <code>server.unstable_serverRoot</code> option to allow serving bundles from folders outside the project root. (026a66cf40df1bd05da2afc1660efa1d9605c55a, ca86682012eb836e2b6aeb001f2b3112129e38c3, e061cf342505f3d07fb21f85f22925e3d05557c9, 70e98882ad24d7c25c9b73eaf347e60f2a74c8ca, baacea28635dae7fea3bd30dd485252ae59a937e)</li>
<li><strong>[Experimental]</strong> Update <code>metro-hermes-compiler</code>. (e80434cf329619e1a0c6c56ae7be6c88cb350c99)</li>
<li><strong>[Experimental]</strong> Provide safe access to assets outside the project root using <code>/assets?unstable_path=...</code>. (f3d1157bacc341dff82efea2f70b634141105fc0)</li>
<li><strong>[Experimental]</strong> Add <code>resolver.unstable_hasteMapModulePath</code> option. (e8c0de0411148bd31e3decb6a5c4c1dc1d645666)</li>
</ul>
<p>Thanks to all the contributors mentioned above for helping improve Metro! 🚇</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c84b533643"><code>c84b533</code></a> Publish 0.68.0</li>
<li><a href="fbe26fd929"><code>fbe26fd</code></a> fix(website): add Algolia search API key (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/726">https://github.com/facebook/flipper/issues/726</a>)</li>
<li><a href="02baeb6dac"><code>02baeb6</code></a> Change github actions trigger to use <code>main</code> branch (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/769">https://github.com/facebook/flipper/issues/769</a>)</li>
<li><a href="bf73ed3aa7"><code>bf73ed3</code></a> RN preset: support async iterators, for await of (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/747">https://github.com/facebook/flipper/issues/747</a>)</li>
<li><a href="a40c474a67"><code>a40c474</code></a> Deploy 0.171.0 to xplat</li>
<li><a href="d81d8877c0"><code>d81d887</code></a> Move resolveRequest to the front of the resolution algorithm</li>
<li><a href="ccfec1e846"><code>ccfec1e</code></a> Release 0.67.0</li>
<li><a href="b31f5a462d"><code>b31f5a4</code></a> Deploy v0.170.0 to xplat</li>
<li><a href="36e3ffe4bd"><code>36e3ffe</code></a> Bump node-fetch from 2.6.1 to 2.6.7 (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/762">https://github.com/facebook/flipper/issues/762</a>)</li>
<li><a href="3fb4da8fae"><code>3fb4da8</code></a> Bump trim-off-newlines from 1.0.1 to 1.0.3 (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/757">https://github.com/facebook/flipper/issues/757</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/metro/compare/v0.66.2...v0.68.0">compare view</a></li>
</ul>
</details>
<br />
[](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/3451
Reviewed By: nikoant
Differential Revision: D34216543
Pulled By: passy
fbshipit-source-id: 3b212ed4822f34950450e51103aa90a45977322a
Summary:
^
Note: this is already a working case. The difference is that if we are unable to establish a socket connection, we will not attempt to create one using rsocket.
Changelog: Removes rsocket-fallback for mobile clients
Reviewed By: nikoant
Differential Revision: D33655430
fbshipit-source-id: cb6f752f2d1354ab46d011b1f19c89520e1e7dd3
Summary:
This is pretty dumb but hopefully good enough to prevent accidental regressions. We simply check if there are "enough" `libevent_core.so`s in the bundle. This is obviously not future-proof but it's super cheap to run and if it causes problems at some point, we can always remove it.
Apologies for the formatting spam. Didn't notice until I submitted this that my editor got a little passive-aggressive.
Pull Request resolved: https://github.com/facebook/flipper/pull/3436
Test Plan: CI here.
Reviewed By: lblasa
Differential Revision: D34210743
Pulled By: passy
fbshipit-source-id: a57c397e39456fae33af9f3ceed08b6944eac79e
Summary:
Bumps openssl from 1.1.1g-alpha-1 to 1.1.1l-beta-1.
[](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/3442
Reviewed By: lblasa
Differential Revision: D34212800
Pulled By: passy
fbshipit-source-id: 0e2a78fdf9ad0195f878b327c9e5667dcc8e8e0a
Summary:
Flipper network plugin does not show request payload size at all, only the response.
I was trying to use flipper to check the compression ratio and overall analytics log size, but wasn't able to it, so fixed the network plugin
Reviewed By: lblasa
Differential Revision: D34062808
fbshipit-source-id: f4d4395eece9d41380b8ac6f834a014315c5db66
Summary:
Fixes https://github.com/facebook/flipper/issues/3395
This reverts commit ecd7269848.
Will need to follow up with, ideally, a test case that is similar to my bisect script by checking the number of `_core` artefacts bundled while we figure out the root cause.
Pull Request resolved: https://github.com/facebook/flipper/pull/3435
Reviewed By: cekkaewnumchai
Differential Revision: D34202506
Pulled By: passy
fbshipit-source-id: 5b81959c0514cfc8f1aad36bf8c76a2204fa5af2
Summary: We should also check that Xcode exists at the path that the user has `xcode-select`'d
Reviewed By: passy
Differential Revision: D34168672
fbshipit-source-id: dc7c36bcb2ad1cec99e6ebb4d531417e55402f01
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:
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
Summary: These can be batched together rather nicely
Reviewed By: lblasa
Differential Revision: D34139753
fbshipit-source-id: 7388630dcae34d40308d54f18a37215cf18e5904
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
Summary:
Introducing a Flipper WebSocket client implemented in C++.
The requirement came from Spark AR (Skylight) as they have a macOS/Linux/Windows clients.
For reviewers:
- This is an implementation of the existing FlipperSocket interface. Effectively, the only type that needs to be reviewed is WebSocketTLSClient.
- BaseClient defined a base class for WebSocketClient and WebSocketTLSClient.
- WebSocketClient is a simplified version of WebSocketTLSClient as there's no TLS configuration.
Reviewed By: mweststrate
Differential Revision: D34081943
fbshipit-source-id: 619a83f5a6783a21069d0f5111d139bb180f9e97
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
Summary:
^
This change allow callers to retrieve the path of different store items some of which are used for connection authentication.
Reviewed By: aigoncharov
Differential Revision: D34081942
fbshipit-source-id: c6b8d3590993de6c48a36266a5c16f2caf9f5a93