Summary:
This moves the native setup to a separate gradle file and unpacks everything outside the build folder. That way we don't throw everything away on every incremental build.
This is an intermediate step to get to a more declarative setup like Fresco has it and get rid of the individual hacks we have for every download.
Pull Request resolved: https://github.com/facebook/Sonar/pull/154
Reviewed By: jknoxville
Differential Revision: D8833812
Pulled By: passy
fbshipit-source-id: 2424c9d6e22e6092c04af344e06939b4a6aba041
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:
This diff uses `tag` instead of master branch and also updates the version number to the desktop sdk.
Pull Request resolved: https://github.com/facebook/Sonar/pull/152
Reviewed By: danielbuechele
Differential Revision: D8820016
Pulled By: priteshrnandgaonkar
fbshipit-source-id: ff2e554be55254b77c4e130b35b7299abbafa77d
Summary: The second tree has access to all AX NodeInfo properties (they are not in the sidebar yet). Infrastructure set up to customize displayed information bassed on what is most useful. Descriptors for views updated to include AX functionality and non-view descriptors AX functions defaulted to null/empty. Non-view nodes (like Fragments, Window, Appication) no longer included in AX tree. Corresponding nodes will be highlighted (although not expanded) on click in either tree.
Differential Revision: D8795800
fbshipit-source-id: cf2333f69bfecca3ff84aae62681c684dfa14bf3
Summary:
Update some build dependencies (gradle, android plugin) and make some
minor cleanups in the gradle files along the way.
Pull Request resolved: https://github.com/facebook/Sonar/pull/151
Reviewed By: priteshrnandgaonkar
Differential Revision: D8818841
Pulled By: passy
fbshipit-source-id: 78b6592dbf967553aadead57a60023a0b5ae79b6
Summary:
Depends on #149.
Version bump for Android to bring it in line with the top-level version.
Pull Request resolved: https://github.com/facebook/Sonar/pull/150
Reviewed By: priteshrnandgaonkar
Differential Revision: D8804324
Pulled By: passy
fbshipit-source-id: 6c796f34cf064f117b6195b3c88d9b5c100f8dbb
Summary:
Compile against a static version of OpenSSL for better compatibility
with apps that already use OpenSSL in some fashion.
Pull Request resolved: https://github.com/facebook/Sonar/pull/149
Reviewed By: priteshrnandgaonkar
Differential Revision: D8804169
Pulled By: passy
fbshipit-source-id: 4de66a77806a3b3f01b2cf5f253916f2cf6f48e8
Summary: Accidentally the version number passed to the build script was not only the patch number but the full semver-number. The build script is expecting a single number and there for ignored the version number that was passed. This caused the build to always have patch version 0.
Reviewed By: priteshrnandgaonkar
Differential Revision: D8804473
fbshipit-source-id: a116cac69066141fe8c8ed62020d16a1a7c40079
Summary: Small tweaks so that Sonar can be started easily on windows.
Reviewed By: danielbuechele
Differential Revision: D8769592
fbshipit-source-id: 084dd50e5600a7e2e9c5544e3e79a18614933fdc
Summary: electro-builder automatically publishes when it detects builds on TravisCI. This disables this behaviour, as we want to manually publish releases.
Reviewed By: jknoxville
Differential Revision: D8783066
fbshipit-source-id: d8723c87b879b3ef7ee02585997a13cb55095e65
Summary:
Plugins had their custom setup method which needed to be called externally. That is what consturctors are for. This removes the setup method and moves ths logic to the constructor.
The setup method was called to late which caused the graphQL plugin to crash. With the logic now being in the constructor, it is ensured that it is called at the initialization.
Reviewed By: jknoxville
Differential Revision: D8769807
fbshipit-source-id: 7b4ab4815bbe397c80998adcb89ca361df6970d3
Summary:
This PR updates the Network plugin's response parser to ignore the case of the `Content-Encoding` header in the response. This was preventing responses that are gzipped from being uncompressed. I tested this with gzipped responses through the OkHttp interceptor on Android. This could potentially address #79 as I was experiencing that issue before this change.

