Commit Graph

7751 Commits

Author SHA1 Message Date
Flipper Bot
03121ca8b3 Flipper Snapshot Bump: v0.164.1-SNAPSHOT
Summary: Releasing snapshot version 0.164.1-SNAPSHOT

Reviewed By: aigoncharov

Differential Revision: D39431773

fbshipit-source-id: 51cf82f1110906979861e35188d2d9b4cd87a02d
2022-09-12 09:11:16 -07:00
Flipper Bot
a941652a43 Flipper Release: v0.164.0
Summary: Releasing version 0.164.0

Reviewed By: aigoncharov

Differential Revision: D39431774

fbshipit-source-id: 17c616386d00460e7b65cc88403bb6dbbc882853
2022-09-12 09:11:16 -07:00
Lorenzo Blasa
d999f68f62 Remove warnings
Summary: Addresses a few warnings raised

Reviewed By: LukeDefeo

Differential Revision: D39430004

fbshipit-source-id: 877698e8515f08a5cb38b414689615c1b6e4b6cc
2022-09-12 08:17:39 -07:00
Andrey Goncharov
69812d543e Do not disconnect dummy devices
Summary: Do not remove dummy devices as they are created during WWW cert exchange and are not picked up by IDB

Reviewed By: lblasa

Differential Revision: D39430458

fbshipit-source-id: 249efda23f324522ae2ae3a0ee4f198ab701d22d
2022-09-12 07:37:21 -07:00
Lorenzo Blasa
ed40e16ac9 Addresses a few issues with the Stetho fragment utilities
Summary:
There is a bug in the code to get fragments from the activity.

A boolean, result from the comparison, was added to the list instead of the actual fragments.

Reviewed By: LukeDefeo

Differential Revision: D39348019

fbshipit-source-id: 669f304055f15f59b40352d86f25d768d92df76e
2022-09-12 04:20:01 -07:00
Luke De Feo
4436128d07 Descriptor clean up
Summary:
Now that we have the tree observer we can make descriptors completely about describing an object. To that end we have removed init method and made them all object to indicate to future readers their singleton nature.

onGetActive child was made open instead of abstract to avoid needed to override in all subclasses

Reviewed By: lblasa

Differential Revision: D39387935

fbshipit-source-id: 802b8afdd9aa639daecf10d774ca5b960ee48003
2022-09-12 03:48:43 -07:00
Luke De Feo
9a270cdc7a Tree observer
Summary:
Added concept of a tree observer which is responsible for listening to the changes for a portion of the UI tree. This structure nests so Tree observers can hold child tree observers which emit events on a different cadence. This structure should allow us to incorporate different UI frameworks down the road as well as native android views.

We push the tree updates from the tree observers onto a channel and setup a coroutine to consume this channel, serialize and send down the wire.

Reviewed By: lblasa

Differential Revision: D39276681

fbshipit-source-id: a4bc23b3578a8a10b57dd11fe88b273e1ce09ad8
2022-09-12 03:48:43 -07:00
Luke De Feo
c76c993ce4 Introduced concept of active child
Summary: A node can have an active child, if present we assume all others are inactive and we don't traverse them. This means the activities not on top and view pager views not active will not be scanned. Additionally on the desktop we are automatically collapsing these views. The net result is a lot less work done on the main thread

Reviewed By: lblasa

Differential Revision: D39310126

fbshipit-source-id: ebd0c69d46f2d42fe42e678c8327fcdc73d08385
2022-09-12 03:48:43 -07:00
Andrey Goncharov
a9fe381076 Add more detailed errors for assertConnected
Differential Revision: D39383946

fbshipit-source-id: e11a29c77c5abe7f3fee5e979c596efd31ef4ec2
2022-09-09 06:30:04 -07:00
Anton Kastritskiy
d2ce30942f add missing close code block backticks
Reviewed By: jknoxville

Differential Revision: D39355460

