DaemonConnectDetails.getPid() is null when start build

Please provide the full error, and especially as text, not screenshot.
Screenshots are hard to read, hard to copy, hard to find in searches, …

The error is:
Cannot invoke “java.lang.Long.longValue()” because the return value of “org.gradle.launcher.daemon.context.DaemonConnectDetails.getPid()” is null
Thanks!

As I said, please provide the full error

The full error is:
Cannot invoke “java.lang.Long.longValue()” because the return value of “org.gradle.launcher.daemon.context.DaemonConnectDetails.getPid()” is null

Looks like the daemon process was not started.
Tried below to restart:
./gradlew --stop

Got below error:
Trying to connect to address /127.0.0.1.
11:35:51.775 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /127.0.0.1, skipping.
11:35:51.775 [INFO] [org.gradle.launcher.daemon.client.DefaultDaemonConnector] Removing daemon from the registry due to communication failure. Daemon information: DaemonInfo{pid=null, address=[65c32752-0cab-400d-98af-0053d471dc5b port:49512, addresses:[/0:0:0:0:0:0:0:1%lo0, /127.0.0.1]], idle=true, lastBusy=1697772485795, context=DefaultDaemonContext[uid=89f306a8-6067-434d-a459-79da48469312,javaHome=/Users/dluo/Library/Java/JavaVirtualMachines/corretto-1.8.0_352/Contents/Home,daemonRegistryDir=/Users/dluo/.gradle/daemon,pid=null,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=127.0.0.1:49509,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=AU,-Duser.language=en,-Duser.variant]}

Already run below to disable firewall:
sudo /Applications/Falcon.app/Contents/Resources/falconctl disable-filter

No, that is not the full error.
Select a higher node in the tree on the left in the IDE or try to build from command line or look at the daemon logs in <GRADLE_USER_HOME>/daemon/<version>/.

The issue has been resolved by adding grails plugin into intellij. Thank you very much!

1 Like