Commit Graph

912 Commits

Author SHA1 Message Date
Pascal Hartig
19485d076b Flipper Release: v0.12.0
Summary:
- Docs for UI components are now automatically published: https://fbflipper.com/docs/ui-components.html
- Stop caching source files in dev mode: ad98ba3235
- `createTablePlugin` now uses persisted State: db42e8e970
- HTML in network responses now gets formatted: a56d7d5d72
- Notification filters are persisted between sessions: 9fb3a56303
- Prevent Flipper SDK crashes from bringing down Android apps: ddbb3c7f89
- Fix Android devices from not showing up: a6765deec6

Full commit log since the last release available here: https://github.com/facebook/flipper/compare/v0.11.1...v0.12.0

Reviewed By: jknoxville

Differential Revision: D13153344

fbshipit-source-id: e67e2ac9469b2a5ef58d1963a38b1c8f448bd4fb
2018-11-23 16:58:39 -08:00
Pascal Hartig
572881ba81 Bump Litho version
Summary: This unblocks the release.

Reviewed By: jknoxville

Differential Revision: D13176805

fbshipit-source-id: eaf8890ac16054efe837a81665b323de3db7d085
2018-11-23 07:49:58 -08:00
Pascal Hartig
25c6323b9e Move last plugin to plugin dsl
Summary:
Last one that's available through the DSL. The Android
plugin still isn't.

Reviewed By: jknoxville

Differential Revision: D13176791

fbshipit-source-id: 6684812bb4fee1dcd9db1503e660fb019160224e
2018-11-23 07:49:58 -08:00
John Knox
d8d40ae49b Log when client connects for an unknown device
Summary:
We've seen this happen sometimes, e.g. when adb fails and we aren't showing any android devices, but the sdk still manages to connect.

When we detect this, log an error so we can track how often it occurs.

Reviewed By: passy

Differential Revision: D13175639

fbshipit-source-id: b0f79b77ac04ad804e56448b3696a3ffeb30631e
2018-11-23 06:32:45 -08:00
John Knox
1c1905b5a8 Log client setup errors
Summary: Get client setup failure metrics

Reviewed By: passy

Differential Revision: D13175638

