Summary:
We're seeing some crashes when attempting to send payloads larger than are supported by rsocket.
Instead of crashing, skip the message, but log it so we can see what it's containing.
This is where the failure occurs: https://github.com/rsocket/rsocket-cpp/blob/master/rsocket/framing/FramedDuplexConnection.cpp#L64
Reviewed By: passy
Differential Revision: D12857616
fbshipit-source-id: 2b02d7f5dd6499ba81783d3f8aefcbb64d9d408a
Summary: Currently we don't have a flag in iOS setup which lets us know if the code is going to be compiled in Open source or internally. Till now we didn't have a use case for it. But NT team is hacking a componentkit descriptor which is open sourced. This flag will come in handy for us to keep the open source setup build successfully.
Reviewed By: jknoxville
Differential Revision: D10854300
fbshipit-source-id: ac5da6f239b2066b6d7f0680cbfc1b7062ae0f36
Summary:
This won't affect runtime, but is useful when debugging issues with flipper itself.
Setting this flag means all state changes will be output in logcat.
Reviewed By: passy
Differential Revision: D10231148
fbshipit-source-id: 7ddd490290ad973fc339b2f5f93a6f9a1fab4577
Summary:
The code here is quite complicated so here's whats happening:
There's a disconnect hook, that waits and reconnects, so flipper never stops, except for the case where the desktop itself fails.
This makes some sense, but not total sense, as the client should really keep connecting, in case there's a different desktop that won't fail, or even if it was a transient failure.
Explicitly disconnecting, by setting the client to null, will trigger the disconnect hook and carry on the connect loop.
Reviewed By: passy
Differential Revision: D10231241
fbshipit-source-id: 90d823dce2221b1fb6501bd2797871dc1fb9770a
Summary: Makes QPL iOS plugin to work in background
Reviewed By: jknoxville
Differential Revision: D10446049
fbshipit-source-id: 02ad6f6f83b13e326b6fdd8aa972fa7d29c76eb9
Summary:
This diff sets up flipper for running plugins in background. This diff does the following
- Adds a function named `runInBackground` to the interface `FlipperPlugin` to make the plugins opt in to be run in background, default is false
- Changes the javascript side of the flipper to store the messages received by the plugins in background
- Process the stored messages when the plugin in background becomes active
- Currently I have just turned on network plugin to be in background mode.
- Remove the buffering from the network plugin, as it will run in background
- Write a batching layer to batch the messages and send to flipper.
Note: I haven't tested the wilde app yet, but the sample app works. I will remove the "[WIP]" from the title once I have tested it in wilde
Reviewed By: danielbuechele
Differential Revision: D10301403
fbshipit-source-id: 034eebf659a545d6b480a4ac1b73b0aa4b2f9797
Summary: New 0.8.0 release which includes name changes from sonar to flipper.
Reviewed By: passy, danielbuechele
Differential Revision: D10050160
fbshipit-source-id: 5394ea0d032cea39f40cc9ed8e0f054e506d4f04
Summary: This shouldn't have any effect on anything, it doesn't need to be any particular value.
Reviewed By: danielbuechele
Differential Revision: D9944462
fbshipit-source-id: f84c70b3cd18fdfe1d41f07b5b0ede2fdec3f44a
Summary: We are referencing a no longer existing folder.
Reviewed By: priteshrnandgaonkar
Differential Revision: D10009244
fbshipit-source-id: 710c363fdeaf4f8621eb5f5d0bde2cbd4295ae64
Summary: Part of sonar to flipper rename
Reviewed By: priteshrnandgaonkar
Differential Revision: D9929102
fbshipit-source-id: 88cdbd33aa5c76e386449f54f4eb8c6435865ed1
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9929101
fbshipit-source-id: f33e1ac7f88fbe88a9d48180d064b596603a3c58
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9920275
fbshipit-source-id: 02f97d1e51d58864283d26e8d3a724cac973e938
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9919821
fbshipit-source-id: a44a2a04d5463750f884f8bf1328e02d56593e82
Summary:
Part of Sonar -> Flipper rename.
It's about time this is renamed from *Websocket as well, since it doesn't use websockets anymore.
Reviewed By: passy
Differential Revision: D9919695
fbshipit-source-id: 78a63bfb7d5de19c093b7fb775d1426b4fc58f77
Summary:
Part of the Sonar -> Flipper rename
Intentionally left externally visible buck target as Sonar for now to minimize diff size.
Reviewed By: passy
Differential Revision: D9871684
fbshipit-source-id: 6926eb62c578a05cd895745c75ed7da3cfe965b5
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/277
Link all dynamically loaded libraries statically with the exception of libevent.
Reviewed By: jknoxville
Differential Revision: D9967422
fbshipit-source-id: b33cec5da0c2b34f47217353f205b9d77f1acae2
Summary: This diff wraps the call to refresh plugins in `performAndReport`. All the important methods are already wrapped in this function. This diff also logs the error in the standard error if the connection is not established. With this diff the iOS app should not crash due exceptions thrown in iOS and cpp code. For android the app won't crash due to exception of cpp but can crash due to exceptions thrown in java code of the plugin
Reviewed By: jknoxville
Differential Revision: D9848112
fbshipit-source-id: 689ef9240e47400e8ce8c89b4c0ccec43d2180f9
Summary:
Versions of flipper from before 7th August 2018 don't return any response, so we don't store any connection_config.json file.
To keep the functionality the same as with up-to-date app versions, when this happens, store an empty config file ("{}").
Reviewed By: danielbuechele
Differential Revision: D9682885
fbshipit-source-id: fd580f6bba6b6b20135aa2c076be10e1eea0f8bc
Summary: Loading the deviceId is not critical, so if it ever fails, we can live with that by swallowing the exception and using the default (possibly 'unknown' deviceId).
Reviewed By: danielbuechele
Differential Revision: D9682886
fbshipit-source-id: e5d60dd262fce683dd444167edd1475e0c029759
Summary: There's no need for these to be macros.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9555471
fbshipit-source-id: a78d6cdb4ceb1830f749eda50e0e07ebc55723bf
Summary:
SonarWebSocketImpl has got pretty bloated. So I'm extracting all the file interaction out of it into
ConnectionContextStore. The purpose of this class is to provide all the context needed to establish a connection.
This makes SonarWebSocketImpl more functional and therefore testable.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9540089
fbshipit-source-id: 0cd1d69f2b11eaf9f569245a2da14f85cc140427
Summary:
If you use a null eventbase, folly implicitly decides which one to run the futures in, for example
the timekeeper thread.
The only component that passes in event bases is sonar.cpp.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9539443
fbshipit-source-id: 7fd7289257c84b039a7ac00b14f78bb271262480
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:
See https://github.com/facebook/flipper/issues/230 for a longer
explanation.
It turns out that many of the tasks in `native.gradle` (at least
`prepareGlog` which modifies files inside the source directory, but also
others) cause the cmake cache to invalidate.
Because we run those tasks unconditionally, we need to recompile all our
C++ code even when unmodified.
I fix this by adding a manual cache key to this which simply skips all
the tasks unless an up-to-date `external_cache_revision.txt` is found.
This is a bit hacky, but the alternatives are a) convincing cmake that
these modifications are not recompile-worthy which I have no idea how to
do and which might be impossible to do `mtime` on the files touches, or
b) having fine-grained `onlyIf` rules for every task which can easily
break. This seems the most straight-forward option.
Fixes#230.
Pull Request resolved: https://github.com/facebook/flipper/pull/242
Reviewed By: jknoxville
Differential Revision: D9381340
Pulled By: passy
fbshipit-source-id: a7db55aacac4a29076c29298d6c5b97d8bc91f66
Summary: calling SonarClient::instance()->stop() without a connection will try to deref a null client_
Reviewed By: jknoxville
Differential Revision: D9325527
fbshipit-source-id: b0a81d6eb9d1375b74cbf10466f947e8a2de3b98
Summary: It may not be immediately obvious how this works, so adding comments.
Reviewed By: passy
Differential Revision: D9333321
fbshipit-source-id: 79740b3d2a9589b3ba48c47b0068afdaf26f35a3
Summary:
Add a method to add error messages into failed steps. This will be surfaced in the diagnostic screen, to help the user
troubleshoot.
Reviewed By: passy
Differential Revision: D9333322
fbshipit-source-id: 5f1e55c3d71b19292dbc428aaecfbd41e7a75125