fbshipit-source-id: 5eee036cde24738f0352cc5bd0f8ef22463427dd
2022-09-08 17:10:27 -07:00
Lorenzo Blasa
8070d31d87 Edit react-native-android.mdx using inpage editor
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: antonk52

Differential Revision: D39345371

fbshipit-source-id: c6d42685d3ecf2d898094c3a688f7c754f318963
2022-09-08 08:59:29 -07:00
Flipper Bot
acc2cac730 Flipper Snapshot Bump: v0.163.1-SNAPSHOT
Summary: Releasing snapshot version 0.163.1-SNAPSHOT

Reviewed By: aigoncharov

Differential Revision: D39303681

fbshipit-source-id: 335603f78ef21cc04ee3568f46c0a13a5febc698
2022-09-08 08:03:07 -07:00
Flipper Bot
926ba9608e Flipper Release: v0.163.0
Summary: Releasing version 0.163.0

Reviewed By: aigoncharov

Differential Revision: D39303682

fbshipit-source-id: fa6bd8a1cb08c0f45803d027632d7432e64680e2
2022-09-08 08:03:07 -07:00
Anton Kastritskiy
2fb90369f1 automatic update for docusaurus-plugin-internaldocs-fb@1.0.0,@docusaurus/core@2.1.0,@docusaurus/plugin-client-redirects@2.1.0,@docusaurus/preset-classic@2.1.0
Differential Revision: D39310992

