Question: Enabling Flipper for non debuggable release builds
See original GitHub issueHi!
The QA team in my company regularly used Stetho in internal dogfood builds distributed through the play store. But we have tried to replicate the setup with Flipper and we weren’t able: the library would work fine, but the desktop app would refuse to communicate with an app not in debuggable mode.
04-28 11:10:38.763 17157 17292 I flipper : flipper: Desktop failed to provide certificates. Error from flipper desktop:
04-28 11:10:38.763 17157 17292 I flipper : Android app com.myapp is not debuggable. To use it with Flipper, add android:debuggable="true" to the application section of AndroidManifest.xml
By being distributed internally through the play store, we cannot use debuggable builds. Is there any way that check could be disabled so that we can run Flipper for our internal dogfood release builds?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Adding Flipper to Android apps with Gradle
To set up Flipper for Android, you need to add the necessary dependencies to your app, initialize the Flipper client and enable the...
Read more >Using Flipper - Expo Documentation
Flipper is a platform for debugging React Native projects running on an emulator/simulator or a physical device. It supports projects running on Android...
Read more >Debugging React Native apps with Flipper - LogRocket Blog
Learn how to debug your React Native app using Flipper, one of the best and simplest debuggers available today.
Read more >How can I make react native debugger my default on ios
Turns out I needed to disable Hermes (which I had previously enabled so I could debug properly with Flipper) android/app/build.gradle ...
Read more >Flipper: React Native App Debugging - Heartbeat - Comet ML
Shared preferences allow us to handle an app's preferences from Flipper without navigating around other menus and/or code. These preferences include features ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Provided I’m not forgetting anything, it would just work and you wouldn’t need to change any desktop code.
You could test this fairly easily by doing the following:
com.facebook.flipper.sample
with your apps package):./scripts/debugging/android_sonar_dir.sh ls com.facebook.flipper.sample
will list the files you need. Do this while the app is successfully connected to flipper to ensure you’re copying a working set of files../scripts/debugging/android_sonar_dir.sh pull com.facebook.flipper.sample app.csr app.csr
will pull a single file. Do this for each file listed by the previous command.files/sonar/
before it starts the flipper client, then it should bypass the certificate exchange (and thus bypass the need to be debuggable) and connect straight to your desktop app.Things you need to know:
~/.flipper/certs/
) will all need to accept that client, so you’ll have to take care of securely deploying them to your testers computers, rather than letting flipper generate them itself.Hi @mrmans0n,
passy is right, it’s a requirement for the
adb run-as
command which we use to secure the connection. This prevents other apps or websites from being able to connect to your app.If you don’t want to root, an option would be to manage your own server and client certificates, instead of letting flipper manage them for you automatically. Right now flipper desktop creates self-signed certs in
~/.flipper/certs
, and it also writes a client cert intofiles/sonar
within the mobile apps data partition.If you deployed the contents of those files to desktops before flipper runs, and also into your mobile app (it could write them on startup before starting the flipper client) then that would work, but bear in mind that anyone in possession of the app files (
~/.flipper/certs
) will be able to connect to your app.There’s one more option, if you can test on rooted devices or emulators. It should be possible to make Flipper work even on non-debuggable apps, because we could use
su
instead ofrun-as
, like was done for non-application use cases in f4b0898de540c95457abe783f03e866c5d846468 but this would require some more involved changes in the desktop app code.