Commit Graph

8703 Commits

Author SHA1 Message Date
Pascal Hartig
7822099f50 Do not throw when a plugin is already added
Summary:
Causes a lot of errors that don't seem to be preventable from a plugin author's perspective and also completely benign.

https://www.internalfb.com/logview/flipper_javascript/3b754533c5da4e91fe8c0a3318cf8d5c?trace_tab=latest

Reviewed By: lblasa

Differential Revision: D48642974

fbshipit-source-id: 5ba542afbaa4175e1657d4b229d8bab62fac9862
2023-08-25 02:14:22 -07:00
Lorenzo Blasa
ef6e3df9df Remove the client from error log
Summary: Removing this information from the error as it will cause duplicated error tasks.

Reviewed By: passy

Differential Revision: D48646678

fbshipit-source-id: 26e5525318b4720568275a5086df00f21b7d2836
2023-08-24 10:05:17 -07:00
Lorenzo Blasa
ecc50f47e8 Clients to avoid sending payloads larger than the maximum allowed size
Summary: ^

Reviewed By: passy

Differential Revision: D48645400

fbshipit-source-id: ac262296f113298812803c12eccf5a37da1da2b7
2023-08-24 10:05:17 -07:00
Lorenzo Blasa
865d551f8e Increase max payload size
Summary: ^

Reviewed By: passy, antonk52

Differential Revision: D48644784

fbshipit-source-id: 2cd0aeed94c31553243e1b335adbd4089feb0d7e
2023-08-24 10:05:17 -07:00
Luke De Feo
a275235a7c ADd tracking for framework event debugging
Summary: ^

Reviewed By: lblasa

Differential Revision: D48645332

fbshipit-source-id: faf558c592b00a69586970edea407d8997a54699
2023-08-24 08:14:31 -07:00
Lorenzo Blasa
c0347ec830 Deep-link hooked to our protocol handler
Summary: This hooks the PWA deep-link to our existing deep-link url handler.

Reviewed By: antonk52

Differential Revision: D48598886

fbshipit-source-id: 8da9b7bc89bebdafc2bd4c0dc0bd7608864e0254
2023-08-24 07:25:01 -07:00
Lorenzo Blasa
aa327b1a46 Deep-link scaffolding
Summary:
This change adds the necessary scaffolding to enable deep-link for PWA.

1. Registers the protocol/scheme in the manifest.json
2. Add a skeleton handler that parses the received arguments

Notes for reviewers:

PWA cannot reuse the 'flipper://' scheme as is not allowed. PWA schemes are limited. The only extension point is 'web+...' which is the one that is used.

Reviewed By: antonk52

Differential Revision: D48562301

fbshipit-source-id: e191fcb1a6604d20a55c1acdadf6a8eb0194895b
2023-08-24 07:25:01 -07:00
Lorenzo Blasa
1360e906f8 Centralise sessionId to a dedicated place
Summary:
The sessionId is just uuid() which is held by the config. This changes moves that to a single place.

This achieves two goals:
1) Makes it very clear where is created and what value it holds
2) It allows us to know the sessionId even before the config is available. This becomes useful as we can start logging to Scribe earlier.

Reviewed By: passy

Differential Revision: D48601829

fbshipit-source-id: c54d86d76f0b58d2b59f8dd1c45d7f345c4a84c3
2023-08-24 06:18:39 -07:00
Lorenzo Blasa
6405a7bfdd Hook with FB logger
Summary:
This change replaces the existing logging infra with the one defined and exposed in flipper-server-core.

Functionality remains the same with the addition of having support for Scribe.

Reviewed By: aigoncharov

Differential Revision: D48515246

fbshipit-source-id: 7970f6ad069821ee4f15136adc8da40d0b1fb0c7
2023-08-24 06:18:39 -07:00
Lorenzo Blasa
87bf73f1d5 FBLogger for flipper-server-core
Summary: ^

Reviewed By: passy

Differential Revision: D48557327

fbshipit-source-id: 0112dec9a1a7f0afddcc459459a9278bbbeb3fc7
2023-08-24 06:18:39 -07:00
Pascal Hartig
15271ea911 Fix hyper-annoying importFile.worker.worker.js warning on startup
Summary:
Gets rid of

 {F1074904830}