fbshipit-source-id: 97f6fddab850654dbe52c1da09ba8d1ca4873d49
2018-11-23 06:32:45 -08:00
Pascal Hartig
cadda77d74 Move versions plugin to plugin DSL (#331)
Summary:
Doesn't change how it works, but using the new recommended mechanism for loading plugins.
Pull Request resolved: https://github.com/facebook/flipper/pull/331

Reviewed By: jknoxville

Differential Revision: D13167476

Pulled By: passy

fbshipit-source-id: ac0ae925f5780136ce5c1fcb666faa79c19e049c
2018-11-23 06:18:44 -08:00
Pritesh Nandgaonkar
08cdb5e2e8 Fix improper plugin id assignment
Summary: This diff fixes the improper plugin id getting assigned to the variable which lead to notifications not getting shown. The client id has `#` so pluginId is no longer the second argument when one splits the string by `#`. This diff fixes this problem.

Reviewed By: passy

Differential Revision: D13176776

fbshipit-source-id: cd5bdc33c61485e3cdc2f2dbcc615980c39c8b8c
2018-11-23 05:48:11 -08:00
Pritesh Nandgaonkar
8327e1ff71 Added background plugin tests in flipper client
Summary: Added tests for flipper client which makes sure that didconnect is called in the case of background plugin. It also checks the case of a non background plugin.

Reviewed By: jknoxville

Differential Revision: D13152686

fbshipit-source-id: 7850f66a42d669243f656a1e1c26584869ee919f
2018-11-23 03:48:36 -08:00
John Knox
ca1f0202d7 Add retries around android device watching
Summary: Retry up to 5 times with exponential backoff.

Reviewed By: passy

Differential Revision: D13138244

fbshipit-source-id: 94c68b87aa281cfc3239b0bb8bdd75a2e0d7edc7
2018-11-22 06:39:58 -08:00
Pascal Hartig
9e6a86923a Fix yarn lint (#332)
Summary:
Eslint / prettier are unhappy with the formatting of the FlowFixMe
comment, but the suggested solution is really ugly. Let's disable
the lint for now and remove this once it's addressed.
Pull Request resolved: https://github.com/facebook/flipper/pull/332

Reviewed By: jknoxville

Differential Revision: D13156552

Pulled By: passy

fbshipit-source-id: 680d151ea1022912e0e4a83fa42dc51005631c30
2018-11-22 06:34:09 -08:00
John Knox
bbdbb94415 Fix network plugin bug
Summary:
Some network requests are yielding error: e.getMessage() is not a function.
It shouldn't be .getMessage(), it should be .message

Reviewed By: priteshrnandgaonkar

Differential Revision: D13137334

fbshipit-source-id: 72c782376c8e62a05c5e9ce1b956566ce1fc5bf0
2018-11-20 06:43:58 -08:00
mtfum
67dd1fc596 Remove unnecessary semicolon (#327)
Summary:
I updated to remove unnecessary semicolon in AppDelegate.swift, SampleSwift
Pull Request resolved: https://github.com/facebook/flipper/pull/327

Reviewed By: priteshrnandgaonkar

Differential Revision: D13121242

Pulled By: jknoxville

fbshipit-source-id: 9e848b2def84c5b969c9167abc556fe18ccecdbc
2018-11-20 02:12:18 -08:00
Panagiotis Vekris
e380fa7a08 Flow v0.86.0 in xplat/sonar
Summary: allow-large-files

Reviewed By: gabelevi, dsainati1

Differential Revision: D13105210

fbshipit-source-id: 462af926206a10618a725531f2e62da9f3291fc0
2018-11-19 12:14:51 -08:00
John Knox
018718244a Fix adb client use of promise.resolve
Summary: This was misusing promise.resolve by calling it before the result is produced, meaning there was a race condition. It would also resolve as success even if listDevices failed.

Reviewed By: passy

Differential Revision: D13121173

fbshipit-source-id: f120a1b199d1e3168059c537461f65a8dc125a94
2018-11-19 09:47:04 -08:00
John Knox
a6765deec6 Fix missing android devices bug
Summary:
Finally tracked down this bug that's been annoying me.

If you start flipper while the adb daemon is not running, then flipper will start the daemon, but it won't wait for it to have finished starting before telling the client to watch for devices. This is a race condition, and in practice never seems to work.

To avoid this, I'm calling `adb devices` on the client and waiting for it to complete before doing anything else. This forces it to wait for the daemon to start up if it hasn't already, and if it has then it instantly returns.

Reviewed By: passy

Differential Revision: D13101963

fbshipit-source-id: b85bed24751ce5c8efdfc6e841400e4db2580ab0
2018-11-19 04:48:00 -08:00
Pritesh Nandgaonkar
ddbb3c7f89 Make android sdk crashless
Summary: This diff wraps all the important places where the java code is called in a try-catch block in order to avoid flipper bringing down an app.

Reviewed By: jknoxville

Differential Revision: D12839504

fbshipit-source-id: 4711bccbe6d50094d76ed7ecd1eb652cefc2a090
2018-11-19 04:29:34 -08:00
Pritesh Nandgaonkar
bcf6479a5e Solve fbjni bug to allow catching Java exception in JNI
Summary: This diff just adds the changes done here D12829542 for the OSS

Reviewed By: jknoxville

Differential Revision: D12839582

fbshipit-source-id: 0bdfa9e8e661309454709819af703499cd540ab4
2018-11-19 04:29:34 -08:00
Pritesh Nandgaonkar
88b5f28b09 Adds stub podspec files to reserve the name on cocoapods master repo (#330)
Summary:
This PR adds a stub podspec files which will be pushed to cocoapods master repo to reserve our project name on cocoapods master repo. This PR follows the suggestion given by KrauseFx in #132 132. I have reserved the name of [Flipper](https://cocoapods.org/pods/Flipper) and [FlipperKit](https://cocoapods.org/pods/FlipperKit) on cocoapods with these stub podspecs.
Pull Request resolved: https://github.com/facebook/flipper/pull/330

Reviewed By: passy

Differential Revision: D13118301

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 754a69ee9577c1357cf3284b5c89143d46f69c87
2018-11-19 04:25:14 -08:00
Pritesh Nandgaonkar
6e1c1d57f9 Adds example flipper plugin in swift sample app (#329)
Summary:
This PR adds the example flipper plugin in swift sample app. Example flipper plugin acts as an example for the plugin authors. The example flipper plugin was already added in an objective c example but the swift sample app didn't have it.
Pull Request resolved: https://github.com/facebook/flipper/pull/329

Reviewed By: jknoxville

Differential Revision: D13085611

Pulled By: priteshrnandgaonkar

fbshipit-source-id: d86cca43e95592ecca8d9991d170e62170b8217b
2018-11-19 01:53:00 -08:00
John Knox
ed93c98313 Disable subdescriptors to fix layout plugin
Summary:
Bug report here: https://fb.facebook.com/groups/230455004101832/permalink/519062535241076/

This has broken layout plugin when NT components are used.
Removing the subdescriptors as a quick fix. At the moment, this means removing the new NT features.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13103790

fbshipit-source-id: 57c10a0a07507aaba0cd7a20d1b548470203f2f6
2018-11-16 11:33:04 -08:00
John Knox
7821b6b5a9 Sort uninitialized devices in redux state
Summary: Stops them from jumping around if they try to connect more than once.

Reviewed By: passy

Differential Revision: D13084056

fbshipit-source-id: 803538298c45b9c28e5116f072518e8632b0f1cf
2018-11-16 03:40:48 -08:00
Pascal Hartig
093ab1fe57 Add report bug callback for diagnostics screen
Summary:
Adds an optional interface that, when implemented, adds
a "Report Bug" button to the top of the screen.

This is a weird Android-ism that's sadly still the
recommended way of providing hooks into Fragments:
https://developer.android.com/guide/components/fragments#EventCallbacks

In order to keep things vanilla here, let's follow that pattern.

Reviewed By: jknoxville

Differential Revision: D13045578

fbshipit-source-id: 1506fcfc630c2d1183d7d1eaf470d23954e0c097
2018-11-15 12:23:12 -08:00
Pascal Hartig
85206e4d9b Turn FlipperDiagnosticsActivity into a Fragment
Summary:
This allows passing in some options in an easy way, like a callback
that contains all debug information for a bug report.

Reviewed By: jknoxville

Differential Revision: D13045282

fbshipit-source-id: 5698228ee9aef31d406313047b6836dc928448cf
2018-11-15 12:23:12 -08:00
Panagiotis Vekris
b2b27b774e Back out "Flow v0.86.0 in xplat/sonar"
Summary: Original commit changeset: f0122c8c6d60

Reviewed By: avielg

Differential Revision: D13083312

fbshipit-source-id: 4b77fda5221feff5c721bb8a509b1350d60046d5
2018-11-15 08:24:00 -08:00
Daniel Büchele
0b43d219c3 Adding test converage for plugin loading
Summary: Adds test for the plugin reducer and dispatcher

Reviewed By: jknoxville, passy

Differential Revision: D13082652

fbshipit-source-id: 4af2c7721c4d88abbd332d610ff71d5db78e721c
2018-11-15 07:30:05 -08:00
Daniel Büchele
1edc91512d add testing GKs
Summary: Adding two GKs (one failing, one passing) to allow the testing of gatekeeper functionality. This is used in the next diff.

Reviewed By: jknoxville

Differential Revision: D13082651

fbshipit-source-id: c6d8ef484564c8ae8b4c107de5643c700f696ad5
2018-11-15 07:30:05 -08:00
Daniel Büchele
7747a0714d plugin redux
Summary:
Plugins were loaded in `/plugins/index.js` which was loaded once at launch of the app. This moves the list of available plugins to redux. This way, plugins can be dynamically added. The redux store keeps to Maps of plugins (devicePlugins and clientPlugins) with their ID as key:

```
  devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>,
  clientPlugins: Map<string, Class<FlipperPlugin<>>>,
```

On launch of the app, all plugins bundled with the app and the one found in `pluginsPath` are dynamically added.

This changes now allows to add new plugins at any time. All components that need to know which plugins are available (e.g. the sidebar) are connected to the redux store. This way, they will automatically update, whenever a new plugin is added.

- add `plugins` to the redux store to keep the list of available plugins
- add a plugins dispatcher, responsible for loading the plugins on launch
- connecting all React components that imported `plugins/index.js` before to the redux store to get the plugins from there.
- moved the updating of the MenuBar to the plugins dispatcher as it needs to update whenever a new plugin is added.

Reviewed By: jknoxville, passy

Differential Revision: D12449236

fbshipit-source-id: 6ef3e243e2c80443614b901ccbfde485fcb4301c
2018-11-15 07:30:05 -08:00
Pritesh Nandgaonkar
e02420ac78 Make android project compile with new gradle and build tools
Summary:
If this is not done. I get
```
Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar
```
I follwed the suggestion given on [stack overflow](https://stackoverflow.com/questions/52944598/could-not-find-aapt2-proto-jar)

Reviewed By: jknoxville

Differential Revision: D12839581

fbshipit-source-id: aa02620c7e4c52899b2c2c4805fd8a6f168d946a
2018-11-15 06:37:55 -08:00
Felix Krause
01ef5c84d2 Fix Ruby Podfile code style in docs (#324)
Summary:
2 spaces, and space before and after the `+`
Pull Request resolved: https://github.com/facebook/flipper/pull/324

Reviewed By: jknoxville

Differential Revision: D13082547

Pulled By: priteshrnandgaonkar

fbshipit-source-id: b6053ebde16a1f7f953704e0791622d3d59cc962
2018-11-15 06:24:32 -08:00
John Knox
ff3977da77 Show connecting spinner
Summary:
First step in visualising the connection setup process.
Just a spinner while cert exchange is happening, so it doesn't look like nothing is happening.

Reviewed By: passy

Differential Revision: D13062514

fbshipit-source-id: a0692821025f42f4fe4af86faf059d4719008f25
2018-11-15 04:36:40 -08:00
John Knox
866cb72124 Put connection setup state in redux
Summary: Puts the connection state into redux so we have more visibility on what's happening in bug reports and in general allowing us to display it on screen.

Reviewed By: passy

Differential Revision: D13060455

fbshipit-source-id: c79b4b7d6a1155d86128a5d8d1174ead9e4514ae
2018-11-15 04:36:40 -08:00
Panagiotis Vekris
6362188563 Flow v0.86.0 in xplat/sonar
Summary: allow-large-files

Reviewed By: zertosh

Differential Revision: D13067587

fbshipit-source-id: f0122c8c6d602750289121d2ab2fdb09cbb033bc
2018-11-14 15:39:25 -08:00
John Knox
a48c680a40 Modify client id string and device serialisation
Summary:
This improves bug reports.
Adding serial into device.toJson() means you can now easily see which clients (apps) are from which device because they both contain the serial.
Changing client id to use # instead of - because the subcomponents of it already use -.

Reviewed By: passy

Differential Revision: D13058430

fbshipit-source-id: 02697ec623829423e667fd2acbd1abc369a6919b
2018-11-14 08:26:32 -08:00
John Knox
9f13e1422b Add 'Redux State' to bug reports
Summary:
Now the BugReporter has access to the logs and the redux store, to submit more useful bug reports.
This isn't currently used in open source, unless you override / replace this file.

Reviewed By: danielbuechele

Differential Revision: D13058210

fbshipit-source-id: e52a3cb528693ab171843080685e5342e0b6a393
2018-11-14 05:49:00 -08:00
Pascal Hartig
533c1ab59b Upgrade node-fs-extra
Summary:
Changes are mostly bug fixes, that shouldn't affect us. From the change log:

7.0.1 / 2018-11-07
------------------

- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))

7.0.0 / 2018-07-16
------------------

- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))

6.0.1 / 2018-05-09
------------------

- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))

6.0.0 / 2018-05-01
------------------

- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))

