Summary:
Add a few console logs as to highlight how long does it take for our server to start.
Additionally, do not wait until we are ready for client connections before attempting to launch. There's nothing else we do at this point. Instead, launch and wait until we are ready.
Reviewed By: passy
Differential Revision: D46639482
fbshipit-source-id: c098d229edc3cd52e5c876c509a7c81532635afa
Summary: Add custom log handler setup so people can use their own log infra instead of "printf".
Reviewed By: Neil-Clifford-FB
Differential Revision: D46590343
fbshipit-source-id: ded9cf6caa580d477a71a9155cad9db295151c84
Summary: Since ~couple of days to last week we cannot download image assets anymore from facebook.com during build, which is worked around in previous diff. This diff fixes it also in the development environment (`yarn start`)
Reviewed By: lblasa
Differential Revision: D46556075
fbshipit-source-id: ee5d912fb06d1632c41ff6d536b64a55608f5848
Summary: This is a better place as it takes place once the server starts listening.
Reviewed By: passy
Differential Revision: D46558350
fbshipit-source-id: f586defecc8e16d8f0b285615803662d8b6b75fb
Summary: This diff follows up on the previous one, by trying a larger icon size if the original requested icon size was missing.
Reviewed By: lblasa
Differential Revision: D46556076
fbshipit-source-id: 4a078088aa27390f247e39afeda4b1df261d8b30
Summary:
Since ~yesterday all our builds started failing due to being unable to download static assets. Although those assets load correctly in the browser, and by using the browsers's generated `curl` command, which looks like:
```
curl 'https://facebook.com/assets/?name=face-unhappy&variant=outline&size=24&set=facebook_icons&density=1x' \
-H 'authority: facebook.com' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'accept-language: nl,en-GB;q=0.9,en;q=0.8,nl-NL;q=0.7,en-US;q=0.6' \
-H 'cache-control: no-cache' \
-H 'cookie: OMITTED' \
-H 'pragma: no-cache' \
-H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: document' \
-H 'sec-fetch-mode: navigate' \
-H 'sec-fetch-site: none' \
-H 'sec-fetch-user: ?1' \
-H 'upgrade-insecure-requests: 1' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
--compressed
```
Download fails as soon as the cookie header is dropped.
Changes the base url to `https://facebook.com/images/assets_DO_NOT_HARDCODE/facebook_icons/` fixes that problem, unless the resolution doesn't exist (addressed in next diff).
This also seems to remove the flakiness we were experiencing before, so dropped the retry mechanism for now.
Also made failing to download an icon a warning instead of a build failure.
Reviewed By: lblasa
Differential Revision: D46552986
fbshipit-source-id: f1382d6a8fc6669691f0c8da6b77834d24a373c5
Summary: This is necessary as we map from the protocol medium to our internal medium representation.
Reviewed By: mweststrate
Differential Revision: D46557431
fbshipit-source-id: 617307cd860e1c7e230be2441c06417c44af580e
Summary: If after 15min there are no connected clients, close flipper server.
Reviewed By: antonk52
Differential Revision: D46519563
fbshipit-source-id: c3396ed8987be8ca7075c644734793e4ebceba18
Summary:
^
Token is no longer in the static directory. Also, we can now use a shared utility.
Reviewed By: aigoncharov
Differential Revision: D46516296
fbshipit-source-id: c38d024061653ac8b3fb587c8e3ad83dba0b151d
Summary: These are no longer that useful and can be quite verbose, remove.
Reviewed By: antonk52
Differential Revision: D46516093
fbshipit-source-id: e6c3a546d379ca20ff8757fdc3feaa11bf0788a0
Summary:
Previously every single visualisation node would have jsx for a tooltip and would control its own tooltop. now we have the overlay we can have just one. this improves perf a bit and simplifies the code.
i also increased the delay slightly
Reviewed By: lblasa
Differential Revision: D46274098
fbshipit-source-id: cb8afbc4804c549da9abf33d69aaf190397f74c7
Summary:
The previous approach of setting some of the borders to be thicker and different colours was flakey, sometimes parts of the border would be cut off by a parent
With this approach we figure out the offset relative to the root of the visualiser, and draw a box that is definatley on top. It works much more reliably
Also fixed a couple of other niggles:
1. Can unselect when clicking again
2. Going into focus mode clears selection since your selection may not be in the focused area and there is a phantom box
Reviewed By: lblasa
Differential Revision: D46224034
fbshipit-source-id: 24bed8db38cddab796f786e7e0a4acfe7c6a9089
Summary:
All clients need to provide an authentication token before connecting. Electron app is no different.
This change adds the authentication token whether we are connecting over UDS or TCP.
Before this change, if Flipper server was already running, launching the Electron app would look similar to this:
{F1016961594}
Reviewed By: antonk52
Differential Revision: D46418758
fbshipit-source-id: f00ffe675df78403d5921250e3e9ed9331a55bde
Summary:
Used to be stored in the static directory as it was meant to be used by connecting clients.
This is still the case, except that there may be different clients with different static directories all trying to connect to the same server.
Instead, store the authentication token with the other crypto files, in the user's home directory.
By doing this, all clients, as long as they have access to the local filesystem, can use it.
Reviewed By: mweststrate
Differential Revision: D46418639
fbshipit-source-id: 181e98346d86ad7b3fc1d0005aca3350deb6df32
Summary:
The existing error message was not in the centre and didn't give any possible remediation steps.
{F1015240268}
Reviewed By: passy
Differential Revision: D46394149
fbshipit-source-id: 09d450bef9df83c5b3af3ba49c7e0fafb81bfdce
Summary:
^
There is an issue whereas when Flipper Server is launched NOT from the terminal, it doesn't inherit the user's terminal `$PATH` variable.
This causes a few different issues.
This change tries to address that.
Reviewed By: passy
Differential Revision: D46392435
fbshipit-source-id: 6201a1749134db8c50eca8751af149737dce57d7
Summary:
I noticed we were not killing the PortForwardingApp on exit.
This is not ideal.
So, use an exit hook to kill the app.
Reviewed By: passy
Differential Revision: D46392855
fbshipit-source-id: e2b75f76c9dfab0ff46df3ad2c94a1a523154b2a
Summary:
Simplifies medium usage. Clients report this value as an integer. Internally, we transform this integer as type (a set of valid strings).
Instead of transform this value in different places, do it once when the client query is received.
Reviewed By: antonk52
Differential Revision: D46358024
fbshipit-source-id: ecd2b6c6ccbe7c38787a89d4e2f81930c7b91864
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/4794
Reviewed By: antonk52
Differential Revision: D46355046
Pulled By: passy
fbshipit-source-id: e676d4c9d8bef0b3ab29bc9e6cb23838b262c5bf
Summary:
Bumps [com.google.protobuf:protobuf-java](https://github.com/protocolbuffers/protobuf) from 3.23.1 to 3.23.2.
<details>
<summary>Commits</summary>
<ul>
<li><a href="a74f54b724"><code>a74f54b</code></a> Updating version.json and repo version numbers to: 23.2</li>
<li><a href="45ddc11b50"><code>45ddc11</code></a> Update upb dependency (<a href="https://redirect.github.com/protocolbuffers/protobuf/issues/12907">#12907</a>)</li>
<li><a href="91e5e6e76d"><code>91e5e6e</code></a> Merge pull request <a href="https://redirect.github.com/protocolbuffers/protobuf/issues/12906">#12906</a> from mkruskal-google/java-fix-23</li>
<li><a href="b556b8871c"><code>b556b88</code></a> Automated rollback of commit 4d76f12a82bc53cc2d846e65dd8c4bce6c1d4645.</li>
<li><a href="ab367ad73d"><code>ab367ad</code></a> Merge pull request <a href="https://redirect.github.com/protocolbuffers/protobuf/issues/12852">#12852</a> from fowles/23.x</li>
<li><a href="5bc7e02036"><code>5bc7e02</code></a> fix missing int32_t (<a href="https://redirect.github.com/protocolbuffers/protobuf/issues/12554">#12554</a>)</li>
<li><a href="a171d20df3"><code>a171d20</code></a> Merge pull request <a href="https://redirect.github.com/protocolbuffers/protobuf/issues/12845">#12845</a> from protocolbuffers/23.x-202305171614</li>
<li><a href="3cda141b4d"><code>3cda141</code></a> Updating version.json to: 23.2-dev</li>
<li>See full diff in <a href="https://github.com/protocolbuffers/protobuf/compare/v3.23.1...v3.23.2">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/4779
Reviewed By: antonk52
Differential Revision: D46355076
Pulled By: passy
fbshipit-source-id: 72e493ea24b11a00d5fec978489d78fc048bc9de
Summary:
Until now when we filter by a column value we only get the items that match this value exactly.
Release: we can add loose filters that match value or `undefined`
Reviewed By: lblasa, ivanmisuno
Differential Revision: D46318631
fbshipit-source-id: 94ecb3f074674d4b0ce3a480f4f3b9ddc058ceef
Summary:
^
Basically, update Jest and fix any raised issues. Mainly:
- Update necessary dependencies
- Update snapshots
- `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx`
- `mocked` -> `jest.mocked`
Changelog: Update Jest to v29.5.1
Reviewed By: antonk52
Differential Revision: D46319818
fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2
Summary: On my mac localhost resolves to an IP6 address by the new adb lib. This should fix it.
Reviewed By: LukeDefeo
Differential Revision: D46314612
fbshipit-source-id: 3771efd2c6b79fe9ae9851ce4aac35bcede28847
Summary:
It seems the available binary for macOS arm64 is not signed:
```
codesign -dv --verbose=4 ./node-v16.16.0-macos-arm64
./node-v16.16.0-macos-arm64: code object is not signed
```
This is an issue as it crashes for our flipper server releases.
This can be compared to a binary downloaded from the Node distribution page:
```
codesign -dv --verbose=4 ./node
Executable=/Users/realpassy/Downloads/node-v16.15.0-darwin-arm64/bin/node
Identifier=node
Format=Mach-O thin (arm64)
CodeDirectory v=20500 size=597360 flags=0x10000(runtime) hashes=18657+7 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=721152
Hash type=sha256 size=32
CandidateCDHash sha256=31cdf84cac42a622c1a68558376700a2dd12d40d
CandidateCDHashFull sha256=31cdf84cac42a622c1a68558376700a2dd12d40d81c5118f3b0e0370c414eb69
Hash choices=sha256
CMSDigest=31cdf84cac42a622c1a68558376700a2dd12d40d81c5118f3b0e0370c414eb69
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=56082432
Executable Segment flags=0x1
Page size=4096
Launch Constraints:
None
CDHash=31cdf84cac42a622c1a68558376700a2dd12d40d
Signature size=8986
Authority=Developer ID Application: Node.js Foundation (HX7739G8FX)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=26 Apr 2022 at 23:00:57
Info.plist=not bound
TeamIdentifier=HX7739G8FX
Runtime Version=11.1.0
Sealed Resources=none
Internal requirements count=1 size=164
```
For additional context:
Node binary by using pkg-fetch. We just get the binary from this release page: https://github.com/vercel/pkg-fetch/releases/tag/v3.4
The exact binary we're downloading is https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-macos-arm64
If you just download that via Chrome, it will trigger Gatekeeper and you need to manually click "Allow" in the system privacy settings. You can also do the same by just running:
xattr -c ./node-v16*
Afterwards you can:
chmod +x ./node*
It will crash in the same way that it does after our distribution.
Reviewed By: passy
Differential Revision: D46225503
fbshipit-source-id: f0ae2d5101b99c9db7fe80333573caef52c787a2
Summary: It is hard to pass auth token to Jest E2E tests.
Reviewed By: lblasa
Differential Revision: D46279204
fbshipit-source-id: ee0138c3bd014bafb416f7fa8951fb25b25b4067
Summary: It seems that adb path has changed on the jest-e2e side. That might case the flipper e2e test failure. With this fallback we have granular control of the path.
Reviewed By: antonk52
Differential Revision: D46278512
fbshipit-source-id: 97310459de54eeb003eefb3a3ff06af8b13bebae
Summary:
Need to answer:
- Certificate exchange success rate, fails and errors a day per OS and device type.
Reviewed By: antonk52
Differential Revision: D46221301
fbshipit-source-id: 03c6993aa15f56fdf98a7abd57d00b2af0e9ce1a
Summary: Same as previous diff but for plain socket.
Reviewed By: antonk52
Differential Revision: D46220933
fbshipit-source-id: 235ca860891b8514dd0d743d32fe85f15a2cdd7e