Pull Request resolved: https://github.com/facebook/Sonar/pull/143
Differential Revision: D8780509
Pulled By: danielbuechele
fbshipit-source-id: 1a2d86226a8a0204ff43eb5f9394a56c04fd2d8d
Summary:
This PR includes documentation for using the `SonarOkhttpInterceptor` for applications using the `OkHttp` network stack. The docs were modelled on the [Stetho docs](http://facebook.github.io/stetho/#enable-network-inspection)
Fixes#22.
Pull Request resolved: https://github.com/facebook/Sonar/pull/144
Differential Revision: D8780506
Pulled By: danielbuechele
fbshipit-source-id: fb2ddd4356b421c3baf0a80a410dd579ebc1bd8d
Summary:
This saved the state of the network plugin even when switching between plugins using persistedState.
A bug in the Android implementation didn't clear the events that were already sent to the desktop.
Reviewed By: jknoxville
Differential Revision: D8752098
fbshipit-source-id: 152ec5da83958ad8124686f780d39983cbce563f
Summary:
Two pros are passed into every plugin to persist state:
- `this.props.persistedState` which is the object of the persisted state
- `this.props.setPersistedState` which can be used to modify the persisted state
The state itself is stored in redux and therefore persisted when switching plugins.
The lifecycle hooks used a HOC are now implemented by the `ref`-function, which makes the code a little cleaner.
Reviewed By: jknoxville
Differential Revision: D8752097
fbshipit-source-id: d4f081f149cd840a29f1132bde91d72d3fba67ed
Summary:
One design goal of sonar is to never cause the host app to crash or hang.
For this reason, we do all heavy work in a background thread.
If we detect that it's not running in it's own thread, just return so we don't hold up the caller.
Reviewed By: danielbuechele
Differential Revision: D8767288
fbshipit-source-id: e146cc2cfe5c3e62d12f527ff79f24c74873d4ff
Summary:
Having another attempt at removing this. It's unsafe because it in some cases executes the .then() task in the timekeeper thread, rather than the executor the original future is using.
When that default executor is an InlineExecutor, for example, you can get stack overflow.
I tried to remove this use before, but having the same thread used for both the sonar client itself and rsocket, meant that they entered a deadlock trying to connect.
Now that I've separated those jobs into separate threads, they can execute independently.
Reviewed By: danielbuechele
Differential Revision: D8748356
fbshipit-source-id: a1029ece2c7006ad7642cbf8aa59e692c76b19b2
Summary:
We currently give sonar one event base from java / obj-c code to use for scheduling tasks.
This causes a problem, because we schedule reconnect tasks on the event base, and then these tasks interact with rsocket which schedules it's own tasks.
The problem is that we're passing rsocket the same event base. So the reconnect code executes and blocks waiting for rsocket to connect.
But rsocket can never connect because it never executes because that thread is blocked, so we get deadlock.
Fixing it by giving both processes their own event base / thread.
Reviewed By: danielbuechele
Differential Revision: D8748354
fbshipit-source-id: aa00766059f66fadfecb1970492bbb7107bbbfe4
Summary:
We currently give sonar one event base from java / obj-c code to use for scheduling tasks.
This causes a problem, because we schedule reconnect tasks on the event base, and then these tasks interact with rsocket which schedules it's own tasks.
The problem is that we're passing rsocket the same event base. So the reconnect code executes and blocks waiting for rsocket to connect.
But rsocket can never connect because it never executes because that thread is blocked, so we get deadlock.
Fixing it by giving both processes their own event base / thread.
Reviewed By: danielbuechele
Differential Revision: D8748355
fbshipit-source-id: b0ad2172087f0103180677438f427c831db7f42c
Summary:
We currently give sonar one event base from java / obj-c code to use for scheduling tasks.
This causes a problem, because we schedule reconnect tasks on the event base, and then these tasks interact with rsocket which schedules it's own tasks.
The problem is that we're passing rsocket the same event base. So the reconnect code executes and blocks waiting for rsocket to connect.
But rsocket can never connect because it never executes because that thread is blocked, so we get deadlock.
This is the first step which just changes the interface to pass two event bases.
The consumers will be changed to pass in different threads next.
Reviewed By: danielbuechele
Differential Revision: D8748350
fbshipit-source-id: 481d6f23644f28fd0f1c786252605287019c999c
Summary: The redux store keeps a list of devices. For the active device, it stored the index in that list. This diff now stores a reference to the active device instead of the index in that array. This changes makes it easier to get the reference to the active device in a component.
Reviewed By: jknoxville
Differential Revision: D8767514
fbshipit-source-id: c740cf98d6039223ce8d5a47bcd277989fe70bc3
Summary:
The sidebar always showed all apps, because we don't know on which device an app is running. This filters the sidebar to only show Android apps, when an Android device is selected and only show iOS apps when an iOS device is selected.
Still, we can't filter when where are more simulators with the same OS.
Reviewed By: jknoxville
Differential Revision: D8766007
fbshipit-source-id: dcf0db41b2c2c5dcaa2d1700343b1dd45d3d53b0
Summary:
All the new errors were missing annotation errors. I fixed as many as I could
by adding annotations. For the rest I added a $FlowFixMe suppression type.
Reviewed By: nmote
Differential Revision: D8756267
fbshipit-source-id: a69b6e21525b9b12e582ff18dcb1eeea584abb2a
Summary: Many plugins initialized their state in the init function. Due to changes in how plugins are rendered, the init-function might be called after the initial render and therefore the state being undefined at the first render. This moves the state initialization into a instance variable to ensure they are created before the first render.
Reviewed By: jknoxville
Differential Revision: D8746242
fbshipit-source-id: 04af039da2dc00c14a2d8ac42b72559ce789ef57
Summary: Added duplicate view tree (will be replaced with accessibility node tree eventually). Can toggle ax mode on and off and interact with each tree individually to view/change properties.
Reviewed By: danielbuechele
Differential Revision: D8717557
fbshipit-source-id: 1109ccafd49b6958ee7a70c2e8851ed8351516ae
Summary: This diff is mainly moving diffs around to open source the Sandbox plugin. I created the MD file writing some docs. The rest is just making our own FB implementation work
Reviewed By: danielbuechele
Differential Revision: D8731839
fbshipit-source-id: 27ac67223c6de9d1be406ab8c06b71b82d5407bc
Summary: Now, that we always have one device selected, we can put the buttons for screenshot and screen capture to Sonar's titlebar. This diff also adds support for iOS devices.
Reviewed By: jknoxville
Differential Revision: D8732632
fbshipit-source-id: 56271fbba7b4a2c10c2742c5c457dbb4c3c16777
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: Instead of showing a modal alert, we are now showing a notification, when an update is available. Clicking the notification will restart Sonar and install the plugin. Otherwise, the update will be installed on the next start of Sonar.
Reviewed By: jknoxville, priteshrnandgaonkar
Differential Revision: D8732743
fbshipit-source-id: b9e73a0d5b0866ab79b1e17274c501eac2ef41cc
Summary:
This lets `yarn` work properly on Windows. Tested in a Cygwin environment. I also added a note about yarn compatibility to the readme.
Closes https://github.com/facebook/Sonar/pull/138
Reviewed By: danielbuechele
Differential Revision: D8734197
Pulled By: xiphirx
fbshipit-source-id: 19be8bb0653a2b0381224b065df0cac579d72c3b
Summary:
Remove left over from local testing.
Closes https://github.com/facebook/Sonar/pull/127
Reviewed By: danielbuechele
Differential Revision: D8723789
Pulled By: passy
fbshipit-source-id: f08203a441c35860dd5257a0ec147d1bf9c3da60
Summary:
Add the required compiler flag for Folly when building x86_64.
I'll prepare a new release for this shortly.
Depends on #126
Closes https://github.com/facebook/Sonar/pull/128
Reviewed By: danielbuechele
Differential Revision: D8731955
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 9511811b0b51205989a5200ad9d0d8689ca684cb