Reviewed By: jknoxville

Differential Revision: D13023753

fbshipit-source-id: 1ecc6f40be4c8146f92dd29ede846b5ab56765ea
2018-11-14 04:09:15 -08:00
John Knox
d9a9439dfa Fix emulator launching bug
Summary:
I was getting the following error when trying to launch an emulator:
`PANIC: Missing emulator engine program for 'x86' CPU.`

It seems like emulator/emulator is more reliable than tools/emulator: https://stackoverflow.com/questions/26483370/android-emulator-error-message-panic-missing-emulator-engine-program-for-x86

So put them both on the path in that order.

Reviewed By: passy

Differential Revision: D13040325

fbshipit-source-id: 11e8b24b2a99e02955128d5fb7c17764b98388fa
2018-11-13 11:18:34 -08:00
John Knox
57235131fc Prevent overlay class from being target-selected
Summary:
We use this class to show an invisible overlay when using a sandbox. This shouldn't intercept hit tests.

Would be good to remove these FB-specific references from the OSS code, but since there's one already, will leave that for a separate diff.

Reviewed By: danielbuechele

Differential Revision: D13028248

fbshipit-source-id: df2eb83fd9c4b7547ede5dcb088e10a7d3d4f36b
2018-11-13 03:54:22 -08:00
Pascal Hartig
3150daf4fa Upgrade Metro to 0.49.0
Summary: Just keeping it up-to-date. Includes a fix for source maps which could be interesting.

