Summary:
Centralise connectivity logging into a single place. By having all logs go through a single interface, then it becomes trivial to manipulate them as needed.
In this change, this is not done.
In subsequent diffs, logs will be dispatched via an event and will be visualised in the Connectivity Hub.
Reviewed By: passy
Differential Revision: D47185054
fbshipit-source-id: fb5eab98895be0c8f61fb9a77d3e66d6a8dbcb27
Summary: These are no longer that useful and can be quite verbose, remove.
Reviewed By: antonk52
Differential Revision: D46516093
fbshipit-source-id: e6c3a546d379ca20ff8757fdc3feaa11bf0788a0
Summary:
I noticed we were not killing the PortForwardingApp on exit.
This is not ideal.
So, use an exit hook to kill the app.
Reviewed By: passy
Differential Revision: D46392855
fbshipit-source-id: e2b75f76c9dfab0ff46df3ad2c94a1a523154b2a
Summary: This is firing regularly when people have a broken local setup.
Reviewed By: lawrencelomax
Differential Revision: D43834469
fbshipit-source-id: 1fbc2cf52f93046984e9846f8aed931106542b03
Summary:
When we start using Flipper from the CLI for automation, we want to have the list of currently connected devices as soon as flipper server is alive.
Otherwise, we would have to poll flipper server waiting for some magical moment in the future when devices connect.
This way, we can be certain that if flipper server started, but we do not see a device, it is not connected at all.
Reviewed By: mweststrate
Differential Revision: D40184106
fbshipit-source-id: ce4c2b897a2df0081e3a0b6a8c26640599e0f9e8
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
Summary:
This error messaging is confusing for device only users. These users may only be running against a device **without xcode installed**, which is supported.
However, we also need to handle the case where a user has a sim running and they haven't xcode-select'd as this will mean that the sim is working fine, but the user has no way of knowing why Flipper is not working.
Reviewed By: passy
Differential Revision: D34140277
fbshipit-source-id: f9b035b6c7918424d6131d1dfcdba10acf438fa8
Summary: These can be batched together rather nicely
Reviewed By: lblasa
Differential Revision: D34139753
fbshipit-source-id: 7388630dcae34d40308d54f18a37215cf18e5904
Summary: Accidentally tested a function that should have been called from the internals. This makes the internal function use the check.
Reviewed By: lblasa
Differential Revision: D34139589
fbshipit-source-id: fac13f7b54ffb0b6f501fb9237f55766706e975a
Summary:
Fixes https://github.com/facebook/flipper/issues/3396 - the Xcode version mismatch check has been broken since 0.132.0.
## Changelog
Fixed Xcode version mismatch check
Pull Request resolved: https://github.com/facebook/flipper/pull/3428
Test Plan: No existing test, manually tested locally on macOS 11.6.3 via `yarn start` when launching the Simulator directly or via `yarn react-native run-ios` in an RN project
Reviewed By: lblasa, mweststrate
Differential Revision: D34139471
Pulled By: lawrencelomax
fbshipit-source-id: 97920de5c463b366ef7ecaef0441ee37debe5d46
Summary: Idb and adb sholuld not really be accessed out side of Adnroid and iOS device managers
Reviewed By: lawrencelomax
Differential Revision: D33915162
fbshipit-source-id: 0d1bb028b9a53254cf5b0ce6289ae76339c5a254
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: This is public but never read, no need for it to exist
Reviewed By: passy
Differential Revision: D33893097
fbshipit-source-id: aa423464f9cc0c35768a549fd5cb481784d8bcd6
Summary:
There's no need for us to have a property that can be undefined, since we can use the magic of *passing arguments* to achieve the same end result.
The unit test a bit more precarious, but it's left here for posterity or until we decide to kill it otherwise.
Reviewed By: passy
Differential Revision: D33892407
fbshipit-source-id: 3b499511189862e2265d8d6d29f849a7b813050e
Summary:
Bulding on the work from prior diffs we can use the created bridge directly. No need to have if statements calling out to sub-functions, just use the base type itself which will use the appropriate implementation.
There's no behavioural change here. Either idb was queried for sims/devices or simctl was queried for just sims, they were always mutually exclusive.
Reviewed By: passy
Differential Revision: D33842604
fbshipit-source-id: 0bf63ffc34368c70df31c105ea0ba5df941e72cc
Summary:
We perform this *repeatedly* (every 2s!!!). Which is clearly excessive.
Let's perform this check once to avoid noise and a waste of system resources
Reviewed By: passy
Differential Revision: D33844194
fbshipit-source-id: 226dc9d67bb83b167afa8e28ade8e1911470ef8a
Summary:
This runs in a very hot loop (which I will change shortly)
However, there's also some simplification that we can do here:
- Only look for `Simulator.app` processes instead of all the processes. This limits the amount of string comparison to do. If there's a `Simulator.app` running, then we know a sim is running for that Xcode.
- Use piping to extract the launch path of the process, instead of then regex'ing this out.
- Use a simpler substring match to determine if paths have a different start.
Reviewed By: passy
Differential Revision: D33891296
fbshipit-source-id: e37d5f260fc6c6113be9c5268b7c8cffb4057b9a
Summary:
Again this is just a code move for now.
However, we now have a common method between simctl and idb cases. This means that the next diff can call an `IOSBridge` with polymorpism taking over. This is still delegated out, but there's an argument to be made to move `iosUtil` functionality back so that this all lives in the same place.
Reviewed By: passy
Differential Revision: D33843093
fbshipit-source-id: 5cd884140817df851cccf63e5780582b16d4231c
Summary:
Extracts `getSimulator` interrnals to `SimctlBridge`. This allows this functionality to be used independently of things like the the flipper server.
For now this just moves the functionality, but future diffs will build on top of this.
Reviewed By: passy
Differential Revision: D33842986
fbshipit-source-id: bae26a9bd5c21c9813f8a2b10c3b3e3efc1c5929
Summary:
This is related to `simctl` functionality, so can be extracted there.
This will aid in future changes whereby we can hide `getDeviceSetPath` in the IOSBridge module
Reviewed By: passy
Differential Revision: D33842987
fbshipit-source-id: de292ce5afba3e7d79d8ba27c2b8852909d7e6f3
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:
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 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:
idb sometimes returns duplicates when we query targets. It leads us to removing valid devices and reconnecting to them again. Eventually, it starves the idb thread pool.
This diff removes the duplicates from the idb output.
Reviewed By: jknoxville
Differential Revision: D32099320
fbshipit-source-id: 7d8b756360f82557000ea5aa037a249b33be9961
Summary: Port forwarding tool was logging the child process object. Made the logging cleaner and more useful.
Reviewed By: nikoant
Differential Revision: D31608867
fbshipit-source-id: 1c2ae7c926ed4e1b44d51db5415874600acde7ae
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