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

4.0.0-alpha02 ProGuard issues #5167

Closed
Albert221 opened this issue Jun 3, 2019 · 18 comments

Comments

@Albert221
Copy link

commented Jun 3, 2019

Yes, I'm using the ProGuard rules from readme.

Warning: okhttp3.internal.platform.ConscryptPlatform$configureTrustManager$1: ca
n't find superclass or interface org.conscrypt.ConscryptHostnameVerifier
Warning: okhttp3.Authenticator$Companion$NONE$1: can't find referenced class okh
ttp3.Authenticator$DefaultImpls
Warning: okhttp3.Authenticator$Companion$NONE$1: can't find referenced class okh
ttp3.Authenticator$DefaultImpls
Warning: okhttp3.CookieJar$Companion$NO_COOKIES$1: can't find referenced class o
khttp3.CookieJar$DefaultImpls
Warning: okhttp3.CookieJar$Companion$NO_COOKIES$1: can't find referenced class o
khttp3.CookieJar$DefaultImpls
Warning: okhttp3.Dns$Companion$SYSTEM$1: can't find referenced class okhttp3.Dns
$DefaultImpls
Warning: okhttp3.Dns$Companion$SYSTEM$1: can't find referenced class okhttp3.Dns
$DefaultImpls
Warning: okhttp3.internal.http2.PushObserver$Companion$CANCEL$1: can't find refe
renced class okhttp3.internal.http2.PushObserver$DefaultImpls
Warning: okhttp3.internal.http2.PushObserver$Companion$CANCEL$1: can't find refe
renced class okhttp3.internal.http2.PushObserver$DefaultImpls
Warning: okhttp3.internal.io.FileSystem$Companion$SYSTEM$1: can't find reference
d class okhttp3.internal.io.FileSystem$DefaultImpls
Warning: okhttp3.internal.io.FileSystem$Companion$SYSTEM$1: can't find reference
d class okhttp3.internal.io.FileSystem$DefaultImpls
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt$Version
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt$Version
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt$Version
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt$Version
Warning: okhttp3.internal.platform.ConscryptPlatform$Companion: can't find refer
enced class org.conscrypt.Conscrypt$Version
Warning: okhttp3.internal.platform.ConscryptPlatform$configureTrustManager$1: ca
n't find referenced class org.conscrypt.ConscryptHostnameVerifier
@Albert221 Albert221 added the bug label Jun 3, 2019
@swankjesse swankjesse added this to the 4.0 milestone Jun 3, 2019
@laalto

This comment has been minimized.

Copy link

commented Jun 7, 2019

In our codebase I experimetnally updated 3.14.2 to 4.0.0-RC1. There is -dontwarn okhttp3.** in proguard config so these warnings did not stop the build (can repro if commenting out that rule). However there's another issue later on: proguard gets stuck in its optimization pass 1 forever. Have not yet been able to cook up a MCVE so not filing a separate bug but want to mention under "4.0.0 proguard issues".

@yschimke yschimke added the proguard label Jun 7, 2019
@swankjesse

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

@laalto oooh, thanks for the heads up. What's your ProGuard version? We saw a similar issue with Okio.
square/okio#516

@swankjesse

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

You need ProGuard Version 6.1 or newer, which has the fix for PGD-730.
https://www.guardsquare.com/en/products/proguard/manual/versions

@laalto

This comment has been minimized.

Copy link

commented Jun 7, 2019

@swankjesse Thanks! Was using ProGuard 6.0.3 coming from Android Gradle plugin 3.4.1. Tried updating it to 6.1.0 with top-level build.gradle:

buildscript {
    configurations.all {
        resolutionStrategy {
            force("net.sf.proguard:proguard-base:6.1.0")
        }
    }
}

