Summary:
Changelog: Initiate cert exchange when medium changes
Fixes the following bug:
1. Start an iOS app with WWW cert exchange
2. Get cert (and fake serial of a virtual device)
3. Close app
4. Restart Flipper
5. Switch app to FS_ACCESS cert exchange
6. Start app
Expected result:
App re-initializes cert exchange to get a new serial of a real device
Current result:
App tries to connect securely using the previous fake serial of a virtual device. Flipper does not recognize it and refuses the connection.
Reviewed By: lblasa
Differential Revision: D33163798
fbshipit-source-id: 67126a9b562f2cb7cfe6521a46abf38b2699fb2d
Summary:
This diff removes most deps from the root package.json, which now only contains electron and shared build / test infra structure: lint, prettier, jest, typescript.
This makes it possible to control much better which packages are used where, as all sub packages now have their deps explicitly in their package.json instead of incidentally shared. This allows for example to disable DOM types for all packages by default (flipper-plugin, ui(-core) and app still request it), and in the next diff I hope to add to this that nodeJS types are no longer shared either, so that UI oriented packages will generate compile errors when using Node built-ins
This diff removes most deps that were currently unused, and dedupes a bunch of other ones, so the build should probably be a bit smaller now as well:
{F686704253}
{F686704295}
Reviewed By: antonk52
Differential Revision: D33062859
fbshipit-source-id: 5afaa4f2103d055188382a3370c1fffa295a298a
Summary:
Changelog: Register shortcuts only for Flipper application instead of globally. Fixes https://github.com/facebook/flipper/issues/3090
As reported, during decapitation we accidentally started registering shortcuts globally, rather per app as it used to be in the menu's. This diff fixes that and also makes sure shortcuts are supported in the browser version of flipper
Reviewed By: lawrencelomax
Differential Revision: D33158445
fbshipit-source-id: 8371e5b96e772152eeb93ba990e1f5edb9e67085
Summary:
Changelog: Fixed issue where a missing ANDROID_SDK_ROOT env var made it impossible to launch emulators
Run into an issue where ANDROID_SDK_ROOT wasn't set for my user, causing Flipper not to be able to launch emulator, which was looked up from the path rather than using the flipper settings.
Fixes: https://github.com/facebook/flipper/issues/3119
Reviewed By: timur-valiev
Differential Revision: D33158280
fbshipit-source-id: ea5616b10265ed43f1012c58da081be275ff1d5b
Summary:
Created a plugin from https://www.internalfb.com/intern/staticdocs/flipper/docs/tutorial/intro
The plugin allows us to look at various signal events and help debug issues for messenger copresence with different protocols (upi or gqls)
Differential Revision: D28548194
fbshipit-source-id: 5f5063dc5bc1dbf282bd327907003301836f3698
Summary:
Bundled plugins so far didn't load because the defaultPlugins was not generated yet. Fixed follow up errors that resulted from node modules not being available in the browser, and made the process more robust so that one plugin that fails to initialise doesn't kill all bundled plugins from being loaded.
Cleaned up the server scripts, and reused the BUILTINS list that is already maintained in the babel transformer.
Report errors during the build process if modules are referred that are stubbed out (later on we could maybe error on that)
Reviewed By: aigoncharov
Differential Revision: D33020243
fbshipit-source-id: 3ce13b0049664b5fb19c1f45f0b33c1d7fdbea4c
Summary: Make sure the flipper server socket only accepts local connections
Reviewed By: aigoncharov
Differential Revision: D33020251
fbshipit-source-id: 53e95e4871a45f3a3fa14f999499568a5a6b4995
Summary: Since no plugin directly uses adbkit or crc32 anymore, we removed them from the globals. They wouldn't work in the browser anyway
Reviewed By: aigoncharov
Differential Revision: D33019084
fbshipit-source-id: 66ab0756399fdb401c63f5e8271bdd62cb79ab4a
Summary: Removed process, adbkit and electron usages that were still remaining. Verified changes by disabling the built-in module stubbing (will be cleaned up further later in this stack).
Reviewed By: aigoncharov
Differential Revision: D33019083
fbshipit-source-id: 8bfce31f4b5ed349cb4fd86d34c9b41b9b8b8360
Summary: During startup the socket connection would close a few times, among others because Scribe dumps 1.3 MB of data after startup, and the maximum payload of `socket.io` defaults to 1MB. This diff changes it to 100MB (the max size used by `ws` library). We know that we need at least > 10 MB, as that is what plugins like Network cap at.
Reviewed By: aigoncharov
Differential Revision: D33017653
fbshipit-source-id: 1233af6fbdc4b9eed42786ee418cfd6d43b2b433
Summary:
Removed remaining path / fs imports from Flipper core.
`expand-tide` needed replacement too, but noticed that it never actually rewrites paths since all use cases were already using absolute paths, so removed it instead.
Reviewed By: aigoncharov
Differential Revision: D33017654
fbshipit-source-id: e12f66ef68b5f9e4279411c94445a2fb87249e9a
Summary: Per title. Made an explicit distinction between binary and non binary files, since they need to be encoded differently. This keeps both the implementation and API simpler (in terms of overloading / type checking)
Reviewed By: aigoncharov
Differential Revision: D33016031
fbshipit-source-id: 3c99956eb016849a908a171d88a7a64a88b76268
Summary: Even with the `--no-bundled-plugins` flag, still a hundred plugins were loaded when running flipper-server
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32987158
fbshipit-source-id: 19e51e7e5f8ec9e664eb48cf2f2b8936f2f5ed73
Summary: Intern requests didn't work in the browser version of Flipper, as the axios objects that are returned from the server end up as garbage over the socket. Fixed that by construction the proper result object.
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32984537
fbshipit-source-id: 09c44ed95ce5e3f5e9495f2f9324f1f89e3c62ba
Summary: Run doctor checks remained pending when the socket disonnected during a check. This
Reviewed By: aigoncharov
Differential Revision: D32984539
fbshipit-source-id: 277005e78803afaaa220cc5ca7fdc9cca6254453
Summary: As a convenience, open the browser by default when starting up
Reviewed By: timur-valiev
Differential Revision: D32984536
fbshipit-source-id: 540abf594f2f2553880f587bcd7d4811ea36fe74
Summary: This diffs adds debugging support to flipper server, by adding VSCode config for it
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32982874
fbshipit-source-id: 8e187ad05a05566a598db04b97e8b08e3de7e835
Summary:
The build process for the server was a simple ts-node that compiled all deps. However, that didn't do any source transformations we need, like replacing `fb-stubs` with `fb` in facebook builds.
This diff works out the dev build process to align more with how other parts of the code base is build, by starting metro to build and bundle the server (only the sources of flipper-server, flipper-server-core and other flipper packages are bundled, node-deps are left as is).
To achieve this, since metro doesn't have support for 'external' packages like any arbitrarily other bundler, we recycle the electronRequire work around that is used in the desktop app as well
Reviewed By: aigoncharov
Differential Revision: D32949677
fbshipit-source-id: 00d326bb17b68aece6fb43af98d0def13b335e74
Summary: Noticed that the welcome screen started bleeding in the sidebar when the screen is too small. Unlike the plugin container it lacked an overflow: hidden.
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32987160
fbshipit-source-id: be324247cdb4abfeec12c40624d65f9fa1e86eff
Summary:
Changelog: Fixed issue where occasionally a plugin wouldn't open after starting Flipper
This fixes a long standing issue where rarely Flipper wouldn't show the selected plugin. This turned out to be a raise condition, that was easy to reproduce in the Flipper browser version; if a client register before all the plugins are loaded, the plugins that are enabled for that client, but not loaded yet, will not instantiate and hence not show up. This diff fixes that
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32987162
fbshipit-source-id: f3179cd9b6f2e4e79d05be1f2236f63acdf50495
Summary:
I was running flipper-server on a fresh machine without Flipper installed and discovered that reading / writing settings failed since `~/.flipper` wasn't existing, due to using `access` instead of `pathExists`.
Added a warning about needing to restart the server after making changes, since that is tricky to do from the UI.
Fixed an issue in the settings screen, which would fs.stat as part of rendering, causing the Settings UI not to load.
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32984538
fbshipit-source-id: 2b2011ad9d84c72ac824d92a8c96f636237b8771
Summary:
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.50 to 1.0.51.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/anyhow/releases">anyhow's releases</a>.</em></p>
<blockquote>
<h2>1.0.51</h2>
<ul>
<li>Show doc for <code>Ok</code> fn</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="871be23b2c"><code>871be23</code></a> Release 1.0.51</li>
<li><a href="97cff686ef"><code>97cff68</code></a> Show doc for Ok fn</li>
<li>See full diff in <a href="https://github.com/dtolnay/anyhow/compare/1.0.50...1.0.51">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/3129
Reviewed By: nikoant
Differential Revision: D33025282
Pulled By: passy
fbshipit-source-id: 4cc24a74933155c8d24e6030cab160b39623fbfc
Summary:
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.3 to 2.34.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/clap-rs/clap/commits">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/3128
Reviewed By: nikoant
Differential Revision: D33025279
Pulled By: passy
fbshipit-source-id: 8d6bb8582e71ba138b2a600cb104427fe86a7f0b
Summary:
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/daaku/nodejs-tmpl/commits/v1.0.5">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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/flipper/network/alerts).
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/3144
Reviewed By: nikoant
Differential Revision: D33025249
Pulled By: passy
fbshipit-source-id: 67ff09cf061944a2db97e168242e3dfef22ec8e6
Summary:
Forbid imports from nested directories of flipper-common, flipper-plugin, flipper-ui-core
In the stack of D32926830 I occasionally imported from flipper-plugin/src/... which is not allowed. This should fix any auto-import related issues once and for all.
Reviewed By: timur-valiev
Differential Revision: D32987054
fbshipit-source-id: f19f6278219961ad283cacfec094a6c703ca93f8
Summary:
Facenook:
Use downloadFile API in Mobile Builds plugin
Reviewed By: mweststrate
Differential Revision: D32922041
fbshipit-source-id: d554ed9287af3bda4329e87732ab4de67136c0d2
Summary: Changelog: Expose "downloadFile" API to Flipper plugins. Allow them to download files form the web to Flipper Server.
Reviewed By: mweststrate
Differential Revision: D32950685
fbshipit-source-id: 7b7f666e165ff7bf209230cdc96078272ede3616
Summary:
Changelog: Disable idb stdout buffering for logs. Show logs on iOS devices without buffering.
Currently, idb buffers log output if it's redirected to a non-TTY. It is the default behavior for Python (read more about it [here](https://eklitzke.org/stdout-buffering)).
It leads to users seeing logs only in large chunks because the size of the buffer is substantial.
Setting PYTHONUNBUFFERED to a non-empty string disables Python output buffering.
Reviewed By: lblasa
Differential Revision: D32984711
fbshipit-source-id: 3e0a889b6b60b6d266f4a0c1894db937868c7433
Summary:
On Flipper Desktop, rawCall uses sendExpectResponse from the client connection.
RSocket only rejects the promise if there's an error in the transport layer and thus is unable to send data over the wire.
WebSocket sends without errors as errors will always be reported via a different callback api.
Having said that, WebSocket client connections were rejecting the promise for a valid client response that contained an error instead of success, which in this specific case is expected.
The solution is to always resolve the promise with the response and let the Client interpret the response accordingly.
Changelog: Fixes an issue whereas client errors were erroneously disconnecting a client from the Desktop side
Reviewed By: aigoncharov
Differential Revision: D32983969
fbshipit-source-id: 4215d9234235a9e2035b1d743c317ebdf2f656a2