When running the sample after creating google-service.json, the app crashes when trying to get database reference in SignInActivity
mDatabase = FirebaseDatabase.getInstance().getReference();
Crash log
05-21 09:27:27.644 488-488/com.google.firebase.quickstart.database D/AndroidRuntime: Shutting down VM
05-21 09:27:27.644 488-488/com.google.firebase.quickstart.database E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.firebase.quickstart.database, PID: 488
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.firebase.quickstart.database/com.google.firebase.quickstart.database.SignInActivity}: com.google.firebase.database.DatabaseException: Failed to get
FirebaseDatabase instance: FirebaseApp object has no DatabaseURL in its FirebaseOptions object.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: com.google.firebase.database.DatabaseException: Failed to get FirebaseDatabase instance: FirebaseApp object has no DatabaseURL in its FirebaseOptions object.
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.quickstart.database.SignInActivity.onCreate(SignInActivity.java:39)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
How to fix this issue ?
Download google-services.json from Project Settings in the Firebase console. My mistake was downloading it from https://developers.google.com/mobile/add.
Changing google-services.json file didn't worked for me
later i found out
that i was using
implementation 'com.google.firebase:firebase-analytics:17.5.0'
implementation 'com.google.firebase:firebase-database:16.0.4'
instead of
implementation 'com.google.firebase:firebase-analytics-ktx:17.5.0'
implementation 'com.google.firebase:firebase-database-ktx:19.4.0'
mFirebaseDatabaseReference = database.getInstance().getReference("root-element in firebase");
When you call getReference you need to provide a URL. If your project is bound already in Firebase with the database you have created, use the root element of the data in Firebase as the parameter to getReference().
Related
I have a problem with app flutter when I integrate firebase_messaging to receive notification in the background
when I debug I get this error :
I/FLTFireBGExecutor(29060): Creating background FlutterEngine instance, with args: [--start-paused, --enable-dart-profiling] W/FlutterEngineCxnRegstry(29060): Attempted to register plugin (io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry$ShimRegistrarAggregate#2549a44) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine#99e972d). E/MethodChannel#(29060): Parameter messenger must not be null. I/BlockMonitor(29060): dispatchingThrewException In MainThread D/AndroidRuntime(29060): Shutting down VM I/QarthLog(29060): [PatchStore] createDisableExceptionQarthFile I/QarthLog(29060): [PatchStore] create disable file for com.dgmsolutions.foolivery uid is 10523 E/AndroidRuntime(29060): FATAL EXCEPTION: main E/AndroidRuntime(29060): java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference E/AndroidRuntime(29060): at io.flutter.plugin.common.MethodChannel.setMethodCallHandler(MethodChannel.java:119) E/AndroidRuntime(29060): at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.initInstance(FlutterFirebaseMessagingPlugin.java:64) E/AndroidRuntime(29060): at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.registerWith(FlutterFirebaseMessagingPlugin.java:58) E/AndroidRuntime(29060): at com.dgmsolutions.foolivery.Application.registerWith(Application.kt:16) E/AndroidRuntime(29060): at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundExecutor.lambda$null$0$FlutterFirebaseMessagingBackgroundExecutor(FlutterFirebaseMessagingBackgroundExecutor.java:206) E/AndroidRuntime(29060): at io.flutter.plugins.firebase.messaging.-$$Lambda$FlutterFirebaseMessagingBackgroundExecutor$e4cdQ2b1x-adsVcO-hA2dn2VM8E.run(Unknown Source:6) E/AndroidRuntime(29060): at android.os.Handler.handleCallback(Handler.java:888) E/AndroidRuntime(29060): at android.os.Handler.dispatchMessage(Handler.java:100) E/AndroidRuntime(29060): at android.os.Looper.loop(Looper.java:213) E/AndroidRuntime(29060): at android.app.ActivityThread.main(ActivityThread.java:8178) E/AndroidRuntime(29060): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(29060): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) E/AndroidRuntime(29060): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101) I/Process (29060): Sending signal. PID: 29060 SIG: 9 Lost connection to device.
my code (in the picture)
main class
application.kt
manifest.xml
notification class
Since you're running Flutter 2.0.1, you only need to configure the Flutter part of the firebase messaging plugin, and add your google-services.json files.
Read carefully the official documentation and you'll fix your problem :)
If you need a sample project showcasing how to implement the Firebase Notifications, you can take a look at this one
I am been trying to implement multiple transactions to the same document in flutter application which is using firestore as a its database, but it is crashing the application. The same thing when it was implemented in native apps of Xcode or android studio this issue didn't occur for even once.
Is there any guide how to make multiple transactions successful in flutter firestore.
For Instance, if more than 1 user from different devices is making the transaction to the same document at the same time, the transaction fails and the app crashes.
How could this be resolved?
Firestore.instance.runTransaction((Transaction tx) async {
DocumentSnapshot postSnapshot = await tx.get(docRef);
if (postSnapshot.exists) {
await tx.update(docRef, <String, dynamic>{'likes': postSnapshot.data['likes'] + 1});
// print("transaction completed");
}
})
ERROR LOGS
2020-05-27 18:43:14.529 1022-1344/dev.jideguru.social_app_ui
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4 Process:
dev.jideguru.social_app_ui, PID: 1022 java.lang.RuntimeException: An
error occurred while executing doInBackground() at
android.os.AsyncTask$3.done(AsyncTask.java:353) at
java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764) Caused by:
java.lang.AssertionError: INTERNAL ASSERTION FAILED: A transaction
object cannot be used after its update callback has been invoked. at
com.google.firebase.firestore.util.Assert.fail(com.google.firebase:firebase-firestore##21.3.0:46)
at
com.google.firebase.firestore.util.Assert.hardAssert(com.google.firebase:firebase-firestore##21.3.0:31)
at
com.google.firebase.firestore.core.Transaction.ensureCommitNotCalled(com.google.firebase:firebase-firestore##21.3.0:246)
at
com.google.firebase.firestore.core.Transaction.lookup(com.google.firebase:firebase-firestore##21.3.0:81)
at
com.google.firebase.firestore.Transaction.getAsync(com.google.firebase:firebase-firestore##21.3.0:191)
at
com.google.firebase.firestore.Transaction.get(com.google.firebase:firebase-firestore##21.3.0:228)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:613)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:608)
at android.os.AsyncTask$2.call(AsyncTask.java:333) at
java.util.concurrent.FutureTask.run(FutureTask.java:266) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764) 2020-05-27 18:43:14.529
1022-1346/dev.jideguru.social_app_ui E/AndroidRuntime: FATAL
EXCEPTION: AsyncTask #6 Process: dev.jideguru.social_app_ui, PID: 1022
java.lang.RuntimeException: An error occurred while executing
doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:353) at
java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764) Caused by:
java.lang.AssertionError: INTERNAL ASSERTION FAILED: A transaction
object cannot be used after its update callback has been invoked. at
com.google.firebase.firestore.util.Assert.fail(com.google.firebase:firebase-firestore##21.3.0:46)
at
com.google.firebase.firestore.util.Assert.hardAssert(com.google.firebase:firebase-firestore##21.3.0:31)
at
com.google.firebase.firestore.core.Transaction.ensureCommitNotCalled(com.google.firebase:firebase-firestore##21.3.0:246)
at
com.google.firebase.firestore.core.Transaction.lookup(com.google.firebase:firebase-firestore##21.3.0:81)
at
com.google.firebase.firestore.Transaction.getAsync(com.google.firebase:firebase-firestore##21.3.0:191)
at
com.google.firebase.firestore.Transaction.get(com.google.firebase:firebase-firestore##21.3.0:228)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:613)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:608)
at android.os.AsyncTask$2.call(AsyncTask.java:333) at
java.util.concurrent.FutureTask.run(FutureTask.java:266) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Link To the Issue
Caused by: java.lang.AssertionError: INTERNAL ASSERTION FAILED: A transaction object cannot be used after its update callback has been invoked.
It looks like the transaction is being used after it's been committed/canceled.
This is a known issue in the FlutterFire library, as recorded in this issue on the open-source repo.
There is a workaround mentioned in this comment. So you can either try to apply that to your case, propose a PR that fixes the bug, or wait until somebody else fixes it.
I am working on project where the requirement is to get detailed stack trace where the crash has occurred in the native code. Earlier I was using Fabrics Crashlytics to report crashes where NDK crash report support was not added. Now since Fabrics Crashlytics has migrated to Firebase Crashlytics I have also migrated my project to firebase crashlytics and Application crash reporting is working fine. I further intend to provide Firebase Crashlytics with NDK crash reporting. I'm migrating to Firebase Crashlytics SDK Beta version for which the documentation is given in the below link.
https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android
I have executed the assemble task and it shows BUILD SUCCESS
gradle app:assembleDebug
The issue occurs in below task
gradle app:uploadCrashlyticsSymbolFileDebug
I get the following exception in the stack trace
java.io.IOException: com.google.firebase.crashlytics.buildtools.exception.CrashlyticsOrgIdException: Could not fetch Crashlytics Org Id
Below is the stacktrace for Exception
> Task :app:uploadCrashlyticsSymbolFileDebug FAILED
Exception parsing response from server
Unexpected character (<) at position 0.
at com.google.firebase.crashlytics.reloc.org.json.simple.parser.Yylex.yylex(Unknown Source)
at com.google.firebase.crashlytics.reloc.org.json.simple.parser.JSONParser.nextToken(Unknown Source)
at com.google.firebase.crashlytics.reloc.org.json.simple.parser.JSONParser.parse(Unknown Source)
at com.google.firebase.crashlytics.reloc.org.json.simple.parser.JSONParser.parse(Unknown Source)
at com.google.firebase.crashlytics.reloc.org.json.simple.JSONValue.parseWithException(Unknown Source)
at com.google.firebase.crashlytics.buildtools.api.RestfulWebApi.jsonFromResponse(RestfulWebApi.java:315)
at com.google.firebase.crashlytics.buildtools.api.RestfulWebApi.requestJSONResponse(RestfulWebApi.java:299)
at com.google.firebase.crashlytics.buildtools.api.RestfulWebApi.requestCrashlyticsSettings(RestfulWebApi.java:223)
at com.google.firebase.crashlytics.buildtools.api.SettingsOrgIdProvider.fetchSynchronously(SettingsOrgIdProvider.java:40)
at com.google.firebase.crashlytics.buildtools.api.SettingsOrgIdProvider.fetchCrashlyticsOrgId(SettingsOrgIdProvider.java:27)
at com.google.firebase.crashlytics.buildtools.api.FirebaseCodeMappingService.fetchOrgId(FirebaseCodeMappingService.java:55)
at com.google.firebase.crashlytics.buildtools.api.FirebaseCodeMappingService.uploadNativeSymbolFile(FirebaseCodeMappingService.java:124)
at com.google.firebase.crashlytics.buildtools.Buildtools.uploadNativeSymbolFiles(Buildtools.java:173)
at com.google.firebase.crashlytics.buildtools.Buildtools$uploadNativeSymbolFiles$5.call(Unknown Source)
at com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadSymbolFileTask.uploadSymbolFile(UploadSymbolFileTask.groovy:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:48)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:702)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:669)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$5.run(ExecuteActionsTaskExecuter.java:401)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:390)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:373)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:79)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:210)
at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33)
at java.util.Optional.orElseGet(Optional.java:267)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58)
at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33)
at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39)
at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)
at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)
at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:201)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)
at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
at java.util.Optional.map(Optional.java:215)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:77)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:117)
at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:75)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
FAILURE: Build failed with an exception.
It would really be great if anyone could help me out with this issue.
Note I have visited the following stackoverflow posts none of them seem to
solve my issue-:
New build type fails with error: CrashlyticsOrgIdException: Could not fetch Crashlytics Org Id
Build failed with CrashlyticsOrgIdException
I'm seeing bunch of crashes inside Crashlitics which are coming from most recent Firebase 15.0.0 on attempt to get FirebaseRemoteConfig
Caused by java.lang.NullPointerException
Attempt to invoke virtual method 'void com.google.android.gms.internal.config.zzar.zzc(long)' on a null object reference
com.google.firebase.remoteconfig.FirebaseRemoteConfig. (Unknown Source)
com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance (Unknown Source)
com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance (Unknown Source)
FirebaseRemoteConfig.getInstance is called during Application.onCreate and it worked fine on all previous versions.
Build:
implementation "com.google.firebase:firebase-config:15.0.0"
classpath 'com.google.gms:google-services:3.2.1'
Does anyone see it? Any solutions or workarounds?
P.S. I've sent bug report to firebase team via https://firebase.google.com/support/contact/bugs-features/
https://github.com/firebase/quickstart-android/issues/474
According to https://github.com/firebase/quickstart-android/issues/474 is't fixed with 15.0.2 update to Firebase RemoteConfig
This issue have been reported for > 1yr ago, and since this is the "official" medium for developers to comment issues I want to move forward
https://code.google.com/p/analytics-issues/issues/detail?id=667
Fatal Exception: java.lang.RuntimeException: Unable to start service com.google.android.gms.analytics.AnalyticsService#1f707e41 with null: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3334)
at android.app.ActivityThread.access$2200(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference
at com.google.android.gms.analytics.AnalyticsService.onStartCommand(Unknown Source)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3317)
at android.app.ActivityThread.access$2200(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Any solutions?
We are currently using latest google play services