java.lang.ClassCastException: io.jenkins.plugins.appcenter.AppCenterRecorder.apiToken expects class java.lang.String but received class hudson.util.Secret
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:492)
at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:409)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:329)
Caused: java.lang.IllegalArgumentException: Could not instantiate {apiToken=${API_TOKEN}, appName=<REDACTED>, branchName=, buildVersion=, commitHash=, distributionGroups=<REDACTED>, mandatoryUpdate=false, notifyTesters=true, ownerName=<REDACTED>, pathToApp=client_builds/latest.ipa, pathToDebugSymbols=, pathToReleaseNotes=, releaseNotes=Deployed by Jenkins: ${JOB_NAME} #${BUILD_NUMBER}} for io.jenkins.plugins.appcenter.AppCenterRecorder
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:334)
at org.jenkinsci.plugins.structs.describable.UninstantiatedDescribable.instantiate(UninstantiatedDescribable.java:208)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:466)
at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:409)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:329)
Caused: java.lang.IllegalArgumentException: Could not instantiate {delegate=@appCenter$AppCenterRecorder(apiToken=${API_TOKEN},appName=<REDACTED>,branchName=,buildVersion=,commitHash=,distributionGroups=<REDACTED>,mandatoryUpdate=false,notifyTesters=true,ownerName=<REDACTED>,pathToApp=client_builds/latest.ipa,pathToDebugSymbols=,pathToReleaseNotes=,releaseNotes=Deployed by Jenkins: ${JOB_NAME} #${BUILD_NUMBER})} for org.jenkinsci.plugins.workflow.steps.CoreStep
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:334)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:672)
at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.resolve(ArgumentsAction.java:306)
at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.getResolvedArguments(ArgumentsAction.java:293)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getDelegateType(StepAtomNode.java:134)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.effectiveDisplayName(StepAtomNode.java:90)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getTypeDisplayName(StepAtomNode.java:102)
at org.jenkinsci.plugins.workflow.graph.FlowNode.getDisplayName(FlowNode.java:257)
at com.cloudbees.workflow.rest.external.FlowNodeExt.addBasicNodeData(FlowNodeExt.java:206)
at com.cloudbees.workflow.rest.external.AtomFlowNodeExt.create(AtomFlowNodeExt.java:71)
at com.cloudbees.workflow.rest.external.ChunkVisitor.makeAtomNode(ChunkVisitor.java:68)
at com.cloudbees.workflow.rest.external.ChunkVisitor.atomNode(ChunkVisitor.java:154)
at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.fireVisitChunkCallbacks(ForkScanner.java:749)
at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:767)
at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:631)
at com.cloudbees.workflow.rest.external.RunExt.createNew(RunExt.java:319)
at com.cloudbees.workflow.rest.external.RunExt.create(RunExt.java:307)
at com.cloudbees.workflow.rest.external.JobExt.create(JobExt.java:143)
at com.cloudbees.workflow.rest.endpoints.JobAPI.doRuns(JobAPI.java:69)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:30)
at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:536)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
Hmm....... I've tried the latest snapshot of the plugin at time of writing against the latest LTS (2.263.1) and am not seeing the same stacktrace. In the absence of any way to reproduce this I will put this on hold.