fbshipit-source-id: 18dd5e935f76fa99d4a4b377b9f5c5ac271c2e52
2022-09-08 06:56:06 -07:00
Maykon Michel Palma
73b6f93f90 fix!: dependency.platforms.ios.project is not allowed on RN 0.69 (#3860)
Summary:
BREAKING CHANGE: it won't work with react-native CLI 4.2.2 as it will search for an xcode project

Fixes https://github.com/facebook/flipper/issues/3859

## Changelog

fix: dependency.platforms.ios.project is not allowed on RN 0.69

Pull Request resolved: https://github.com/facebook/flipper/pull/3860

Test Plan:
I don't know how to test my branch directly, but I did a simple change that can easily be tested with this method:

Start a fresh `react-native` 0.69 project:
```
npx react-native init flipperBugTest
```

Then install `react-native-flipper` package:
```
yarn add -D react-native-flipper
```

Navigate to `flipperBugTest/node_modules/react-native-flipper` and delete `react-native.config.js` file.

And start `react-native` metro:
```
react-native start
```

Reviewed By: antonk52

Differential Revision: D39345618

Pulled By: lblasa

fbshipit-source-id: 2cc74e2dd7100aab693c8e66f01d5b4ced402dd3
2022-09-08 04:31:13 -07:00
Joshua May
13afb8b802 Use supplied path when installing plugin from NPM to prevent escaping issues (#3825)
Summary:
Resolves https://github.com/facebook/flipper/issues/3819

This PR fixes Flipper's plugin installation, so that scoped plugins (with `/` in the name) can be successfully installed (+removed).

In more detail, Flipper's function [`installPluginFromNpm()`](69bac4a3d6/desktop/plugin-lib/src/pluginInstaller.tsx (L99-L114)) relies on the `live-plugin-manager` package to handle the NPM package to a temporary directory.

Before this patch, Flipper would assume the name of the directory (incorrectly). This patch simply uses the directory as provided by `live-plugin-manager`'s result.

If we use `shopify/flipper-plugin-react-native-performance` as a concrete example after this patch:

- `installPluginFromNpm()` is called to install `shopify/flipper-plugin-react-native-performance`
- `plugManNoDep.install()` installs the plugin to `/path/to/tmp/shopify/flipper-plugin-react-native-performance`
  - note: before this patch, it would have been assumed to be installed to: `/path/to/tmp/shopify__flipper-plugin-react-native-performance` which does not exist
- `installPluginFromTempDir()` is called to install the package to `~/.flipper/installed-plugins/shopify__flipper-plugin-react-native-performance/{version}` (where `{version}` is the current version, i.e. `1.0.0`)

Once the plugin is in `~/.flipper/installed-plugins/`, the escaping is correctly applied consistently by Flipper, and there are no further issues managing/using the plugin.

## Changelog

Fixed errors when installing scoped NPM plugins

Pull Request resolved: https://github.com/facebook/flipper/pull/3825

Test Plan:
Ideally we'd have some unit tests, but mocking out the NPM fetching in `live-plugin-manager` seems like a bunch of work. If you have some shortcuts, let me know, because this would be useful to test across platforms.

But in the meantime, we can easily manually test this.

### Reproduce the failure

First, let's reproduce the failure:

- run Flipper 0.150.0 (or `yarn start` on master, etc)
- open plugin marketplace, attempt to install scoped plugins
- installation will fail (with ⚠️ icon)
<img width="1541" alt="Screen Shot 2022-06-20 at 1 18 21 pm" src="https://user-images.githubusercontent.com/33126/174590735-ed25d192-a661-4333-af08-e494678b9fbb.png">
- logs will show a failure to read `package.json`
<img width="1175" alt="Screen Shot 2022-06-20 at 1 18 39 pm" src="https://user-images.githubusercontent.com/33126/174590824-339ba7ef-dcde-42b6-90ac-b99424845c3e.png">

### Demonstrate success

- run Flipper from this branch (via `yarn start`)
- open plugin marketplace, attempt to install scoped plugins
- installation will succeed, with notification to restart Flipper
<img width="1541" alt="image" src="https://user-images.githubusercontent.com/33126/174591112-880f55bf-0439-457c-a199-4bab0b3f193f.png">
- (package can also be successfully used/upgraded/uninstalled)

Reviewed By: lawrencelomax

Differential Revision: D39345564

Pulled By: lblasa

fbshipit-source-id: 729d70a29c7941e59ac03bb21061fc1d2bc8d998
2022-09-08 04:27:00 -07:00
Lorenzo Blasa
6fcaaabb17 Remove unused observer
Summary:
^

This was replaced by `ApplicationRef`

Reviewed By: antonk52

Differential Revision: D39313539

fbshipit-source-id: ad9b5c3ed963046ba0349fd5112bb9cb5de7640b
2022-09-08 04:26:41 -07:00
Jeferson S. Brito
2b927b4e72 fix: 404 docs links in app inspect (#4042)
Summary:
Currently, the `app inspect` tooltip at the left rail has a link to the getting started page that doesn't exist.
New path is `/docs/getting-started/`.

Also fix troubleshooting guide and no devices are found to `/docs/getting-started/troubleshooting/`

Pull Request resolved: https://github.com/facebook/flipper/pull/4042

Reviewed By: lawrencelomax

Differential Revision: D39314971

Pulled By: lblasa

fbshipit-source-id: 000b354b60bd05211b99134b63d790bf6949060f
2022-09-08 03:45:47 -07:00
Matt Hamil
eb98a042b7 docs: fix broken header in callout block on Getting Started page (#4044)
Summary:
Changes the callout block header to separate the icon from the header of the callout.

The "information" callout at https://fbflipper.com/docs/getting-started/ displays the info icon and "RMATION".

![image](https://user-images.githubusercontent.com/11802078/187704594-2d9553b1-b754-48b9-b55d-7d64b2fd20ee.png)

## Changelog

Fixed broken header in a callout block in the getting started docs page

Pull Request resolved: https://github.com/facebook/flipper/pull/4044

Test Plan:
Build the docs and open `/docs/getting-started/`

**Static Docs Preview: flipper**
|[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D39314921/V4/flipper/)|

|**Modified Pages**|
|[docs/getting-started](https://our.intern.facebook.com/intern/staticdocs/eph/D39314921/V4/flipper/docs/getting-started/)|

Reviewed By: lawrencelomax

Differential Revision: D39314921

Pulled By: lblasa

fbshipit-source-id: 0d7edc28e5457e0f68e93e871b3518711d35ccc1
2022-09-08 03:35:01 -07:00
Lorenzo Blasa
ccec5a6abe Add a very simple attributes inspector
Summary: Add a very simple attributes inspector

Reviewed By: LukeDefeo

Differential Revision: D39306728

fbshipit-source-id: 0e46b3efc617253d0b3006e81a46f00fdf8e8457
2022-09-07 06:46:41 -07:00
Luke De Feo
2fc1ff9f9c Added increment activity
Summary: Added simple activity to test how flipper reacts to changes in native UI

Reviewed By: passy

Differential Revision: D38704012

fbshipit-source-id: 8a593577322922c6f6f0f96dd5cb0761c3035389
2022-09-07 04:37:17 -07:00
Luke De Feo
0426966b14 Additional test activities
Summary: Some activities for testing the UI debugger

Reviewed By: lblasa

Differential Revision: D39208140

fbshipit-source-id: a6fcc1f082df5dc61f72019f92a6307d0e90176e
2022-09-07 04:37:17 -07:00
Luke De Feo
41068d1c90 Native UI scan
Summary: Added scheduler to scan the Native UI every 500 ms to test, Also added instrumentation in a separate event with the timings of each stage visualised in a Data table on desktop which can be accessed with ctrl+I. Currently this instrumentation event is sent every time but it could be a config option controlled from the desktop in the future

Reviewed By: lblasa

Differential Revision: D39205313

fbshipit-source-id: ca034171db6b062396b4ef28028aaa663c4d852a
2022-09-07 04:37:17 -07:00
Luke De Feo
a5da6923eb Flatten layout during traversal
Summary: Move from a nested structure to a flatten one for data exchange, this will allow us to only send sections of the UI in the future

Reviewed By: lblasa

Differential Revision: D38982138

fbshipit-source-id: d578a07a6d2d7e117fbd741bd6e33062223ce10d
2022-09-07 04:37:17 -07:00
Luke De Feo
55b852f90c Basic tree UI
Summary: A very basic tree in Antd to visualise the UI

Reviewed By: lblasa

Differential Revision: D38977035

fbshipit-source-id: f9bbf765ea8027eeb263cad86407502c6a5779dd
2022-09-07 04:37:17 -07:00
Luke De Feo
f123e65e8f Added strongly typed tree for sidebar inspector
Summary:
Introduced a JSON like tree structure for the sidebar insepector. Descriptors can provide their data as well as  if its mutable or not.

Enum mapping was simplified

Reviewed By: lblasa

Differential Revision: D38947238

fbshipit-source-id: cd8a6a8a752c5f626582ab8ac5efae6e9ff6a2ad
2022-09-07 04:37:17 -07:00
Lorenzo Blasa
c69e737f19 README update
Summary: Add instructions for building and running our RNW sample application.

Reviewed By: antonk52

Differential Revision: D39305056

fbshipit-source-id: 2adb41d713381c1b79ea5fe55a4f8a40d43e7f4c
2022-09-07 03:53:50 -07:00
Lorenzo Blasa
8fb7c503b8 Add CI workflow (#4054)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4054

Build RNW example on Github

Reviewed By: aigoncharov

Differential Revision: D39257309

fbshipit-source-id: dda414c025bfe6720449fe6c3d81fe9fb9373b2a
2022-09-07 02:21:58 -07:00
Andrey Goncharov
9c7a53fd05 Fix iOS crash parsing
Reviewed By: lawrencelomax

Differential Revision: D39058673

fbshipit-source-id: 64065c6d7e9fa96e827419bd6cffbceccc110d89
2022-09-05 07:46:02 -07:00
Luke De Feo
c854d0a2bb Added kotlin serialization
Summary: ^

Reviewed By: lblasa

Differential Revision: D38976576

fbshipit-source-id: 32022c263a0c81e6e99478375592ef1be9fea1cf
2022-09-05 05:36:23 -07:00
Lorenzo Blasa
2d4ca7003e Fixes RN iOS (#4053)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4053

Update usage of RN `RCTBundleURLProvider` `jsBundleURLForBundleRoot` API.

The previous signature was removed in the current used RN version.

Reference:
https://github.com/facebook/react-native/blob/main/React/Base/RCTBundleURLProvider.h

Reviewed By: aigoncharov

Differential Revision: D39256797

fbshipit-source-id: 2074698597f691f46f6ffd2f6b569e7742d5fffc
2022-09-05 04:25:50 -07:00
Lorenzo Blasa
23ed745105 Update Java version in Github workflow (#4052)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4052

Update to use Java 11 instead of 1.8.

Aim is to bring parity with the other existing workflows but more importantly fix the build as is broken at the moment.

Reviewed By: antonk52

Differential Revision: D39254936

fbshipit-source-id: c60332a288d9a671df5db0180fb501ddf185a075
2022-09-05 03:54:17 -07:00
Lorenzo Blasa
6a9d54f93a Plugin and Module implementations
Summary:
Last diff in the the RNW saga.

This change creates the necessary bridgings between the module and the plugin.

With this in place, JS plugins can be written and used. Also, we have a fully functional RNW sample app.

Reviewed By: aigoncharov

Differential Revision: D39087480

fbshipit-source-id: f4fde404716aa619a64553ffa556d060f49c0ac7
2022-09-04 12:19:26 -07:00
Lorenzo Blasa
322a1ba6b1 Initialise Flipper on module initialisation
Summary:
^

This diff brings most things together and can be considered the test platform for RNW.

With this, Flipper client gets initialised and started.

This means the application connects and is ready for debugging.

Reviewed By: antonk52

Differential Revision: D39054912

fbshipit-source-id: 94397f6a72b1e9d9c0f2f3efaf9967be525076cd
2022-09-04 12:19:26 -07:00
Lorenzo Blasa
69df1ee362 Device Info
Summary: Utility class to obtain device information.

Reviewed By: antonk52

Differential Revision: D39054479

fbshipit-source-id: 9e237e2a45cf46ceb5fb8fd8a9da5d87837e61b6
2022-09-04 12:19:26 -07:00
Lorenzo Blasa
446bb042d0 React Socket
Summary: React ws implementations

Reviewed By: antonk52

Differential Revision: D39053839

fbshipit-source-id: 7e68770c7bc4e0a0307679713a8b210bba2bbd0b
2022-09-04 12:19:26 -07:00
Lorenzo Blasa
c2440b6660 WIN32 support for path concatenation
Summary:
So far, Flipper has concatenated paths assuming is only ever built on unix-like systems.

For RNW, this approach fails.

This change is a very simple way of achieving WIN32 support without using any extra libraries or routines for path building.

Reviewed By: antonk52

Differential Revision: D39053479

fbshipit-source-id: e8b4b71cc1d17ca6aba88d40cad7d96a30ad1267
2022-09-04 12:19:26 -07:00
Lorenzo Blasa
82c06ac280 React Scheduler
Summary: Introduces a Scheduler implementation using ReactDispatcher. The scheduler is/will be used by the FlipperConnectionManager as to serialise socket operations in it.

Reviewed By: antonk52

Differential Revision: D39053301

fbshipit-source-id: 5bc2d68a753ec4be3e28533b4c29e2d6ff6d8ba0
2022-09-04 08:02:21 -07:00
Yizhe Chen
09e81b19ad fix strict mode exemption to allow disk write as well
Summary: Filpper is doing disk IO on UI thread which actually produce `DiskWriteViolation` (presumably when the directory is not there, it will write to create)

Differential Revision: D39196484

fbshipit-source-id: f6b15785ea6ecf3ea5b41211908c14eac3d1309e
2022-09-01 17:39:49 -07:00
Deborah Attuah
95af1428ce automatic update for docusaurus-plugin-internaldocs-fb@0.12.3
Reviewed By: antonk52

Differential Revision: D39169091

fbshipit-source-id: 249c5f092c1b0f8e0d6f303e6ac96cdee019ecfa
2022-08-31 07:59:11 -07:00
Lorenzo Blasa
4b8be189ba rnw] ReactNativeFlipperExample
Summary:
This change is the direct results of doing the following:

    npx react-native-windows-init --overwrite

Notes: ignore the format warnings below. In this case, the ordering of includes does matter. Missing license is for auto-generated files, so ignore too.

Reviewed By: aigoncharov

Differential Revision: D36775215

fbshipit-source-id: 1cd00ff2bfc258c8505e97dcdbd9cb4365c4acfb
2022-08-26 08:43:30 -07:00
facebook-flipper-bot
25f40605a8 Automated: Update Podfile.lock (#4025)
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/4025

Reviewed By: lblasa

Differential Revision: D38979176

Pulled By: cekkaewnumchai

fbshipit-source-id: d455bbdb5390340cd2b310d9be5045b088dbb994
2022-08-25 02:39:27 -07:00
Lorenzo Blasa
dab510c546 Fix starting screen captures
Summary:
Starting a screencapture longer than 30 seconds would timeout as the start command waits for the process to finish. Removed that wait is it is the stop command that should only wait for the finish.

(n.b. please ship after accepting, as I'm on PTO)

Reviewed By: LukeDefeo

Differential Revision: D38918570

fbshipit-source-id: fd93e1239985c81a2143ceb79312518e7ebb27f5
2022-08-25 02:18:40 -07:00
Lorenzo Blasa
947d00c6c3 Fix send raw messages
Summary:
^

The last change removed the overload of `send` in favour of `sendRaw`

Reviewed By: LukeDefeo

Differential Revision: D38946386

fbshipit-source-id: c4491c4afe4d719602c99878dc7185d436179aef
2022-08-24 11:17:21 -07:00
Lorenzo Blasa
1b2f875cc6 Scheduler
Summary:
Add a simple scheduler which operates in the following way.

There are two type of tasks: main, background.

The main task will run on the main thread whilst the background task will run on a background thread.

The main task will be executing at a fixed internal whereas the background task will get queued on demand but can effectively consume what was produced by the main task at its own rate.

Reviewed By: LukeDefeo

Differential Revision: D38975283

fbshipit-source-id: 0633385d2938705a16f5fc75a28cad067e4a8e55
2022-08-24 09:03:39 -07:00
Flipper Bot
2e33febcde Flipper Snapshot Bump: v0.162.1-SNAPSHOT
Summary: Releasing snapshot version 0.162.1-SNAPSHOT

Reviewed By: cekkaewnumchai

Differential Revision: D38973667

fbshipit-source-id: 845578ae7c00d74e0669723b7856274bb7214ea8
2022-08-24 03:55:15 -07:00
Flipper Bot
3734225dd7 Flipper Release: v0.162.0
Summary: Releasing version 0.162.0

Reviewed By: cekkaewnumchai

Differential Revision: D38973666

fbshipit-source-id: cb17fe83c805a1c4fbef69bf035f4437516665d0
2022-08-24 03:55:15 -07:00
Andrey Goncharov
5515b27499 Fix importing large Flipper exports
Reviewed By: lblasa

Differential Revision: D38945105

fbshipit-source-id: ba78ccfc82b65013b79c6c962de7bdef5ae41a60
2022-08-23 09:46:29 -07:00
Andrey Goncharov
9b58f5217e Catch crash file parsing errors
Reviewed By: passy

Differential Revision: D38940908

fbshipit-source-id: 59f0669311093a4a9c24f570d7e63de0a51f9376
2022-08-23 08:55:25 -07:00
Lorenzo Blasa
5aff69d1c9 traversal
Summary: This adds a simple traversal to the UI. As it stands, it will most likely be updated in future iterations.

Reviewed By: LukeDefeo

Differential Revision: D38907292

fbshipit-source-id: 98cea1f971a4ef37ba2d1c75b882dd44df29bb3a
2022-08-23 05:45:29 -07:00