Reviewed By: jknoxville

Differential Revision: D13023339

fbshipit-source-id: 4c68029bb3cef408e2a7b28a1cde39f246dc046d
2018-11-12 07:16:24 -08:00
John Knox
c76b524907 iOS - Use bundleId for app ID
Summary:
The appId field gets embedded into the certificate request, so flipper knows which app to provide the cert to.
In iOS this field is never used, so far, because the destination path uniquely identifies the app so this is redundant.

For physical iPhones however, knowing the bundle id lets you deploy files into the container, so we can use this value.

Reviewed By: passy

Differential Revision: D13000296

fbshipit-source-id: 9f21850b908a03f1be87dc204e59d616150cc7ec
2018-11-12 04:23:58 -08:00
Daniel Büchele
274d71cb2f update default filters
Summary: Searchbar didn't update the filters when new default filters were added. This adds the new filters when they are added to the searchbar. Existing filters are not touched.

Reviewed By: passy

Differential Revision: D12999885

fbshipit-source-id: 51d9a1579724be2098b54161b39a0769180fb343
2018-11-12 02:27:00 -08:00
Daniel Büchele
bf7c35387c Report notifications not useful
Summary:
* adds a button to hide notifications by category
* adds a quick action to report notifications as not helpful
* fixes type of network plugin's notifications to be string instead of number

