GradleRIO Deploy fails - why?

I’ve been trying to deploy our newly written java code to our competition robot, and i’m getting this output when running:

Landons-MacBook-Pro:java landonhaugh$ ./gradlew deploy --offline

> Task :discoverRoborio 
Discovering Target roborio


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':discoverRoborio'.
> Target roborio could not be located! Failing as roborio.failOnMissing is true.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
1 actionable task: 1 executed

The build.gradle is here: https://github.com/teamfusion364/2018java/blob/master/build.gradle

Can anyone help me out?

It couldn’t find your roborio. We’ll need more information about your setup. The following questions follows my standard troubleshooting process (both as a CSA and in my everyday life), so hopefully it’ll help you find the problem and you won’t have to run down the whole list.

  1. Is the Rio powered on?
  2. Are you connected through Ethernet? USB?
  3. Is the cable plugged in on both sides?
  4. If Ethernet, are you connected through the robot radio, or direct to the Rio?
  5. Do you have a static IP address set, or DHCP?
  6. What IS the IP you have on the laptop?
  7. Does anything else see the rio? (DS app on the same PC? DS on another PC?
  1. Yes.
  2. Yes. I’ve tried USB, Ethernet, and WiFi.
  3. Yes.
  4. I’ve tried both.
  5. DHCP.
  6. 10.3.64.99.
  7. Two different driver station laptops see the rio through the official driver station software.

What is the output of the command with the --info and --stacktrace flag (eg. '/gradlew deploy --info --stacktrace --offline "?

That should supply more information as to why the gradlew task is failing.

Landons-MacBook-Pro:2018java landonhaugh$ ./gradlew deploy --stacktrace --info --offline
Initialized native services in: /Users/landonhaugh/.gradle/native
The client will now receive all logging from the daemon (pid: 574). The daemon log file: /Users/landonhaugh/.gradle/daemon/4.4/daemon-574.out.log
Starting 6th build in daemon [uptime: 4 mins 47.091 secs, performance: 100%, no major garbage collections]
Using 4 worker leases.
Creating new cache for fileHashes, path /Users/landonhaugh/2018java/.gradle/4.4/fileHashes/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@31dd7e7
Starting Build
Settings evaluated using settings file '/Users/landonhaugh/2018java/settings.gradle'.
Projects loaded. Root project using build file '/Users/landonhaugh/2018java/build.gradle'.
Included projects: [root project '2018java']

> Configure project : 
Evaluating root project '2018java' using build file '/Users/landonhaugh/2018java/build.gradle'.
Creating new cache for metadata-1.1/results, path /Users/landonhaugh/.gradle/caches/transforms-1/metadata-1.1/results.bin, access org.gradle.cache.internal.DefaultCacheAccess@47e37ef2
Creating new cache for metadata-2.36/module-metadata, path /Users/landonhaugh/.gradle/caches/modules-2/metadata-2.36/module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@545c3a29
Creating new cache for metadata-2.36/module-artifacts, path /Users/landonhaugh/.gradle/caches/modules-2/metadata-2.36/module-artifacts.bin, access org.gradle.cache.internal.DefaultCacheAccess@545c3a29
Creating new cache for metadata-2.36/module-artifact, path /Users/landonhaugh/.gradle/caches/modules-2/metadata-2.36/module-artifact.bin, access org.gradle.cache.internal.DefaultCacheAccess@545c3a29

All projects evaluated.
Selected primary task 'deploy' from project :
Creating new cache for annotation-processors, path /Users/landonhaugh/2018java/.gradle/4.4/fileContent/annotation-processors.bin, access org.gradle.cache.internal.DefaultCacheAccess@7d2d69da
Tasks to be executed: [task ':discoverRoborio', task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':deployFrcJava', task ':deployJre', task ':deployNativeLibs', task ':deployNativeZips', task ':deployRoborioCommands', task ':deploy']
Creating new cache for resourceHashesCache, path /Users/landonhaugh/2018java/.gradle/4.4/fileHashes/resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@31dd7e7
Creating new cache for taskHistory, path /Users/landonhaugh/2018java/.gradle/4.4/taskHistory/taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@3feff6d4
Creating new cache for outputFiles, path /Users/landonhaugh/2018java/.gradle/buildOutputCleanup/outputFiles.bin, access org.gradle.cache.internal.DefaultCacheAccess@5d248c87
:discoverRoborio (Thread[Task worker for ':',5,main]) started.
Resolved 10.3.64.2 -> 10.3.64.2
Resolved 172.22.11.2 -> 172.22.11.2
Resolved roborio-364-FRC.local -> 10.3.64.52

> Task :discoverRoborio 
Putting task artifact state for task ':discoverRoborio' into context took 0.0 secs.
Up-to-date check for task ':discoverRoborio' took 0.0 secs. It is not up-to-date because:
  Task has not declared any outputs.
Discovering Target roborio

:discoverRoborio (Thread[Task worker for ':',5,main]) completed. Took 3.513 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':discoverRoborio'.
> Target roborio could not be located! Failing as roborio.failOnMissing is true.

* Try:
Run with --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':discoverRoborio'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: jaci.gradle.deploy.tasks.TargetDiscoveryTask$TargetNotFoundException: Target roborio could not be located! Failing as roborio.failOnMissing is true.
        at jaci.gradle.deploy.tasks.TargetDiscoveryTask.discoverTarget(TargetDiscoveryTask.groovy:107)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        ... 29 more


* Get more help at https://help.gradle.org

BUILD FAILED in 4s
1 actionable task: 1 executed
Telemetry skipped! (no-telemetry = false, ReportTelemetry = true, offline = true, CI = false) (expected false, true, false, false)

Something I noticed was:

Up-to-date check for task ':discoverRoborio' took 0.0 secs. It is not up-to-date because:
  Task has not declared any outputs.

Could this have anything to do with it?

That looks like the most likely indicator of the problem.

Unforchently I havn’t encountered it befor and am not an expert on the integral workings of gradle. In the meantime I’ll let you know if I stumble across a solution.

It’s errors like these that keep the programers up at night. Let the grimlin chasing begin.

If you find the problem I would apreate if you let me konw in the case my team runs across it in the fucher.

Thanks!

I fixed the problem.

We were previously running a LabVIEW startup app from worlds. We had a lot of problems deploying code because the roboRIO CPU usage was hitting 100% due to many parallel control loops running very quick in our code. I assume this was taking so much CPU time that the roboRIO wouldn’t respond; the NI CSAs at Houston assumed this as well.

We re-imaged the roboRIO and everything worked correctly. Also, the roboRIO was on v16, and was updated to v17.

That’s normal, the discoverRoborio task doesn’t output any files

Glad to see you’ve found the problem, usually a reimage is best in these kinds of situations since the deploy process between LabVIEW and C++/Java is very different.