See D48603710 for some more information.

This patches the bundle which includes the reference to silence the error.

Changelog: No longer show importFile.worker.worker.js warning on startup

Reviewed By: lblasa

Differential Revision: D48605129

fbshipit-source-id: 20dc292191742400c8c390a75b1e53f11630ad5a
2023-08-24 04:28:54 -07:00
Pascal Hartig
cac3436e01 Demote handled doctor check failures to warning
Summary:
- It's handled.
- It's already user-visible.
- It's usually timeouts which aren't actionable.

Reviewed By: lblasa

Differential Revision: D48642582

fbshipit-source-id: ccb3e56d4937bec2f9e887b7d62b98806140b2e8
2023-08-24 04:11:32 -07:00
Pascal Hartig
bb4090f529 Make intern headers configurable
Summary: The one-off hack for slog makes this hard to refactor, so I've added a headers field, putting the caller in charge of this.

Reviewed By: LukeDefeo

Differential Revision: D48564065

fbshipit-source-id: f8e78e9b8597fd3131bf3741197e6179807ad5da
2023-08-23 07:40:49 -07:00
Pascal Hartig
d484fb964c Add CPE X2P lookup support
Summary:
Basically a one-to-one conversion of https://www.internalfb.com/code/fbsource/[3171372e9b534c2ea0f318800cbd6de421e9d2d1]/fbcode/common/rust/cpe/src/

This is the information we need to connect to the local x2p daemon that allows us to talk to interngraph without vpn.

Reviewed By: lblasa

Differential Revision: D48562550

fbshipit-source-id: 8abff11f8ef76b16f6700eb89edabdb284306bb1
2023-08-23 07:40:49 -07:00
Lorenzo Blasa
c93a781247 ScribeMessage can now be used instead
Summary: As the type is now defined in flipper-common, it can be used.

Reviewed By: antonk52

Differential Revision: D48557043

fbshipit-source-id: 3838a189e431718cd1438d2dad5d7034d34bb93b
2023-08-23 07:15:29 -07:00
Lorenzo Blasa
cc28b5aea7 Use ScribeLogger from flipper-common
Summary: It removes the ScribeLogger found in flipper-ui-core and also updates its references to point to the type defined in flipper-common.

Reviewed By: passy

Differential Revision: D48556328

fbshipit-source-id: 525d9e8ee9a80f68aecb8b8b2e25ffd4714649bd
2023-08-23 07:15:29 -07:00
Luke De Feo
9ae632ba5c Bloks apply frame and then augment
Summary:
Given that we have to retry aggressively to fetch reduciton traces the blok augmentation can take a longer time. For cases like embedded bloks this can slow down the ui debugger even if you arent debuggin bloks. To avoid this we display the frame immediatley and then asynchronously augment it.

There is a possibility that you might see bloks bound tree nodes with no name briefly since this is this the state they come from the client as.

This isnt the ideal solution as the better way would be to do the unminification first and then add the derived components (which depends on reduction trace) after. This avoid this qurik but is a much bigger refactor so will do it another time if needed

Reviewed By: lblasa

Differential Revision: D48600897

fbshipit-source-id: 06fc5c5ecc6fe575f815d3ebca685f363275c84c
2023-08-23 07:09:04 -07:00
Luke De Feo
3fcb932f28 Add clear button and autoscroll to table
Reviewed By: lblasa

Differential Revision: D48600634

fbshipit-source-id: 4ccf82314e3ef3c7466e91e8c181f35ee264bc0a
2023-08-23 07:09:04 -07:00
Luke De Feo
c7ad98cba4 Explode framework payload attribute into data table columns
Reviewed By: antonk52

Differential Revision: D48562431

fbshipit-source-id: 869e39da41986ee61e6bbebecfb4b36119881c64
2023-08-23 01:51:31 -07:00
Luke De Feo
c6dddccd87 focus visualiser node when selecting in table view
Summary: Use the visualiser as a reference for the event table

Reviewed By: antonk52

Differential Revision: D48562105

