Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downloadTranslations tries to download everything again and fails #2

Open
davidvavra opened this issue Oct 12, 2014 · 6 comments
Open

Comments

@davidvavra
Copy link

Hi, I updated to v1.1 of the plugin and the previous problem on Windows is solved. But it fails at the end for a different reason. Stacktrace:

Executing tasks: [downloadTranslations]

Configuration on demand is an incubating feature.
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
:app:downloadTranslations
Dowloading 'cs-CZ', progress 100.0%
Dowloading 'de', progress 100.0%
Dowloading 'es', progress 100.0%
Dowloading 'fr', progress 100.0%
Dowloading 'sk-SK', progress 96.0%
Dowloading 'tr-TR', progress 94.0%
Dowloading 'ca-AD', progress 100.0%
Dowloading 'pt-BR', progress 96.0%
Dowloading 'fi', progress 71.0%
Dowloading 'sv', progress 100.0%
Dowloading 'it', progress 100.0%
Dowloading 'nl-BE', progress 100.0%
Dowloading 'pt-PT', progress 97.0%
Dowloading 'nl', progress 100.0%
Dowloading 'es-419', progress 97.0%
Dowloading 'da', progress 100.0%
Dowloading 'pl-PL', progress 100.0%
Dowloading 'ru', progress 84.0%
Dowloading 'grk', progress 100.0%
Dowloading 'hu-HU', progress 93.0%
Dowloading 'vi', progress 93.0%
Dowloading 'en', progress 100.0%
Dowloading 'no', progress 90.0%
Dowloading 'bg-BG', progress 93.0%
Dowloading 'lt', progress 95.0%
Dowloading 'cs-CZ', progress 100.0%

[Fatal Error] :1:1: Content is not allowed in prolog.

:app:downloadTranslations FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:downloadTranslations'.

    org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 22.493 secs

@flabbamann
Copy link

I get the same "Content is not allowed in prolog" error at the end. The downloaded language files are there, and seem to be OK, but the task does not finish successfully.
I checked the files I uploaded to getlocalization, and the translated files they provide, there are no characters before the prolog:

so I think this is some sort of encoding-problem.

Im on Windows7 64Bit using Android Studio 0.8.12 64Bit

@davidvavra
Copy link
Author

@johnuopini Any updates?

@johnuopini
Copy link
Owner

Can you post a stacktrace? I have no way to reproduce this

@baole
Copy link

baole commented Apr 22, 2015

Stacktrack running on MacOS

gradle downloadTranslations --stacktrace
Parallel execution is an incubating feature.
:boosterapp:downloadTranslations
Dowloading 'fr', progress 67%
Dowloading 'vi', progress 75%
Dowloading 'id', progress 75%
Dowloading 'cs-CZ', progress 75%
Dowloading 'tr-TR', progress 56%
Dowloading 'ja-JP', progress 99%
Dowloading 'es', progress 64%
Dowloading 'de', progress 75%
Dowloading 'ru', progress 75%
Dowloading 'nl', progress 59%
Dowloading 'sr', progress 75%
Dowloading 'it', progress 75%
Dowloading 'es-419', progress 63%
Dowloading 'pl-PL', progress 60%
Dowloading 'ar', progress 75%
Dowloading 'pt-PT', progress 63%
Dowloading 'zh-CN', progress 75%
Dowloading 'ko', progress 65%
Dowloading 'hu-HU', progress 73%
Dowloading 'uk', progress 67%
Dowloading 'vi', progress 100%
[Fatal Error] :1:1: Content is not allowed in prolog.
:boosterapp:downloadTranslations FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':boosterapp:downloadTranslations'.

    org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':boosterapp:downloadTranslations'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.ParallelTaskPlanExecutor.process(ParallelTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
    Caused by: org.gradle.internal.UncheckedException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
    at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:66)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 54 more
    Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1236)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:628)
    at org.zooper.gradle.GetLocalizationDownloadTask.downloadTranslation(GetLocalizationDownloadTask.groovy:49)
    at org.zooper.gradle.GetLocalizationDownloadTask$_dowloadTranslations_closure1.doCall(GetLocalizationDownloadTask.groovy:28)
    at org.zooper.gradle.GetLocalizationDownloadTask.dowloadTranslations(GetLocalizationDownloadTask.groovy:23)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
    ... 61 more

BUILD FAILED

Total time: 1 mins 50.798 secs

@davidvavra
Copy link
Author

I have encountered the same problem today with the latest version. It's project-specific. The plugin works fine for my other project, but not for this one. I'm using the same build environment for both.

@davidvavra
Copy link
Author

This library seems unmaintained so I released my fork to jcenter() which fixes this issue.

https://github.com/step-up-labs/gradle-getlocalization-plugin

You can add it by:

repositories {
    jcenter()
}
dependencies {
    classpath 'io.stepuplabs.getlocalization.gradle:gradle-getlocalization-plugin:1.2.1'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants