Uninformative NullPointerException by build scan plugin

plugins
build-scan
(Danilo Pianini) #1

I converted a working groovy build script of a very big multi-project to kotlin. It seems to work, but the scan publishing fails:

BUILD SUCCESSFUL in 2m 51s
249 actionable tasks: 233 executed, 16 up-to-date

A build scan cannot be produced as an error occurred gathering build data.
Please report this problem via https://gradle.com/scans/help/plugin and include the following via copy/paste:

----------
Gradle version: 5.4.1
Plugin version: 2.1

java.lang.NullPointerException
        at com.gradle.scan.plugin.internal.j.d$a.a(SourceFile:51)
        at com.gradle.scan.plugin.internal.j.d.a(SourceFile:41)
        at com.gradle.scan.plugin.internal.j.f.a(SourceFile:42)
        at com.gradle.scan.plugin.internal.o.a$a.a(SourceFile:30)
        at com.gradle.scan.plugin.internal.o.a$a.a(SourceFile:19)
        at com.gradle.scan.plugin.internal.o.a.c(SourceFile:60)

----------

Is there anything obvious I’m overlooking? The stacktrace is unhelpful to me for debugging the issue.

(René Groeschke) #2

saw your email. let’s continue here

Hello Danilo,

thanks for the report.

Does build scan start failing for you after you updated the build scans plugin version or gradle itself or is this the first time you use build scans with this build?

cheers,

René

(Danilo Pianini) #3

Hi,
the plugin was enabled and working before the switch to kts. I made some improvements to the build (e.g. I’m using the buildSrc plugin now), and I can’t reproduce the issue any longer. I’m not sure it’s good, does the stacktrace point to any obvious possible NPE source?