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
Summary: Same as previous diff but for TLS attempts.
Reviewed By: antonk52
Differential Revision: D46220897
fbshipit-source-id: 9495c39edffbdebe0ba21ec7320b63bad8759dde
Summary:
Need to answer:
- How many app connections a day/week?
- How many connections a day/week per app?
- How many connections a day/week per os?
- How many connections a day/week over WWW exchange?
- How many connections a day/week over FS exchange?
- How many connections over a device?
- How many connections over a simulator?
Reviewed By: antonk52
Differential Revision: D46220581
fbshipit-source-id: 6783f49b59cba91cd04625044314973d98cef301
Summary: Added a clearer message to the null checks, to give some clue on what goes wrong
Reviewed By: lawrencelomax
Differential Revision: D35246065
fbshipit-source-id: d33a6184bf722a386c2b2dff1afd41db20efe90b
Summary:
Certificate exchange errors should be communicated back to the user, as they are often actionable, and otherwise leave users in a stuck state.
Also removed the ServerController interface, upgraded the listener types to get at the necessary internal apis typewise that were already available.
Removed that error wrapping utility complaining about idb installation, this is rarely ever the problem anymore, and it hides the underlying error.
Reviewed By: nikoant
Differential Revision: D34105452
fbshipit-source-id: 3b3cd0b99cecbda26dfd0744a90690fe568a5ea5
Summary: Remove hidden async initialization of adb and idb. Make it explicit. Remove nullable fields in Android and iOS device managers.
Reviewed By: lawrencelomax
Differential Revision: D33915177
fbshipit-source-id: 882f79310410e0dfde6169abf343ab808644e4a2
Summary: Extract WWW certificate provider from the iOS certificate provider. Hide its implementation from OSS since it is not relevant for OSS folks.
Reviewed By: mweststrate
Differential Revision: D33895378
fbshipit-source-id: 376afda3b5fa3857c0eb280b92555314eb1a0d1f
Summary:
Previously CertificateProvider initialized ADB and provided config to IDB. As result, AndroidDeviceManager and iOSDeviceManager indirectly depended on CertificateProvider.
With this diff we:
1. Make idbConfig resemble adbClient.
2. Make AndroidDeviceManager and iOSDeviceManager initialize their own clients
3. Fix server crash when one of the clients couldn't be initialized. The reason for the crash is CertificateProvider.prototype.init which is no longer needed.
Reviewed By: passy
Differential Revision: D33711652
fbshipit-source-id: 055b5625ed993827b65396f4af5157808479242b
Summary:
1. Remove GK.get('comet_enable_flipper_connection') which does not seem to be needed anymore
2. Support custom ports for the insecure connection flow
Reviewed By: lblasa
Differential Revision: D33632891
fbshipit-source-id: 045d6886ea94e15bff38f2f61c7d5a2c56c39859
Summary:
This diff makes sure that errors are propagated similarly in flipper desktop and browser version, and that they are shown in either case.
Since in the browser version, the UI loads after the error happened, we'll store the error so that any client connecting in the future will read and report it.
Also added a `--failFast` flag to flipper-server, so that the process exits immediately if misconfigured, which is convenient in CI use cases and such
Reviewed By: nikoant
Differential Revision: D33348922
fbshipit-source-id: 0f584104f881141fde38da3f0031748415343ea2
Summary:
If openssl is not available, this would lead to an unhandled rejection exception. That is because a lot initialization logic generates promises that don't get a catch chained on immediately. Changed the flipper server startup flow to be more idiomatically async
Fixes https://github.com/facebook/flipper/issues/2766
Changelog: More clearly communicate if flipper server failed to start (e.d. due to port already taken, openssl not being available)
This change fixes it only for desktop flipper, will make sure the browser UI will support this as well (the error will fire correctly there, but there are no listeners during startup)
Reviewed By: nikoant
Differential Revision: D33348923
fbshipit-source-id: f561bb27b18a3041c514b37f7aed11435a49647f
Summary: This diff is some boyscouting on cleaning up our globals, and stop using them inconsistently icmw global or window
Reviewed By: aigoncharov
Differential Revision: D33171108
fbshipit-source-id: 400893e5f31523631a7ab6fda428524c751901f1
Summary:
This diff removes most deps from the root package.json, which now only contains electron and shared build / test infra structure: lint, prettier, jest, typescript.
This makes it possible to control much better which packages are used where, as all sub packages now have their deps explicitly in their package.json instead of incidentally shared. This allows for example to disable DOM types for all packages by default (flipper-plugin, ui(-core) and app still request it), and in the next diff I hope to add to this that nodeJS types are no longer shared either, so that UI oriented packages will generate compile errors when using Node built-ins
This diff removes most deps that were currently unused, and dedupes a bunch of other ones, so the build should probably be a bit smaller now as well:
{F686704253}
{F686704295}
Reviewed By: antonk52
Differential Revision: D33062859
fbshipit-source-id: 5afaa4f2103d055188382a3370c1fffa295a298a
Summary: This diff moves send intern request from the browser to the server. The reason to make this change is that making such requests from a browser environment causes CORS restrictions to kick in.
Reviewed By: nikoant
Differential Revision: D32835449
fbshipit-source-id: e8e92e51ca963aa50b3c859bb61c2381171e85ae
Summary:
This diff moves a lot of stuff from the client to the server. This diff is fairly large, as a lot of concept closely relate, although some things have split off to the earlier diffs in the stack, or are still to follow (like making intern requests).
This diff primarily moves reading and storing settings and GKs from client to server (both flipper and launcher settings). This means that settings are no longer persisted by Redux (which only exists on client). Most other changes are fallout from that. For now settings are just one big object, although we might need to separate settings that are only make sense in an Electron context. For example launcher settings.
Reviewed By: passy, aigoncharov
Differential Revision: D32498649
fbshipit-source-id: d842faf7a7f03774b621c7656e53a9127afc6192
Summary: We can't action tasks based on this report, so better to raise it as a warning.
Reviewed By: nikoant
Differential Revision: D32758850
fbshipit-source-id: 2e8ff984f40d2d0431db192e8f2d983d52b77ccd
Summary: By tracking when clients connect and disconnect, we will be able to answer how long does it take for clients to connect
Reviewed By: passy
Differential Revision: D32697702
fbshipit-source-id: b01893f500c97b08eb4434733058f58433d7f4ef
Summary:
This change removes the usage of a GK to open WebSocket ports.
The WebSocket ports have been open for quite a while to all members of the Flipper Support Group. OSS users will now open the ports as well.
Reviewed By: mweststrate
Differential Revision: D32244706
fbshipit-source-id: e441dfd43c51dda26f259ae7d7ebc3d721cc1c99
Summary:
Currently, when a new app connects to Flipper, we show a lost connection notification even though it successfully connects to Flipper.
It happens because we of the device_id mismatch.
Reviewed By: mweststrate
Differential Revision: D32169917
fbshipit-source-id: 6df3ae7fd621b4549e18c1835473a13f18cfb339
Summary:
Standardize WS implementation for JS environments.
Why do we need a separate server implementation for browsers?
Browser targets cannot authenticate via the default certificate exchange flow. For browser targets we verify the origin instead.
Moreover, for already forgotten reasons the initial implementation of the WS server for browsers used a different kind of message structure and added extra `connect`/`disconnect` messages. After examination, it seems the `connect`/`disconnect` flow is redundant.
Major changes:
1. Updated class hierarchy for WS server implementations.
2. Updated browser WS server to support the modern and the legacy protocols.
3. Now a websocket connection with the device is closed on error. The idea is it is highly unlikely to handle any subsequent messages properly once we observe an error. It is better to bail and reconnect. What do you think?
Reviewed By: mweststrate
Differential Revision: D31532172
fbshipit-source-id: f86aa63a40efe4d5263353cc124fac8c63b80e45
Summary: I unintentionally added logging of csr certificates in my previous diff. This diff makes sure we're not logging them anymore.
Reviewed By: mweststrate
Differential Revision: D31609709
fbshipit-source-id: e43b348dbd62653f8a6e9089930c2a3699b29a12
Summary: moved `app/src/server` to `flipper-server-core/src` and fixed any fallout from that (aka integration points I missed on the preparing diffs).
Reviewed By: passy
Differential Revision: D31541378
fbshipit-source-id: 8a7e0169ebefa515781f6e5e0f7b926415d4b7e9