Reviewed By: jknoxville

Differential Revision: D12999883

fbshipit-source-id: 32be5bde5931cca4a27ab1ad34418300196452cc
2018-11-12 01:49:48 -08:00
Daniel Büchele
bd03f891d0 notification category filters
Summary:
Allows filtering notification by category. Category filters are also persisted in redux.

Adds a test suite for notification reducer

Reviewed By: passy

Differential Revision: D12999884

fbshipit-source-id: 5f8d2357e52f091c17b726e1f89ed68f3b7294fb
2018-11-12 01:49:48 -08:00
Daniel Büchele
8cb715bb3a adding actions to notifications
Summary: This diff adds action buttons to the notifications. Notifications with actions can only be sent from the main process. This is why we need to send a message to the main process which then shows the notification. The action callbacks are sent back to the renderer process to handle the action and log the event.

Reviewed By: passy

Differential Revision: D12999886

fbshipit-source-id: b415fded3172582fad11d88cabf0cfc5b3b8d4f9
2018-11-12 01:49:48 -08:00
Brett Lavalla
4954d018d0 Add litho accessibility rendering to Flipper accessibility mode
Summary: This is a re-do of D9720987.  Now that the Litho version has been bumped to 20 in D12838684, this diff can land safely.

Reviewed By: danielbuechele

Differential Revision: D12969979

fbshipit-source-id: b12d14e3b292d8cd110967f84f770f3725a800de
2018-11-10 00:05:44 -08:00
Dimple Jethani
0bb0d69115 added clicking on urls
Summary: added clicking on links from www

Reviewed By: danielbuechele

Differential Revision: D12992945

fbshipit-source-id: 16444a0a64b8a6cc8b46d0f79b746cf56de25ed0
2018-11-09 12:18:14 -08:00
Pascal Hartig
d159e27224 Remove ws dependency
Summary: Is it too early for spring cleaning? We don't use websockets anymore, do we? Couldn't find any imports or `require()`s.

Reviewed By: jknoxville

Differential Revision: D12997868

fbshipit-source-id: c87c67ec98b925c4209b97bf00e91fce67215465
2018-11-09 07:44:00 -08:00
Pascal Hartig
be3fae85df Upgrade to rsocket 0.0.9
Summary: Let's stay up to date and get the latest improvements.

Reviewed By: jknoxville

Differential Revision: D12997456

fbshipit-source-id: 1d543aec032052d1115d627f0103e7b8f721d74c
2018-11-09 06:31:14 -08:00
Brett Lavalla
de016b8493 Added ability to change 'enabled' view property
Summary: In the accessibility inspector plugin, the "Enabled" view property was marked at mutable, but would not actually change the clicked.  This is because no case for changing this property was implemented.  This fixes the issue and allows the property to be mutable.

Reviewed By: jknoxville

Differential Revision: D12944810

fbshipit-source-id: 846547ba1baa481eca3fe1cd949cf252904677bc
2018-11-08 17:56:20 -08:00
Noah Gilmore
5ef39cbcad Fix a couple of Sonar references in FlipperKit.podspec (#321)
Summary:
Noticed these while looking through the podspec.
Pull Request resolved: https://github.com/facebook/flipper/pull/321

Reviewed By: passy

Differential Revision: D12963023

Pulled By: jknoxville

fbshipit-source-id: c4abc77d508f56bb7a1678ddf733b36a96f0b45b
2018-11-08 03:41:06 -08:00
Dimple Jethani
aa6d6ccb9b sending www string through ntsubdescriptor
Summary: took out dictionary implementation and passing string through NTSubDescriptor

Reviewed By: rohan-mehta

Differential Revision: D12961340

fbshipit-source-id: 73493b83b3b670eb3455148c0223972b0d25815a
2018-11-07 15:20:05 -08:00