fbshipit-source-id: 8707efdcb0631e9716dd0a06e01518480ca2edc1
2023-08-23 01:51:31 -07:00
Luke De Feo
7d9744b8ff Improve framework event filtering
Summary: Now when entering framework event table from a tree root we filter that so you can see all tree events. Also we use exact matches to avoid and nasty substring bugs

Reviewed By: lblasa

Differential Revision: D48560169

fbshipit-source-id: 1df375a2b8c5035003d82c210b55adebda8bd4ec
2023-08-23 01:51:31 -07:00
Luke De Feo
206ef79cf9 Improve table view
Summary:
added component name, root component name, duration, event type and better names

changelog: UIDebugger - added event debugger table view and side panel views

Reviewed By: lblasa

Differential Revision: D48559367

fbshipit-source-id: d357ecf654b4e443eac7673731a8be542e76dd48
2023-08-23 01:51:31 -07:00
github-actions[bot]
5f9000aa82 Automated: Update Podfile.lock (#5054)
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/5054

Reviewed By: ivanmisuno

Differential Revision: D48559248

Pulled By: passy

fbshipit-source-id: 8dc0741c63c43ed177769ce9e9bac46f40f3728a
2023-08-22 07:21:25 -07:00
Lorenzo Blasa
e7b6882ef2 ScribeLogger moved to common
Summary: There's nothing specific nor private about the ScribeLogger, so it is moved to flipper-common.

Reviewed By: LukeDefeo

Differential Revision: D48556074

fbshipit-source-id: aa9446036fd07fe6e6debc5a978a42308fc93fe0
2023-08-22 06:03:26 -07:00
Lorenzo Blasa
b69358f6a2 Remove the previous misplaced log tailer
Summary: The log tailer is already defined in flipper-common, use that instead.

Reviewed By: passy

Differential Revision: D48524909

fbshipit-source-id: 1c0674276f08893ea80dc2fc9f8b45679f33e93e
2023-08-22 05:16:20 -07:00
Lorenzo Blasa
64a4b3a899 Log tailer moved to flipper-common
Summary: Log tailer is/could/will be used in different places, move to a centralised place.

Reviewed By: antonk52

Differential Revision: D48524579

fbshipit-source-id: 81d6c4670572284ba2821a93011f5daa133b21fa
2023-08-22 05:16:20 -07:00
Lorenzo Blasa
17cfa0e571 Session Id moved to server config
Summary:
Session Id should be shared between client and server, but it was defined deep in the client (redux store).

The proposed solution presented below is to move the session id to the server configuration. By doing this, it becomes available to both server and client VERY early in the application life-cycle for both Electron and non-Electron builds.

Reviewed By: LukeDefeo

Differential Revision: D48520367

fbshipit-source-id: ca959b27ab18b1a2e4cd2fac1d28545664f1b514
2023-08-22 05:16:20 -07:00
Lorenzo Blasa
82e9277e64 AbstractClient load plugins log
Summary: The existing log message was quite verbose without really adding any value. Make it simpler by stripping out the client query.

Reviewed By: passy

Differential Revision: D48518212

fbshipit-source-id: f50d7a1ca8f9f6b440451022d60cf0f309c89634
2023-08-22 05:16:20 -07:00
generatedunixname89002005325672
c161e869d3 Daily arc lint --take KTFMT
Reviewed By: ivanmurashko

Differential Revision: D48553786

fbshipit-source-id: 269d46620ad34bd94a4df0d04ef3dfa5afbab613
2023-08-22 02:53:13 -07:00
Fúlvio Abrahão de Paula
4cf63cee71 Create IGSQLiteDatabaseDriver and integrate it with instamadillo e2ee flow.
Summary: IGSQLiteDatabaseDriver implements the DatabaseDriver protocol that is required to flipper send requests from desktop app to the client.

Differential Revision: D48172578

fbshipit-source-id: 09ac9415dd1b98c347984228def617f27d2e1aa0
2023-08-21 08:15:11 -07:00
Fúlvio Abrahão de Paula
7210c8944b Implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' error + Add missing import.
Summary:
This diff fixes this compilation error that appear in the next diff (in case I don't fix it before).

```
Action failed: fbsource//xplat/sonar/iOS/Plugins/FlipperKitDatabasesPlugin:FlipperKitDatabasesPlugin (cxx_compile FlipperKitDatabasesPlugin/DatabasesManager.m (pic))
Local command returned non-zero exit code 1
Reproduce locally: `env -- "BUCK_SCRATCH_PATH=buck-out/v2/tmp/fbsource/4f538045b2fada5e/xplat/sonar/iOS/Plugins/FlipperK ...<omitted>... erKitDatabasesPlugin__/__dep_files_intermediaries__/FlipperKitDatabasesPlugin/DatabasesManager.m.pic (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
xplat/sonar/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabasesManager.m:121:57: error: implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Werror,-Wnullable-to-nonnull-conversion]
                                stringByAppendingString:exception.reason]];
                                                        ^
