Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipeline crashes with token recognition at ...

Eren Alpaslan April 25, 2023

I have a pipeline to build and distribute an android application. Previously i was getting success with the same bitbucket.yaml configuration but then it returns error to me. When it comes to the '''kaptReleaseKotlin''' task it is giving this error

```
> Task :app:kaptReleaseKotlin

110
line 1:30 token recognition error at: ''??'
111
line 1:34 token recognition error at: '''
112
line 1:94 token recognition error at: ''??'
113
line 1:98 token recognition error at: '''
114
line 1:57 token recognition error at: ''??'
115
line 1:61 token recognition error at: '''
116
line 1:52 token recognition error at: ''??'
117
line 1:56 token recognition error at: '''
118
line 1:100 token recognition error at: ''??'
119
line 1:104 token recognition error at: '''
```

First error message is
> Task :app:kaptReleaseKotlin FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:kaptReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
> java.lang.reflect.InvocationTargetException (no error message)


And second one is
2: Task failed with an exception.
-----------
* What went wrong:
Configuration cache problems found in this build.
1 problem was found storing the configuration cache.
- Task `:app:collectReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.

Previously i didn't get these error

3 answers

1 accepted

0 votes
Answer accepted
Eren Alpaslan May 3, 2023

Adding -Dfile.encoding\=UTF-8 argument to jvmargs in gradle.properties solved my issue

org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\="-Xmx1024M" -Dfile.encoding\=UTF-8

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2023

Hi @Eren Alpaslan and welcome to the community.

There are many possible causes for errors on builds that were previously successful, like changes in your code, changes in the Docker image used as a build container, third-party dependency changes.

You can check the following guide, specifically "Scenario 1: Builds were successful earlier, but started failing recently", for steps on how to troubleshoot the issues:

Kind regards,
Theodora

Eren Alpaslan April 28, 2023

Thank you Theodora i will check this

Like Theodora Boudale likes this
0 votes
Eren Alpaslan April 26, 2023

Update: 
Second issue which related with configuration cache solved by removing a single line from gradle.properties
"org.gradle.unsafe.configuration-cache=true"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events