Android: CrashlyticsMissingDependencyException on application startup - google-fabric

We are trying to integrate Crashlytics into our android-application (armeabi-v7a). The application is written in both Java and C++, so we need native crash reporting too.
Unfortunately, we have com.crashlytics.android.core.CrashlyticsMissingDependencyException while launching a successful built application.
06-19 18:22:47.245 : ASSERTION (EXCEPTION!!!) JavaUnhandledExceptionHandler, thread: Thread[main,5,main]
06-19 18:22:47.247 : java.lang.RuntimeException: Unable to start activity ComponentInfo{com.organization/com.organization.ActivityName}: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: com.crashlytics.android.core.CrashlyticsMissingDependencyException:
06-19 18:22:47.247 : This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
06-19 18:22:47.247 : install an Android build tool and ask a team member to invite you to this app's organization.
06-19 18:22:47.247 :
06-19 18:22:47.247 : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
06-19 18:22:47.247 : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
06-19 18:22:47.247 : at android.app.ActivityThread.-wrap12(ActivityThread.java)
06-19 18:22:47.247 : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
06-19 18:22:47.247 : at android.os.Handler.dispatchMessage(Handler.java:102)
06-19 18:22:47.247 : at android.os.Looper.loop(Looper.java:154)
06-19 18:22:47.247 : at android.app.ActivityThread.main(ActivityThread.java:6119)
06-19 18:22:47.247 : at java.lang.reflect.Method.invoke(Native Method)
06-19 18:22:47.247 : at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
06-19 18:22:47.247 : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
06-19 18:22:47.247 : Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: com.crashlytics.android.core.CrashlyticsMissingDependencyException:
06-19 18:22:47.247 : This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
06-19 18:22:47.247 : install an Android build tool and ask a team member to invite you to this app's organization.
Neither debug nor release have run. Could you please provide us more detailed installation guide to solve the issue? All the installation steps were performed in accordance with the docs pages:
https://fabric.io/downloads/ant
https://docs.fabric.io/android/crashlytics
Build system: Android Ant
OS: Mac OS X El Capitan
Android API: 23
The project structure is assumed to be as follows:
AndroidManifest.xml
ant.properties
assets/
bin/
build.xml
cert/
custom_rules.xml
fabric.credentials
fabric.properties
kit-libs/
kits.properties
libs/
local.properties
obj/
project.properties
res/
Fabric related settings:
AndroidManifest.xml:
<meta-data android:name="com.crashlytics.ApiKey" android:value=organizationApiSecret/>
<meta-data android:name="io.fabric.ApiKey" android:value=organizationApiKey/>
custom_rules.xml:
<import file="path/to/sdk/crashlytics/crashlytics_build.xml"/>
kits.properties (generated):
com.crashlytics.sdk.android:crashlytics:2.5.5
com.crashlytics.sdk.android:crashlytics-ndk:1.1.2
project.properties (generated):
manifestmerger.enabled=true
target=android-23
android.library.reference.2=kit-libs/com-crashlytics-sdk-android_crashlytics
fabric.properties:
apiSecret=organizationApiSecret
apiKey=organizationApiKey
enableNDK=true
androidNdkOut=obj
androidNdkLibsOut=libs
Installation steps:
compile c++
ant crashlytics-onboard
removing unwanted architectures: kit-libs/com-crashlytics-sdk-android_crashlytics-ndk/libs/
ant our_target
ant crashlytics-symbols

Related

Error while Debugging application on Windows OS or Android

I'am having a problem with JS Debugger on Windows or Android, when I debug the app crashes. Every time I try to reopen it, the app crashes. This is my log cat:
2019-02-04 12:48:27.135 26780-26833/com.cmcj E/AndroidRuntime: FATAL EXCEPTION: mqt_js
Process: com.cmcj, PID: 26780
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/FirebaseApp;
at io.invertase.firebase.RNFirebaseModule.getConstants(RNFirebaseModule.java:158)
at com.facebook.react.bridge.JavaModuleWrapper.getConstants(JavaModuleWrapper.java:138)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.FirebaseApp" on path: DexPathList[[zip file "/data/app/com.cmcj-1/base.apk"],nativeLibraryDirectories=[/data/app/com.cmcj-1/lib/arm, /data/app/com.cmcj-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at io.invertase.firebase.RNFirebaseModule.getConstants(RNFirebaseModule.java:158) 
at com.facebook.react.bridge.JavaModuleWrapper.getConstants(JavaModuleWrapper.java:138) 
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
at android.os.Handler.handleCallback(Handler.java:751) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29) 
at android.os.Looper.loop(Looper.java:154) 
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192) 
at java.lang.Thread.run(Thread.java:761) 
It does look like the linking went wrong after linking firebase. You need to make sure that everything is in place in MainApplication (especially the namespaces from where classes are taken).

Cannot deploy Java Adapter on IBM MobileFirst Platform 8.0

We have a java adapter that we are trying to deploy in IBM BFP 8.0. See error stack trace below:
[ERROR] logger.changeStateDeploymentException: FWLSE0321: State change failure. Caused by: java.lang.RuntimeException: User code thrown exception: java.lang.NoSuchMethodError: org/apache/http/impl/conn/CPool.setValidateAfterInactivity(I)V at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:181) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:163) at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:973) at org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:56) at com.mypackage.adapter.XYZJavaAdapterResource.init(XYZJavaAdapterResource.java:52) at com.mypackage.adapter.XYZJavaAdapterApplication.init(XYZJavaAdapterApplication.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56) at java.lang.reflect.Method.invoke(Method.java:620) at
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.531 s
[INFO] Finished at: 2018-10-05T18:28:03+08:00
[INFO] Final Memory: 10M/204M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2018082311:deploy (default-cli) on project com.mypackage.XYZJavaAdapter: Unexpected response from http://somehost:9080/mfpadmin/management-apis/2.0/runtimes/mfp/adapters -> [Help 1]
MFP version:
Name: IBM MobileFirst Platform Server
Installation directory: /opt/IBM/MFPDEVENV/MobileFirst_Platform_Server
Translations: English (en)
Architecture: 64-bit
[Package]
Name: IBM® MobileFirst Platform Server (com.ibm.mobilefirst.foundation.server)
Version: 8.0.0.20170220_1811 (8.0.0.20170220_1811)
CLI VERSION:
MobileFirst Platform Foundation Command Line Interface (CLI): 8.0.0-2018040312
MFP console log: see below
Caused by: java.lang.RuntimeException: User code thrown exception: java.lang.NoSuchMethodError: org/apache/http/impl/conn/CPool.setValidateAfterInactivity(I)V
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:181)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:163)
at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:973)
at org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:56)
[10/26/18 8:36:24:686 HKT] 00013f2d .worklight.admin.configservice.datastore.ConfigServiceClient E Unable to delete configuration with id ADAPTER_CONTENT due to exception FWLSE3208E: An invalid status code "404" was returned. The response content is "{"reason":"configuration_not_found","details":"CNFSRVE115: configuration with id 'ADAPTER_CONTENT' for schema 'mfp_default_schema' with version '1.0' not found"}"
Can anyone help us on how to solve this issue?
Thanks in advance

Updating gradle version from 2.2.3 to 3.0.1 breaks react-native-mailcore library

I build react-native-mailcore example app successfully, which uses native mailcore2. When i update gradle version from 2.2.3 to 3.0.1, build succeeds, but in the runtime,when code:
SMTPSession smtpSession = new SMTPSession();
is called, the following error is occurred:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZSt24__throw_out_of_range_fmtPKcz" referenced by "/data/app/com.inkotrack-2/lib/x86/libMailCore.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.libmailcore.MainThreadUtils.(MainThreadUtils.java:19)
at com.libmailcore.MainThreadUtils.(MainThreadUtils.java:9)
at com.libmailcore.MainThreadUtils.singleton(MainThreadUtils.java:14)
at com.libmailcore.NativeObject.(NativeObject.java:42)
at com.reactlibrary.RNMailCoreModule$1.run(RNMailCoreModule.java:41)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

React Native Android - "Could not get BatchedBridge, make sure your bundle is packaged properly"

