Summary: This diff fixes the issue when some Flipper persisted state is required just after startup, but is loaded too late. This is easy to notice with a flag indicating whether Welcome window should be shown. Even if the flag is disabled, Flipper will still show the window on the next launch because it loads the state later than needed.
Differential Revision: D29426004
fbshipit-source-id: 011b5890034a6e254ce9ab834f098f1a2ab62a70
Summary: Trying to get rid of immutable_table, which is used in only 3 places. One of them being the plugin installer.
Reviewed By: jknoxville
Differential Revision: D29295534
fbshipit-source-id: dfae9476635c3a8ebba9f1439905bae693fdfd57
Summary:
createTablePlugin isn't used anymore, since all FB plugins now use flipper-plugin's, version.
Verified that no public OSS plugins use the abstraction either.
This is part of a bigger stack to clean up immutable js usage / managed table duplication and export performance speed
Reviewed By: jknoxville
Differential Revision: D29265565
fbshipit-source-id: dd6671f0b3af857db1a512c6658e1ff75c49358d
Summary:
Bumps [ws](https://github.com/websockets/ws) from 7.4.6 to 7.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>7.5.0</h2>
<h1>Features</h1>
<ul>
<li>Some errors now have a <code>code</code> property describing the specific type of error
that has occurred (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1901">https://github.com/facebook/flipper/issues/1901</a>).</li>
</ul>
<h1>Bug fixes</h1>
<ul>
<li>A close frame is now sent to the remote peer if an error (such as a data
framing error) occurs (8806aa9a).</li>
<li>The close code is now always 1006 if no close frame is received, even if the
connection is closed due to an error (8806aa9a).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e3f0c1720a"><code>e3f0c17</code></a> [dist] 7.5.0</li>
<li><a href="1d3f4cbb0e"><code>1d3f4cb</code></a> [doc] Fix anchor tags for error codes</li>
<li><a href="6eea0d466b"><code>6eea0d4</code></a> [doc] Fix typo</li>
<li><a href="bb5d44b118"><code>bb5d44b</code></a> [doc] Sort error codes alphabetically</li>
<li><a href="c6e3080670"><code>c6e3080</code></a> [minor] Attach error codes to all receiver errors (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1901">https://github.com/facebook/flipper/issues/1901</a>)</li>
<li><a href="074e6a8be7"><code>074e6a8</code></a> [fix] Don't call <code>ws.terminate()</code> unconditionally in <code>duplex._destroy()</code></li>
<li><a href="8806aa9a83"><code>8806aa9</code></a> [fix] Close the connection cleanly when an error occurs</li>
<li><a href="05b8ccd639"><code>05b8ccd</code></a> [doc] Fix broken link (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1897">https://github.com/facebook/flipper/issues/1897</a>)</li>
<li><a href="03a707884c"><code>03a7078</code></a> [doc] Remove unsafe regex from code snippet</li>
<li><a href="7ee31157d7"><code>7ee3115</code></a> [doc] Add logo to coverage badge</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.4.6...7.5.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/2487
Reviewed By: nikoant
Differential Revision: D29264222
Pulled By: mweststrate
fbshipit-source-id: 2c7eebd793c6ea9f28543a2808f387399043e59f
Summary: Changed unit test infra to wrap legacy plugins by default in Sandy, and adapted tests where needed.
Reviewed By: nikoant
Differential Revision: D29264660
fbshipit-source-id: fe7cbc8af826afac5f945103586b3cb9647e7fbd
Summary: Changed some imports, and again the Flipper initialisation broke. Refactored the store initialization to create nowhere module local constants, which prevents generally against module loading issues, making it possible to load all code first, and then intialise things through the `init()` method, which should make Flipper initialisation a lot more robust to changes
Reviewed By: passy
Differential Revision: D29233603
fbshipit-source-id: 322cb87cba23228b1d7a88634b7b3995e27cc277
Summary: Per title / see rest of the stack
Reviewed By: passy
Differential Revision: D29196711
fbshipit-source-id: 63ea52a07b61a11c1ad4013985c5b005045dcf0a
Summary:
This diff introduces loading classic Flipper plugins in a Sandy container. By wrapping plugins into Sandy we will be able to remove a lot of code / logic duplication related to state, queue processing, serialization etc. This will allow us to remove most or all of the complex plugin logic from the old system, only keeping onto the legacy components which have a lower maintenance burden. Until all plugins are Sandy.
This diff is not feature complete but only implements the core mechanisms for (persisted) state and communication.
Keyboard support, serialization, and rewiring tests etc will be added in next diff.
The feature is introduced behind GK flipper_use_sandy_plugin_wrapper to have kill switch.
Tests will be added later in this diff by redirection a part of the current mechanisms to wrapped plugins. (Will land the stack as a whole)
Reviewed By: passy
Differential Revision: D29165866
fbshipit-source-id: 57f84794a4a5f898bf765ce2de13cc759267fbc6
Summary: Changelog: The 'nativeplugins' on Android are no longer supported
Reviewed By: jknoxville
Differential Revision: D29163281
fbshipit-source-id: fb4032f240fc306608fe57479f3124d4e7a3400f
Summary: In support group telling users to merely "pull" seemed to be a bit too vague instruction.
Reviewed By: passy
Differential Revision: D29225726
fbshipit-source-id: 5c0db1b2d3afd2a398d28caf3438f2959e5d46f1
Summary: This is purely refactoring change. Before that we computed plugin lists in-place in PluginList component. Now we will be re-computing them as side effect and will keep computed lists in redux. This makes it easier to re-use plugin lists in other places outside of PluginList component, e.g. in the upcoming Marketplace UI.
Reviewed By: mweststrate
Differential Revision: D29161719
fbshipit-source-id: 5cb06d4d8a553aa856101c78b2311fbc078c6bd7
Summary:
Changelog: Fix links not always openening in the Browser
As reported in https://fb.workplace.com/groups/flippersupport/permalink/1154240895056567/, in some cases links would open inside Flipper itself, and as a result the user would be stick as he can't navigate away.
This happened only when a `Link` was being deconstructed from `Typography` by a module that was loaded before `Link.tsx`, which fixes `Typography.Link` to do that automatically. For example:
```
import {Typograph} from "antd"
const {Link} = Typography;
```
Addressed this issue by patching the antd package directly during build, rather than during application start.
Reviewed By: passy
Differential Revision: D29193899
fbshipit-source-id: b291018406e343c0f7de1d1d899924902159d8c7
Summary:
Includes most of the PRs currently open.
allow-large-files for antd
Reviewed By: mweststrate
Differential Revision: D29160385
fbshipit-source-id: b9e6d3b16a806cf615b7b0e24ba3395f3ed44822
Summary:
If port 8088 / 8089 are in use, devices will not be able to connect to Flipper. We have checks for this in place, however it turns out that users can miss them. Potentially this can be caused for mulltiple reasons:
1. The notification is shown fairly short (in my testing it disappeared sometimes in < 2 secs
2. The notification is shown outside of the Flipper area
3. Flipper might not have permissions to show notifs in the first place.
Changed the notification to show inside Flipper, not hide automatically, and added clearer instructions. Including mentioning the port number (since there are multiple)
Changelog: [Flipper] Provide clearer error if Flipper ports are already in use, making device connections impossible
Differential Revision: D29128014
fbshipit-source-id: 16d9b451aa84281744155bfa1042429911a7b774
Summary:
Concatenating strings is not a great idea for paths. This isn't actually Windows-specific (I think) but maybe more common there. If you have a space as part of your ADB path, you're in for a world of pain.
This addressed a couple of issues but I'm sure there are more when you use it for more detailed use cases.
Closes https://github.com/facebook/flipper/issues/2438
Reviewed By: mweststrate
Differential Revision: D29061367
fbshipit-source-id: 001e498ac42bd8df6e6852be9b42fb5f38379c2e
Summary: Since the functionality is now available as part of DataTable, the HoC doesn't seem to be needed as generic abstraction. it is used in handful places outside datatable / datalist, but those can be localized in the future or should datatable / datalist.
Reviewed By: fabiomassimo
Differential Revision: D28993836
fbshipit-source-id: 3e6da7c7b48348faa0c4f7281868196f5585a065
Summary: We don't need to show plugin-related details and button "open globalError" (which anyway doesn't work) when showing global notifications.
Reviewed By: passy
Differential Revision: D28900468
fbshipit-source-id: 54347ede4f1e4dbfb0e41be5c50374fda35c1223
Summary: Improved message a bit to make it clear that VPN/Lighthouse is required on both sides - computer and mobile device. Also it will now show login link in case user is not signed in yet, because login is also required for www cert exchange.
Reviewed By: passy
Differential Revision: D28899558
fbshipit-source-id: 89de776f602a9f27a2c068efd8e3f08c28ec5f57
Summary: SignInSheet and "dispatcher/user" are not used in public build, so it doesn't make sense to keep them on github.
Reviewed By: passy
Differential Revision: D28789384
fbshipit-source-id: aa1ab0fc70f2211260017be42762714b753ea877
Summary: Changelog: allow zooming Flipper window content in and out either using View menu or hotkeys (Cmd+Plus) and (Cmd+Minus)
Reviewed By: passy
Differential Revision: D28748567
fbshipit-source-id: a214c708cae2c82d04eb53fc879518a0106517de
Summary:
Bumps [ws](https://github.com/websockets/ws) from 7.3.0 to 7.4.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>7.4.6</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a ReDoS vulnerability (00c425ec).</li>
</ul>
<p>A specially crafted value of the <code>Sec-Websocket-Protocol</code> header could be used
to significantly slow down a ws server.</p>
<pre lang="js"><code>for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
const value = 'b' + ' '.repeat(length) + 'x';
const start = process.hrtime.bigint();
<p>value.trim().split(/ *, */);</p>
<p>const end = process.hrtime.bigint();</p>
<p>console.log('length = %d, time = %f ns', length, end - start);
}
</code></pre></p>
<p>The vulnerability was responsibly disclosed along with a fix in private by
Robert McLaughlin from University of California, Santa Barbara.</p>
<p>In vulnerable versions of ws, the issue can be mitigated by reducing the maximum
allowed length of the request headers using the <a href="https://nodejs.org/api/cli.html#cli_max_http_header_size_size"><code>--max-http-header-size=size</code></a>
and/or the <a href="https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener"><code>maxHeaderSize</code></a> options.</p>
<h2>7.4.5</h2>
<h1>Bug fixes</h1>
<ul>
<li>UTF-8 validation is now done even if <code>utf-8-validate</code> is not installed
(23ba6b29).</li>
<li>Fixed an edge case where <code>websocket.close()</code> and <code>websocket.terminate()</code> did
not close the connection (67e25ff5).</li>
</ul>
<h2>7.4.4</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a bug that could cause the process to crash when using the
permessage-deflate extension (92774377).</li>
</ul>
<h2>7.4.3</h2>
<h1>Bug fixes</h1>
<ul>
<li>The deflate/inflate stream is now reset instead of reinitialized when context
takeover is disabled (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1840">https://github.com/facebook/flipper/issues/1840</a>).</li>
</ul>
<h2>7.4.2</h2>
<h1>Bug fixes</h1>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f5297f7090"><code>f5297f7</code></a> [dist] 7.4.6</li>
<li><a href="00c425ec77"><code>00c425e</code></a> [security] Fix ReDoS vulnerability</li>
<li><a href="990306d144"><code>990306d</code></a> [lint] Fix prettier error</li>
<li><a href="32e3a8439b"><code>32e3a84</code></a> [security] Remove reference to Node Security Project</li>
<li><a href="8c914d18b8"><code>8c914d1</code></a> [minor] Fix nits</li>
<li><a href="fc7e27d12a"><code>fc7e27d</code></a> [ci] Test on node 16</li>
<li><a href="587c201bfc"><code>587c201</code></a> [ci] Do not test on node 15</li>
<li><a href="f672710797"><code>f672710</code></a> [dist] 7.4.5</li>
<li><a href="67e25ff502"><code>67e25ff</code></a> [fix] Fix case where <code>abortHandshake()</code> does not close the connection</li>
<li><a href="23ba6b2922"><code>23ba6b2</code></a> [fix] Make UTF-8 validation work even if utf-8-validate is not installed</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.3.0...7.4.6">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/2371
Reviewed By: passy
Differential Revision: D28714468
Pulled By: nikoant
fbshipit-source-id: c2a3a7091599f29d453a35bf89bab4a03817509c
Summary: Some tests were occasionally flaky, by emulating delays, time variation should no longer influence tests.
Reviewed By: passy
Differential Revision: D28572946
fbshipit-source-id: f4134a6509a0ec0be2e8f36e5623c4882b5531b8
Summary:
This is in fact correctly handled, shown in the UI and we don't
need a task if someone pastes the wrong token.
Reviewed By: priteshrnandgaonkar
Differential Revision: D28569896
fbshipit-source-id: 689bff06b4a488be7ad4c58eb4f2e91018da31cf
Summary: Fixed new error which appeared in logview after last release. See task T91245438 for details.
Reviewed By: passy
Differential Revision: D28569848
fbshipit-source-id: a4b622d4387aa41ecc4db269e05c5315669df250
Summary:
This diff generalises computation of the currently selected plugin, app, device etc. and adds this information to all the analytics events and error reports.
Slicing of events by os, device, app or selected plugin can be very useful. This is especially true for errors which often affects only certain types of devices, e.g. android only or physical devices only. Having such information can help to narrow down such issues.
Reviewed By: passy
Differential Revision: D28511441
fbshipit-source-id: ed9dc57927c70ed8cc6fe093e21604eae54c2f60
Summary:
One is keytar, which just needed a context.
The second one is happening every time someone uses Flipper
and not being on Lighthouse, spamming our log category besides
actually being properly handled.
Reviewed By: nikoant
Differential Revision: D28479791
fbshipit-source-id: 029721df46d12b2942b590a232618ef039a2323d
Summary: This diff adds attributing of all error reports with the information about the plugins caused them. To do that we try to map error stack trace to plugins by searching for plugin directories in it. We can do this only for plugins loaded from disk as we are looking for their physical locations in stack. To make it possible to search for multiple plugins in one go we build and maintain a trie containing all the loaded plugins locations.
Reviewed By: passy
Differential Revision: D28475938
fbshipit-source-id: 59c8ac39ffe54262b1d57f21fad44eb89748dff2