Commit Graph

16 Commits

Author SHA1 Message Date
Michel Weststrate
74004b6338 Improve unit test robustness
Summary: When running tests locally, some are quite flaky, and there is a lot of error logging noise. This diff doesn't remove all of it, but does reduce it significantly.

Reviewed By: nikoant

Differential Revision: D20034619

fbshipit-source-id: 183f74475b644f803b2f92b1b1301f4d0f6e193a
2020-02-25 14:59:48 -08:00
John Knox
a24b043df0 Allow websocket connections from browser
Summary: Gets flipper to open up a websocket server for web browser connections.

Reviewed By: passy, priteshrnandgaonkar

Differential Revision: D19501123

fbshipit-source-id: e506f35d7ddce622128932494e8bb10802d3747b
2020-02-13 13:56:37 -08:00
John Knox
5a19004732 Only show outdated SDK warning for android devices
Summary: This exists to warn people about an incompatibility with old android sdk's, there's no need for the warning on other OS's even if the sdk is old.

Reviewed By: mweststrate

Differential Revision: D19499587

fbshipit-source-id: 5468fffcc0265bb122cf149f49b9af86ddd3c84e
2020-01-22 07:49:48 -08:00
John Knox
15e1b25098 Centralize clientId creation
Summary: One step towards getting away from constructing and destructing clientIds manually everywhere by splitting and joining #'s. Which has been VERY error prone in the past.

Reviewed By: passy

Differential Revision: D18809442

fbshipit-source-id: bd4d89d3eb3d59694aa735b19dbd73d122e59ba0
2019-12-04 07:18:13 -08:00
Pascal Hartig
0a7c57f5a0 Back out "Back out "[flipper][js] JS apps support 1/n""
Summary:
Original commit changeset: ff84080d43fa

This re-adds JS client support. The original version had a small bug that inadvertantly wrapped support for Android emulators in the dropdown in a GK that was only meant to cover JS clients. This is addressed here.

Reviewed By: timur-valiev

Differential Revision: D18707485

fbshipit-source-id: ceea8e279a21111f96073f8b784e852f6313e2a4
2019-11-26 09:37:57 -08:00
John Knox
2fd6301876 Back out "JS apps support 1/n"
Summary:
Original commit changeset: 56d1ca1a60ed

This broke Android support in some instances. We haven't had a chance to investigate this yet, but this should cleanly reapply, so we can figure out what happened after the release.

Reviewed By: cekkaewnumchai

Differential Revision: D18688590

fbshipit-source-id: ff84080d43fa481cc8c8c669a76aed15d0f8aa56
2019-11-26 05:30:34 -08:00
Timur Valiev
c685493db0 JS apps support 1/n
Summary:
### Connecting Flipper with JS apps by using electron's BrowserWindow and IPC

1. UI: there is a menu item in Devices tab which opens JS Emulator Launcher Sheet. Here we can configure URL to open and initial size of the window.
2. BrowserWindow, preloaded js: there is SupportJSClientPreload.js which initialize communication between flipper and app via electron's ipc
3. On flipper's side there is src/utils/js-client/serverUtils.tsx which contains most of JS emulator related code
4. Extracting of FlipperClientConnection: since we don't use RScocket to communicate with JS app I extracted needed methods to FlipperClientConnection (located in Client) and partly implemented them in JSClientFlipperConnection (requestResponse is just send a message now, doesn't return actual result)

Reviewed By: jknoxville

Differential Revision: D18572882

fbshipit-source-id: 56d1ca1a60ed2e51329b917021a09382cbb1ceec
2019-11-22 03:11:29 -08:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
John Knox
729e74f2fc Switch to using settings for android sdk location
Summary: A settings screen has been added where android home can be set. This changes the downstream code to use this value rather than the `env.PATH` variable.

Reviewed By: passy

Differential Revision: D17713288

fbshipit-source-id: 51551652c9c2f468e1117c18785123348e4b4576
2019-10-07 08:51:06 -07:00
John Knox
976101449d Fix infinite spinner after cert exchange
Summary:
After the '(Outdated SDK)' addition to apps when they need to be updated, the uninitilaized clients weren't matching up with the fully initialized ones, so instead of being replaced by the full client in the side bar, they sit there forever looking like they are loading.

This applies the same name change to both fully and non-initialized clients so they always match up.

Reviewed By: passy

Differential Revision: D17501718

fbshipit-source-id: 6f2090b717a17c16c2cff37701e184363c82d36f
2019-09-23 06:22:01 -07:00
John Knox
ea4b62c458 Fix unhandled promise rejections at startup
Summary: I like the idea, but these reject by default promises cause the global rejection handler to fire at startup, looking like things are broken.

Reviewed By: danielbuechele

Differential Revision: D17397614

fbshipit-source-id: 88601d6c65cb79d61efc27c34a4b7f2dd8716d39
2019-09-16 09:49:06 -07:00
John Knox
25de8ee90a If sdk_version is missing, consider it old in server.tsx
Summary: Just noticed this. There are probably not many version 0's around, but if there are they should be treated as old.

Reviewed By: passy

Differential Revision: D17397155

fbshipit-source-id: fab6f8b2557ecb983441b282ceb29b5b744ae900
2019-09-16 09:03:41 -07:00
Chaiwat Ekkaewnumchai
d297b7bae2 Indicate Outdated SDK Version after App Name
Summary:
Per title

Earlier SDK version and this version (3) of Flipper determine a device for an app differently, so there is a case that both versions of the same app can refer to the same device which uses mutual name.

To resolve this problem, we change the name of previous SDK version of an app, so that
1) Both versions will be shown on the sidebar
2) Users know and hopefully update their apps to resolve the connection issue

Reviewed By: jknoxville

Differential Revision: D17376199

fbshipit-source-id: 3dc7c9b0bf99ff06c11c83eff0c72b6ce12f1a5a
2019-09-16 05:33:19 -07:00
Chaiwat Ekkaewnumchai
2239ca65a5 Fix Android Connection Swap Issue (Server Side)
Summary:
- Take device id retrieved by matching CSR to the given CSR destination
  - Otherwise, use the previous way

Note:
- Backward compatibility will be fixed next diff

Reviewed By: jknoxville

Differential Revision: D17346422

fbshipit-source-id: 59b2fb9849373db1ba930dde702194c5fb201678
2019-09-16 05:33:19 -07:00
Pritesh Nandgaonkar
a492ddaae8 Strictify server.tsx
Summary: As per title

Reviewed By: danielbuechele

Differential Revision: D17267564

fbshipit-source-id: d99fe62cc22fa3664d5aa6d4770d864fdd212ef4
2019-09-10 07:47:16 -07:00
Daniel Büchele
5f53087c7e client server
Summary: Migrating Server, Client and UninitializedClient to TypeScript

Reviewed By: passy

Differential Revision: D16687855

fbshipit-source-id: 402e4dbcd5d283d3e280d4d8b312662829457886
2019-08-08 11:00:38 -07:00