web-dev-qa-db-fra.com

Crashlytics n'a pas pu trouver le manifeste

Le kit de développement logiciel Fabric (pour Android) échoue par intermittence dans les générations avec l'erreur suivante:

ERROR - Crashlytics Developer Tools error.
com.crashlytics.tools.Android.project.ManifestData$ManifestIOException: Crashlytics could not find the manifest. Not found at /Users/Shared/Jenkins/Home/workspace/my_project@2/true
    at com.crashlytics.tools.Android.project.ManifestFileProvider.getManifestStream(ManifestFileProvider.Java:32)
    at com.crashlytics.tools.Android.project.DefaultManifestData.createManifest(DefaultManifestData.Java:124)
...

Il n'y a aucun modèle apparent pour savoir quand il échouera ou non à la génération, donc tout indice pour déboguer ce problème vraiment irritant serait apprécié.

/Users/Shared/Jenkins/Home/workspace/my_project@2/true

... ne ressemble pas au chemin vers un manifeste, imo, mais je ne sais pas pourquoi il y ressemblerait.

Modifier pour ajouter: voici une trace de pile plus complète pour une autre version. pull_request_build est le nom du travail Jenkins; c'est légitimement le répertoire racine du projet.

15:41:46 ERROR - Crashlytics Developer Tools error.
15:41:46 com.crashlytics.tools.Android.project.ManifestData$ManifestIOException: Crashlytics could not find the manifest. Not found at /Users/Shared/Jenkins/Home/workspace/pull_request_build@2/true
15:41:46    at com.crashlytics.tools.Android.project.ManifestFileProvider.getManifestStream(ManifestFileProvider.Java:32)
15:41:46    at com.crashlytics.tools.Android.project.DefaultManifestData.createManifest(DefaultManifestData.Java:124)
15:41:46    at com.crashlytics.tools.Android.project.StandardAndroidProjectFactory.createTypedProject(StandardAndroidProjectFactory.Java:176)
15:41:46    at com.crashlytics.tools.Android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.Java:118)
15:41:46    at com.crashlytics.tools.Android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.Java:93)
15:41:46    at com.crashlytics.tools.Android.DeveloperTools.processProperties(DeveloperTools.Java:483)
15:41:46    at com.crashlytics.tools.Android.DeveloperTools.processArgsInternal(DeveloperTools.Java:348)
15:41:46    at com.crashlytics.tools.Android.DeveloperTools.gradleMain(DeveloperTools.Java:292)
15:41:46    at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:41:46    at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
15:41:46    at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
15:41:46    at Java.lang.reflect.Method.invoke(Method.Java:498)
15:41:46    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.Java:93)
15:41:46    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.Java:325)
15:41:46    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.Java:46)
15:41:46    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.Java:91)
15:41:46    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.Java:125)
15:41:46    at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy:330)
15:41:46    at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.this$2$callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy)
15:41:46    at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:41:46    at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
15:41:46    at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
15:41:46    at Java.lang.reflect.Method.invoke(Method.Java:498)
15:41:46    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.Java:93)
15:41:46    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.Java:325)
15:41:46    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.Java:384)
15:41:46    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.Java:1022)
15:41:46    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.Java:69)
15:41:46    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.Java:166)
15:41:46    at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder$_pluginGenerateResources_closure4.doCall(FabricTaskBuilder.groovy:129)
15:41:46    at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:41:46    at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
15:41:46    at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
15:41:46    at Java.lang.reflect.Method.invoke(Method.Java:498)
15:41:46    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.Java:93)
15:41:46    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.Java:325)
15:41:46    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.Java:294)
15:41:46    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.Java:1022)
15:41:46    at groovy.lang.Closure.call(Closure.Java:414)
15:41:46    at groovy.lang.Closure.call(Closure.Java:430)
15:41:46    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.Java:681)
15:41:46    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.Java:656)
15:41:46    at org.gradle.api.internal.tasks.TaskMutator$LeftShiftTaskAction.execute(TaskMutator.Java:107)
15:41:46    at org.gradle.api.internal.tasks.TaskMutator$LeftShiftTaskAction.execute(TaskMutator.Java:96)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.Java:122)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:336)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:328)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.Java:197)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:107)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.Java:111)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.Java:92)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.Java:70)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.Java:63)
15:41:46    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.Java:54)
15:41:46    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.Java:58)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.Java:88)
15:41:46    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.Java:52)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.Java:52)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.Java:54)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.Java:43)
15:41:46    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.Java:34)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.Java:248)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:336)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:328)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.Java:197)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:107)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:241)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:230)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.Java:124)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.Java:80)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.Java:105)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.Java:99)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.Java:625)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.Java:580)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.Java:99)
15:41:46    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.Java:63)
15:41:46    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.Java:46)
15:41:46    at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1149)
15:41:46    at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:624)
15:41:46    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.Java:55)
15:41:46    at Java.lang.Thread.run(Thread.Java:748)
20
Turnsole

Nous avons également constaté des erreurs de construction similaires dans quelques modules de notre projet multi-modules. Parfois, il se manifestait par ManifestIOException: Crashlytics could not find the manifest, D'autres fois par une déclaration d'utilisation suivie de NullPointerException dans com.crashlytics.tools.utils.PropertiesUtils.getProperties().

Les deux modules concernés étaient des modules de bibliothèque où l'application et son module de bibliothèque utilisaient Crashlytics. Nous avons corrigé l'erreur comme suit:

  1. Déplacez la ligne suivante de la bibliothèque build.gradle vers l'application build.gradle:

    apply plugin: 'io.fabric'

  2. Déplacez les blocs crashlytics de la bibliothèque build.gradle vers l'application build.gradle:

    crashlytics { enableNdk true }

Nous avons laissé les dépendances de Crashlytics intactes dans le module d'application et de bibliothèque, seul le plugin a été déplacé. Il semble que Crashlytics n'aime pas être intégré dans les modules de bibliothèque pour une raison quelconque et s'en plaindra au moment de la compilation, il est donc préférable d'intégrer Crashlytics dans votre module d'application et d'ajouter simplement les dépendances à la bibliothèque si votre bibliothèque doit faire quelque chose avec Crashlytics.

29
mbonness