xplat/sonar/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabasesManager.m:157:57: error: implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Werror,-Wnullable-to-nonnull-conversion]
                                stringByAppendingString:exception.reason]];
                                                        ^
xplat/sonar/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabasesManager.m:191:57: error: implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Werror,-Wnullable-to-nonnull-conversion]
                                stringByAppendingString:exception.reason]];
                                                        ^
3 errors generated.
```

Differential Revision: D48438432

fbshipit-source-id: acba91ec8e4fdab2c09a1e98387c203aa0d49489
2023-08-21 08:15:11 -07:00
Pascal Hartig
bf6afe329f Fix electron build on arm64
Summary:
Electron-builder puts its results in a different directory, based on the architecture you build on.

While we don't have plans to release an arm64 build internally, we still need to support local builds for testing.

Without this, it fails with a rather confusing error message:

```
Script termnated. Error: spawn zip ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn zip',
  path: 'zip',
  spawnargs: [ '-qyr9', '../Flipper-mac.zip', 'Flipper.app' ]
```

Reviewed By: lblasa

Differential Revision: D48517426

fbshipit-source-id: 21a133f8fce3aee0737ce5cbccc7a692a613b98e
2023-08-21 06:36:37 -07:00
Luke De Feo
3ff0c301c8 Use exact mode when user explicitly filters on a column
Summary: Using substring doesnt make sense for these actions. As you say I want to filer on this cell but it includes many others

Reviewed By: aigoncharov

Differential Revision: D48515476

fbshipit-source-id: b7a77c022052bb33e2ce2a3f656dabab114d8a78
2023-08-21 05:59:44 -07:00
Luke De Feo
4cc03ef4b2 Add litho framework events
Summary: Leverages the new connection listener inside the ui debugger to send framework events out of the Litho debug api and to the UIDebugger

Reviewed By: adityasharat

Differential Revision: D48350647

fbshipit-source-id: 2af48578b70bc50da43712f244f2bd208ad40988
2023-08-21 05:48:23 -07:00
Luke De Feo
03ba22451d Dont show filter if nothing to filter
Reviewed By: lblasa

Differential Revision: D48471138

fbshipit-source-id: c86d2542b7dc98e323fdde9ae8cc687bd10dfb3a
2023-08-21 04:24:16 -07:00
Luke De Feo
22d1bc2552 Allow exploring all events in table view
Summary: This lets you debug when events go off screen

Reviewed By: lblasa

Differential Revision: D48395787

fbshipit-source-id: 51a6eb74fa0f61c34f25e86a6ee40bf5969379ee
2023-08-21 04:24:16 -07:00
Luke De Feo
1bffe8bc6b Improve framework event filters
Reviewed By: lblasa

Differential Revision: D48393422

fbshipit-source-id: 18d92b53bd56c100b6d4bb6adc07ede0b4a46732
2023-08-21 04:24:16 -07:00
Luke De Feo
756a289883 Add button to get to table mode from node level stream
Reviewed By: lblasa

Differential Revision: D48348325

fbshipit-source-id: f54815226dc230aa2d3c2bafdae8edfa829bf3fe
2023-08-21 04:24:16 -07:00
Luke De Feo
4918d21df8 Show framework event metadata documentation in detail view and tree select
Reviewed By: lblasa

Differential Revision: D48348090

fbshipit-source-id: e48547508b78178b278f72ce72fc579c9f015570
2023-08-21 04:24:16 -07:00
Luke De Feo
f5bc03c263 Add framework event node level event filtering
Summary: Lets you filter a nodes events by thread or type

Reviewed By: lblasa

Differential Revision: D48346955

fbshipit-source-id: 455d65ad21c54c5ad26782ac6a446f7ae15a4356
2023-08-21 04:24:16 -07:00
Luke De Feo
3cd6079c24 Change framework event seperator to .
Summary: Its easier this way since this is how they come out of android internally, also a bit nicer to display the full string this way

Reviewed By: lblasa

Differential Revision: D48346954

fbshipit-source-id: 997dd3922159683fcdf4b5f5f288702a5d998dc4
2023-08-21 04:24:16 -07:00
Luke De Feo
7b6aff245a Extract framework event tree select
Summary: we will reuse this

Reviewed By: lblasa

Differential Revision: D48318965

fbshipit-source-id: a5d04481a02e18a2d709f79524aa7449a5b87844
2023-08-21 04:24:16 -07:00
Luke De Feo
d5814ea17c Use bottom panel as detail view for framework events
Summary: Now when you click on an event the bottom bar appears automatically showing you every thing you need

Reviewed By: lblasa

Differential Revision: D48318694

fbshipit-source-id: 6505e439d949941dc0e091b9576d7d1321d8a05f
2023-08-21 04:24:16 -07:00
Luke De Feo
6f6b953c62 Fix warning
Summary: This was complaining about mixing shorthand  and separete css attributes. Just use separate since its clearer

Reviewed By: passy

Differential Revision: D48315864

fbshipit-source-id: e73e76d7fb94b3d7bba36a34d408202bc91933be
2023-08-21 04:24:16 -07:00
Luke De Feo
4912b3f47e Fix bottom panel and make it resizable
Summary: The bottom panel got broken during the virtualisation+ panel refactor, we need to tell the tree how much height is taken by the panel so it can size itself accordingly.

Reviewed By: lblasa

Differential Revision: D48313766

fbshipit-source-id: 849886101eb0869cc068fd0ad6dc1d053233043e
2023-08-21 04:24:16 -07:00
Luke De Feo
2d217575bb improve marker timeline
Summary:
1. removed background hover
2. made can select actually work
3. disable user selection
4. remove decimal points from ms

Reviewed By: lblasa

Differential Revision: D48270181

fbshipit-source-id: 724efedb5cad7f93c80ed5dd7f49efe4c434c324
2023-08-21 04:24:16 -07:00
Luke De Feo
94114eb821 Add tree id
Summary:
Added new tree id to the framework event. Its currently optional.

The tree id is the parent component tree / tree manager this tree belongs to, this is so we can view all tree events at once in the table.

We ony show the context menu item when we have the tree root tag which is set for component tree only at this point. We can add for blok and ios later

Reviewed By: lblasa

Differential Revision: D48268120

fbshipit-source-id: 3dee06309b146a0392ca32fbb5e8231883b8439a
2023-08-21 04:24:16 -07:00
Pascal Hartig
7dad33a626 Fix keytar types
Summary: The linter otherwise wants us to remove `awaits` which are in fact required.

Reviewed By: lblasa

Differential Revision: D48467534

fbshipit-source-id: 355aee4bc22098086600b85edf58c8ed077b8aaf
2023-08-21 04:00:56 -07:00
Pascal Hartig
f6fcc1635f Silence background plugin timeout
Summary:
This isn't actionable and can't be deduplicated due to the device identifier.

Changelog: Don't report errors related to timeouts of background plugins

Reviewed By: lblasa

Differential Revision: D48467028

fbshipit-source-id: 94f32848962d8d3e3b1998a88f6f30a6cf86c4f6
2023-08-21 04:00:56 -07:00
Pascal Hartig
160b05a5bd Bump deps
Summary:
This updates minor and patch level dependencies. Frustratingly, I had to revert a bunch
of changes in that version range that still caused incompatibilities and test failures.

If I find time, I'll dig a bit deeper.

Reviewed By: ivanmisuno

Differential Revision: D48433210

fbshipit-source-id: 9ab12e774c1992d4f22cc1428d34f102ce820b75
2023-08-21 03:03:30 -07:00