Something unexpected happened. This is a bug in cf.
Please re-run the command that caused this exception with the environment
variable CF_TRACE set to true.
Also, please update to the latest cli and try the command again:
https://code.cloudfoundry.org/cli/releases
Please create an issue at: https://code.cloudfoundry.org/cli/issues
Include the below information when creating the issue:
Command
cf env service-broker-blue
CLI Version
7.1.0+4c3168f9a.2020-09-09
Error
template: Display Text:1: function "app_router_url" not defined
Stack Trace
goroutine 1 [running]:
code.cloudfoundry.org/cli/util/panichandler.HandlePanic()
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/panichandler/handler.go:19 +0x81
panic(0xfeec80, 0xc0005b8840)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
text/template.Must(...)
/usr/local/go/src/text/template/helper.go:23
code.cloudfoundry.org/cli/util/ui.generateTranslationFunc.func1(0xc000568000, 0x6143, 0xc0005b87d0, 0x1, 0x1, 0x4d7ab1, 0x1bf9e40)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/ui/i18n.go:119 +0x40a
code.cloudfoundry.org/cli/util/ui.(*UI).TranslateText(...)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/ui/ui.go:308
code.cloudfoundry.org/cli/util/ui.(*UI).DisplayText(0xc0000e5810, 0xc000568000, 0x6143, 0x0, 0x0, 0x0)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/ui/ui.go:246 +0x124
code.cloudfoundry.org/cli/command/v7.EnvCommand.displayEnvGroup(0x13b0300, 0xc0000e5810, 0x13b9a40, 0xc00001c300, 0x1393360, 0xc0003b2d40, 0x13bd660, 0xc00083f680, 0xc00003d8c0, 0xc00052aa80, ...)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/command/v7/env_command.go:97 +0x175
code.cloudfoundry.org/cli/command/v7.EnvCommand.Execute(0x13b0300, 0xc0000e5810, 0x13b9a40, 0xc00001c300, 0x1393360, 0xc0003b2d40, 0x13bd660, 0xc00083f680, 0xc00003d8c0, 0xc00052aa80, ...)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/command/v7/env_command.go:68 +0x6bf
code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).executionWrapper(0xc00017b840, 0x7f93acaf8340, 0x1c23b18, 0xc00019d380, 0x0, 0x2, 0x0, 0x0)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/command_parser/command_parser.go:93 +0x270
code.cloudfoundry.org/cli/vendor/github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc000164af0, 0xc00003a040, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/vendor/github.com/jessevdk/go-flags/parser.go:331 +0x89c
code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).parse(0xc00017b840, 0xc00003a040, 0x2, 0x2, 0x100e680, 0x1c21340, 0xc000000120, 0xed, 0xc000527e70)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/command_parser/command_parser.go:221 +0xe0
code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).ParseCommandFromArgs(...)
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/command_parser/command_parser.go:57
main.main()
/tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/main.go:40 +0x19e
SERVICEBROKER_CATALOG: {"services":
(... huge json ...)
"endPointAddress": "{{app_router_url}}/SampleServices/ESPM.svc/v2"}
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
CF_TRACE=1to help debug the issue.Describe the bug and the command you saw an issue with
We've run
cf7 env <appname>and the command paniced with:Calling
cf6 env <appname>worked. The problematic environment variable seems to be this one:The
app_router_urlis interpreted as function call by the GoLang template package. As it is nowhere defined, this call panics:cli/util/ui/i18n.go
Line 119 in b823ae5
What happened
(see description)
Expected behavior
We expected the application's environment variables to be printed.
Exact Steps To Reproduce
With CF CLI v7.1.0,
Provide more context
Platform:
CF CLI versions:
cf7 version 7.1.0+4c3168f9a.2020-09-09 (doesn't work)
cf6 version 6.53.0+8e2b70a4a.2020-10-01 (works)
capi-release: 1.98.0
Notes regarding V6 and V7 CLI support: