Thursday, May 5, 2016

Fabric annoyances

For a side project I was tasked with integrating services from the Twitter owned Fabric.io kits into the Android application.

This proved to be very annoying.

Fabric is (to my understanding) designed so that once you provide your API key/ Twitter secret, your application will use the Internet permission to contact the Fabric servers and let the backend know that your organization has created a new application that uses Fabric services.

This is, in theory, very easy. And in fact, the first time around it was. Add keys, build, run, bing bam done deal-o.

The problem arose when migrating an application from one Fabric "organization" to another Fabric "organization." For single developers like myself, an organization is Fabric is akin to "your account."

All one has to do to migrate over was to change API keys, and rebuild. Magically things should work.

Realistically things did not, at least not at first. And for that I blame myself.

I develop using Android Studio inside of a firejail sandbox for various paranoid reasons. This sandbox is the only piece of my machine which is set up with the Java and Android SDKs, and is (hopefully) secured. It runs in a separate IPC namespace, and a separate network namespace with no access to the root account or any privilege beyond running the Java compiler and the Android emulators which are not given network access, except across a single network bridge.

But Fabric, for whatever reason, does not like this.

So fine, un-sandbox the Android Studio instance JUST to register a new application onto Fabric.

Not quite.

My development device is using NetGuard, the beautiful no-root firewall (and ad blocker) which creates a transparent VPN and blah blah on my device.

Fabric does not like this either.

After a couple minutes of Googling and fiddling around with networks on my machine and device, Fabric springs to life and complains about API keys.

Wonderful! Now its no longer a "generic" issue, its a Fabric issue. Those can be fixed with Fabric documentation and sweat and blood.

In summary, Crashlytics and Digits do not like network proxies.

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my FaceBook Page
Follow my Google+ Page
=========================