This works slightly better; now it proceeds up to optimization pass 2 shrinking phase before proguard crashes with ArrayIndexOutOfBoundsException :(

Maybe this could be the driver to migrate over to R8 in our codebase... will investigate more.

@swankjesse

This comment has been minimized.

Copy link
Member

commented Jun 9, 2019

@laalto can you share the ArrayIndexOutOfBoundsException stacktrace? Would like to share with the ProGuard team.

@swankjesse

This comment has been minimized.

Copy link
Member

commented Jun 9, 2019

Documented here: #5176

Closing ’cause there’s no action for OkHttp to take on this. I’d love to see a ProGuard tracking bug for the ArrayIndexOutOfBoundsException issue!

@swankjesse swankjesse closed this Jun 9, 2019
@ZacSweers

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

For what it's worth, we saw a similar optimization issue with proguard on 6.1.0-beta2 when I was at Uber that required keeping an Okio ByteString.EMPTY usage in OkHttp where it was null at runtime. I'll try to get someone there to share that rule/usage here for posterity in case others see it.

@ZacSweers

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

Specifically, this debugData var

var debugData = ByteString.EMPTY

would somehow be null by the time it went through

handler.goAway(lastStreamId, errorCode, debugData)

and throw an NPE here:

Though that was with Java OkHttp, so it'd be a generic NPE. With Kotlin it'd at least nullcheck with descriptive parameter names hopefully, but depends on if proguard strips the intrinsics during optimization

@laalto

This comment has been minimized.

Copy link

commented Jun 10, 2019

@swankjesse here's a snippet out of gradle assemble --debug --stacktrace

14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:ndhmfi:transformClassesAndResourcesWithProguardForAlpha'.
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:151)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:148)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:141)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:75)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
14:07:24.284 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
14:07:24.285 [INFO] [org.gradle.api.Project] AAPT2 aapt2-3.4.1-5326820-osx Daemon #5: shutdown
14:07:24.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:73)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
14:07:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.RuntimeException: java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 2
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230)
14:07:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
14:07:24.288 [INFO] [org.gradle.api.Project] AAPT2 aapt2-3.4.1-5326820-osx Daemon #6: shutdown
14:07:24.288 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.IncrementalTaskInputsTaskAction.doExecute(IncrementalTaskInputsTaskAction.java:46)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$5.run(ExecuteActionsTaskExecuter.java:404)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:393)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:376)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:80)
14:07:24.289 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:213)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$0(ExecuteStep.java:32)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:32)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33)
14:07:24.290 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:201)
14:07:24.291 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:77)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:120)
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 35 more
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 2
14:07:24.292 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:264)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.ProGuardTransform.lambda$transform$0(ProGuardTransform.java:181)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.tasks.WorkLimiter.limit(WorkLimiter.kt:38)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.ProGuardTransform.transform(ProGuardTransform.java:179)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 87 more
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.shrink.ClassShrinker$MySignatureCleaner.visitSignatureAttribute(ClassShrinker.java:345)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.util.SimplifiedVisitor.visitSignatureAttribute(SimplifiedVisitor.java:504)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.util.SimplifiedVisitor.visitSignatureAttribute(SimplifiedVisitor.java:516)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.attribute.SignatureAttribute.accept(SignatureAttribute.java:109)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:101)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod(SimplifiedVisitor.java:93)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:93)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:588)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.shrink.ClassShrinker.visitProgramClass(ClassShrinker.java:133)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.visitor.MultiClassVisitor.visitProgramClass(MultiClassVisitor.java:67)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.shrink.UsedClassFilter.visitProgramClass(UsedClassFilter.java:62)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.ProgramClass.accept(ProgramClass.java:430)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.classfile.ClassPool.classesAccept(ClassPool.java:125)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.shrink.Shrinker.execute(Shrinker.java:158)
14:07:24.293 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.ProGuard.shrink(ProGuard.java:392)
14:07:24.294 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at proguard.ProGuard.execute(ProGuard.java:178)
14:07:24.294 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.BaseProguardAction.runProguard(BaseProguardAction.java:66)
14:07:24.294 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:258)
14:07:24.294 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 93 more
@laalto

This comment has been minimized.

Copy link

commented Jun 10, 2019

Googling method names in the stacktrace shows a similar crash reported at https://sourceforge.net/p/proguard/bugs/753/

@laalto

This comment has been minimized.

Copy link

commented Jun 20, 2019

For what it's worth, resolved the proguard issues in our codebase by migrating to R8.

@TWiStErRob

This comment has been minimized.

Copy link

commented Aug 1, 2019

@swankjesse half of the warnings in OP are likely because https://youtrack.jetbrains.com/issue/KT-33097

@netomi

This comment has been minimized.

Copy link

commented Aug 16, 2019

The related bug in Proguard (PGD-753) seems to be the same as in this case. We would like to fix this asap but need a reproducible sample.

Could you also possible test if the special gson optimization might be the culprit, adding this will disable it:

-optimizations !library/gson

@netomi

This comment has been minimized.

Copy link

commented Aug 17, 2019

The problem in proguard seems to be related to parameter removal optimization (can be disabled by adding -optimizations !method/parameter/removal).

We now have a reproducible test case and will fix it asap.

@netomi

This comment has been minimized.

Copy link

commented Aug 17, 2019

Problem has been identified and fixed in source code. It was related to an incomplete fix for PGD-735. We will try to make a release 6.1.2 asap.

@phicdy

This comment has been minimized.

Copy link

commented Sep 10, 2019

@netomi We have encountered this problem...you said you will release v6.1.2 asap but it was not released yet. Do you have plan of the release ?

@netomi

This comment has been minimized.

Copy link

commented Sep 20, 2019

Sorry for the late reply, it has already been fixed in ProGuard and will be included in the next release 6.2.0 hopefully available in the next 2 weeks.

@netomi

This comment has been minimized.

Copy link

commented Oct 9, 2019

ProGuard 6.2.0 is now released with a fix for this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
8 participants
You can’t perform that action at this time.