Running on Android - I can no longer get my app to build. I've tried 15+ ideas on stack overflow with similar batchedbridge errors'.
Results - after packaging:
- Red error screen popups up with "Could not get BatchedBridge, make sure your bundle is packaged properly” (with no other callstack details) and then a second later get a blank white screen.
Results - after the error and then reloading from the app dev tools menu:
- Could not connect to development server
react-native version 0.40.0 npm=5.0.3 node=v7.4.0
The app was working previously for months so i'm guessing connected to a recent change, version problem, cache problem, npm version or reactnative version?
Tried adb reverse tcp:8081 tcp:8081
Tried npm cache clean
Tried on emulator and device - same issue
Tried closing all react packagers
Made sure no other react native apps/packagers running
Android app is building OK in Android Studio (without react native)
Looking in the logcat I seem some red flags but not sure if these problems are new or were previously there:
- Lots of 'ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.???????' etc
- React: The packager does not seem to be running as we got an IOException requesting its status: Connection reset
Here's the logcat snippet and stack trace from the app when it tries to start - if you need more of the logcat let me know (my attempt to add it here didn't work).
iceapp.challengeme ic=null D/FA: Connected to remote service W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.reactnative.androidsdk.FBLoginButtonManager V/FA: Processing queued up service tasks: 2 W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.reactnative.androidsdk.FBSendButtonManager W/art: Before Android 4.1, method boolean com.facebook.share.widget.ShareButtonBase.canShare() would have incorrectly overridden the package-private method in android.widget.TextView W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.reactnative.androidsdk.FBShareButtonManager
E/unknown:React: Exception in native call from JS
com.facebook.react.devsupport.JSException: Could not get BatchedBridge, make sure your bundle is packaged correctly
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:762)
Caused by: com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
at android.os.Handler.handleCallback(Handler.java:751) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
at android.os.Looper.loop(Looper.java:154) 
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
at java.lang.Thread.run(Thread.java:762)  W/unknown:React: Packager connection already open, nooping. W/unknown:React: Inspector connection already open, nooping. E/unknown:React: Exception in native call
java.lang.RuntimeException: Error calling function: RCTDeviceEventEmitter:emit
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:762)
Caused by: java.lang.RuntimeException: Empty Optional cannot be unwrapped
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
at android.os.Handler.handleCallback(Handler.java:751) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
at android.os.Looper.loop(Looper.java:154) 
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
at java.lang.Thread.run(Thread.java:762)  E/unknown:React: Exception in native call
java.lang.RuntimeException: Error calling function: AppRegistry:runApplication
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:762)
Caused by: java.lang.RuntimeException: Empty Optional cannot be unwrapped
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
at android.os.Handler.handleCallback(Handler.java:751) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
at android.os.Looper.loop(Looper.java:154) 
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
at java.lang.Thread.run(Thread.java:762) 

java.lang.IllegalAccessError on launch of react native activity in release mode

I have added one React Native screen to my existing android project.
Copying the proguard settings related to react native from
https://github.com/facebook/react-native/blob/master/local-cli/generator-android/templates/src/app/proguard-rules.pro WORKS.
However I want to enable obfuscation for my project and hence commented out the line -dontobfuscate
After this, when I deploy the release build in my nexus device, I get this error :
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
Process: com.sampleapp, PID: 2463
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.net.ConnectivityManagerCompat.<init>()' is inaccessible to class 'com.facebook.react.modules.netinfo.NetInfoModule' (declaration of 'com.facebook.react.modules.netinfo.NetInfoModule' appears in /data/app/com.sampleapp-1/base.apk)
at com.facebook.react.modules.netinfo.NetInfoModule.<init>(NetInfoModule.java:55)
at com.facebook.react.shell.MainReactPackage.createNativeModules(MainReactPackage.java:67)
at com.facebook.react.ReactInstanceManagerImpl.processPackage(ReactInstanceManagerImpl.java:793)
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:730)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:5091)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:169)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
This link does mention obfuscation isn't supported in React-Native:
https://github.com/facebook/react-native/issues/7530
I want to obfuscate existing app code.