Summary: Adds support for physical iOS devices, when the necessary dependencies are present. Unfortunately these aren't open sourced yet so the open source build won't get this feature yet.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13001473
fbshipit-source-id: d8c2bcd53b7972bec676717c8af0112800b918d0
Summary: This class already has an adb client. Instead of creating new ones, should just use that.
Reviewed By: passy
Differential Revision: D10231152
fbshipit-source-id: c9426a12f0f6baf94026da51a79131d07e58053c
Summary:
Android devices don't always know their own serial.
But we do a certificate exchange using adb from the desktop, so we can provide it in the response.
After this the client will provide it every time it connects, so we can do things like filter plugins by device id.
For apps that have already done cert exchange, they'll continue to use 'unknown' as their id until they do it again with an up to date version of sonar.
We can think about forcefully stopping that, but I haven't done it.
Reviewed By: danielbuechele
Differential Revision: D9481460
fbshipit-source-id: f8932699711ebbec4260fabe32f87e6cdff920f2
Summary: Makes the code a bit cleaner and maintainable.
Reviewed By: passy
Differential Revision: D9496316
fbshipit-source-id: a59a41b12a57bb2eedc25b154c6f9b0cdc77dd8a
Summary: The console was pretty spammy. This fixes some issues that were logged and changes many log statements to `console.debug` which are not shown by default.
Reviewed By: passy
Differential Revision: D9303011
fbshipit-source-id: 1102f4f8814152a45f155cb43488a515c2d4eee4
Summary:
[Step 1 of a protocol change between desktop app and flipper agent]
The flipper agent periodically tries to connect.
When it doesn't have the required certs, instead of trying to connect, it requests them from the desktop.
After requesting, it just continues the loop, trying to request.
The problem with that is
a) the desktop can take longer than one cycle to generate and provide the certs, meaning the agent will make overlapping requests, causing confusion and it to take longer than necessary.
b) the desktop can take less time than a retry cycle, but the agent will still wait before trying to connect.
Fixing a) by making the agent wait for a response from the desktop before continuing attempting to reconnect.
This means on the next connection attempt, it's guaranteed that the desktop is finished processing the CSR.
b) remains unfixed for now, but can be dealt with separately.
This is step 1 which adds an extra responder to the desktop app. It won't change anything until the agent starts
sending requestResponse messages instead of fireAndForgets. The plan is to leave this in place for a while to give users time to update, after that, we'll roll out the change to the agent.
Reviewed By: passy
Differential Revision: D9179392
fbshipit-source-id: 9a8021253dcd28c15cceeec23630a67aec219fd5
Summary:
fs.unlink() requires a callback and we weren't passing one.
Using synchronous version instead.
Reviewed By: passy
Differential Revision: D9148214
fbshipit-source-id: 8a3c1103d93fced5e3c25c38775badb72c23e48a
Summary:
On windows when I used a more complicated path for the sonar directory (e.g. for writing sonarCA.cert to), it failed this regex but succeeded the node fs.writeFile call.
Unless I'm missing something else this regex does, we should just let the authority of the fs module decide if it can write something.
Reviewed By: jknoxville
Differential Revision: D8822094
fbshipit-source-id: 294c9a7b70080fefcfffdddd239d321ff7faa4e1
Summary:
We have a check for whenever the server cert is expiring within 1 day, however this turns out it doesn't count certificates that have already expired.
So adding a check for those that have already expired, and regenerating them if so.
We can safely handle parse failures by assuming the cert has expired.
Reviewed By: passy
Differential Revision: D8858740
fbshipit-source-id: 6e06f9b267bcaec497b7eedd3d6c1974c788aea2
Summary: Small tweaks so that Sonar can be started easily on windows.
Reviewed By: danielbuechele
Differential Revision: D8769592
fbshipit-source-id: 084dd50e5600a7e2e9c5544e3e79a18614933fdc
Summary:
Some errors such as UI errors should be logged whenever they occur, but some, such as those that occur when a device keeps trying to connect but can't, should not be.
This adds the class and replaces the top recurring errors with it.
Reviewed By: danielbuechele
Differential Revision: D8639448
fbshipit-source-id: f001aa1e90eae6d26a8dbfcd3175b51fc486eae9
Summary:
On certain samsung devices, the 'run-as' command, inside adb shell doesn't work.
We don't yet have a workaround for this, otherwise potentially upgrading to android 8.
Distinguish these errors (log them so we'll see how often it happens), and tell the user why it's not working.
Reviewed By: danielbuechele
Differential Revision: D8638728
fbshipit-source-id: f4764120cc27187330a3f236636292a5e63e8ec9
Summary:
Common Name extraction by regex was failing on LibreSSL.
Now using RFC2253 to unamiguously format distinguished name subject strings.
Reviewed By: emilsjolander
Differential Revision: D8452825
fbshipit-source-id: a18d4162a7aed3b5bd8c2996ff3832877dac90db