cloudfoundry / cloudfoundry/cli
Download of droplet/package throws stack trace
Open
@a-b is already working on this.
Since Sep 6, 2024.
bug
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 990
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 8
Description
Please fill out the issue checklist below and provide ALL the requested information.
- I reviewed open and closed github issues that may be related to my problem.
- I tried updating to the latest version of the CF CLI to see if it fixed my problem.
- I attempted to run the command with
CF_TRACE=1to help debug the issue. - I am reporting a bug that others will be able to reproduce.
Describe the bug and the command you saw an issue with
I tried both to download a droplet and package with cf cli8. It works in cf cli v7 without issue.
What happened
Command
cf8 curl /v3/droplets/bdb787f6-29c8-4b11-87e9-a6b47412893c/download
CLI Version
8.6.1+b5a352a.2023-02-27
Error
template: Display Text:34: unrecognized character in action: U+FFFD '�'
Stack Trace
goroutine 1 [running]:
code.cloudfoundry.org/cli/util/panichandler.HandlePanic()
/home/runner/work/cli/cli/util/panichandler/handler.go:19 +0x57
panic({0x1050140, 0xc000540060})
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/panic.go:884 +0x212
text/template.Must(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/text/template/helper.go:26
code.cloudfoundry.org/cli/util/ui.generateTranslationFunc.func1({0xc0010c0000, 0xabf0d3}, {0xc000024000, 0x1, 0xc0010c0000?})
/home/runner/work/cli/cli/util/ui/i18n.go:119 +0x2fb
code.cloudfoundry.org/cli/util/ui.(*UI).TranslateText(...)
/home/runner/work/cli/cli/util/ui/ui.go:409
code.cloudfoundry.org/cli/util/ui.(*UI).DisplayText(0xc00015dce0, {0xc0010c0000, 0xabf0d3}, {0x0?, 0x0?, 0x0?})
/home/runner/work/cli/cli/util/ui/ui.go:248 +0x14c
code.cloudfoundry.org/cli/command/v7.CurlCommand.Execute({{{0x13fbc90, 0xc00015dce0}, {0x13fcea0, 0xc00032ca80}, {0x13ed890, 0xc0002dc920}, {0x14000d0, 0xc0005fed90}, 0xc000040300, 0xc0005b8f00}, ...}, ...)
/home/runner/work/cli/cli/command/v7/curl_command.go:58 +0x2af
code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).executionWrapper(0xc0003f86c0, {0x7f78e5f2d2d8, 0x1b93818}, {0xc0002dc900, 0x0, 0x2})
/home/runner/work/cli/cli/util/command_parser/command_parser.go:93 +0x297
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc000401420, {0xc00010e160, 0x2, 0x2})
/home/runner/go/pkg/mod/github.com/jessevdk/go-flags@v1.4.1-0.20181221193153-c0795c8afcf4/parser.go:331 +0x8d4
code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).parse(0xc0003f86c0, {0xc00010e160?, 0x2, 0x2}, {0x107b740, 0x1b91e20})
/home/runner/work/cli/cli/util/command_parser/command_parser.go:224 +0xf3
code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).ParseCommandFromArgs(...)
/home/runner/work/cli/cli/util/command_parser/command_parser.go:57
main.main()
/home/runner/work/cli/cli/main.go:41 +0x2d4
goroutine 18 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0x0?)
/home/runner/go/pkg/mod/k8s.io/klog/v2@v2.9.0/klog.go:1169 +0x6a
created by k8s.io/klog/v2.init.0
/home/runner/go/pkg/mod/k8s.io/klog/v2@v2.9.0/klog.go:420 +0xf6
goroutine 627 [select]:
net/http.(*persistConn).writeLoop(0xc00028e7e0)
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:2392 +0xf5
created by net/http.(*Transport).dialConn
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:1752 +0x1791
goroutine 630 [syscall]:
os/signal.signal_recv()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/sigqueue.go:152 +0x2f
os/signal.loop()
/opt/hostedtoolcache/go/1.19.6/x64/src/os/signal/signal_unix.go:23 +0x19
created by os/signal.Notify.func1.1
/opt/hostedtoolcache/go/1.19.6/x64/src/os/signal/signal.go:151 +0x2a
goroutine 591 [IO wait]:
internal/poll.runtime_pollWait(0x7f78e6088de8, 0x72)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc00017e180?, 0xc0002b6000?, 0x0)
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc00017e180, {0xc0002b6000, 0xa80, 0xa80})
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc00017e180, {0xc0002b6000?, 0xc00031d750?, 0xc0000baa40?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/fd_posix.go:55 +0x29
net.(*conn).Read(0xc000013960, {0xc0002b6000?, 0x121168f?, 0xc0000baa30?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/net.go:183 +0x45
crypto/tls.(*atLeastReader).Read(0xc0005440a8, {0xc0002b6000?, 0x0?, 0x12122d3?})
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:787 +0x3d
bytes.(*Buffer).ReadFrom(0xc00032daf8, {0x13dc020, 0xc0005440a8})
/opt/hostedtoolcache/go/1.19.6/x64/src/bytes/buffer.go:202 +0x98
crypto/tls.(*Conn).readFromUntil(0xc00032d880, {0x13de260?, 0xc000013960}, 0xa?)
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:809 +0xe5
crypto/tls.(*Conn).readRecordOrCCS(0xc00032d880, 0x0)
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:616 +0x116
crypto/tls.(*Conn).readRecord(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:582
crypto/tls.(*Conn).Read(0xc00032d880, {0xc0000a6000, 0x1000, 0x1?})
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:1315 +0x16f
net/http.(*persistConn).Read(0xc00014a7e0, {0xc0000a6000?, 0xc000422180?, 0xc0000bad30?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:1929 +0x4e
bufio.(*Reader).fill(0xc000033380)
/opt/hostedtoolcache/go/1.19.6/x64/src/bufio/bufio.go:106 +0xff
bufio.(*Reader).Peek(0xc000033380, 0x1)
/opt/hostedtoolcache/go/1.19.6/x64/src/bufio/bufio.go:144 +0x5d
net/http.(*persistConn).readLoop(0xc00014a7e0)
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:2093 +0x1ac
created by net/http.(*Transport).dialConn
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:1751 +0x173e
goroutine 626 [IO wait]:
internal/poll.runtime_pollWait(0x7f78e6088cf8, 0x72)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc00017e280?, 0xc000386000?, 0x0)
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc00017e280, {0xc000386000, 0xa000, 0xa000})
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc00017e280, {0xc000386000?, 0xc0002dd760?, 0xc00037600d?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/fd_posix.go:55 +0x29
net.(*conn).Read(0xc000013970, {0xc000386000?, 0xc0000bb910?, 0x5d0528?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/net.go:183 +0x45
crypto/tls.(*atLeastReader).Read(0xc000118408, {0xc000386000?, 0x0?, 0x1226dd6?})
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:787 +0x3d
bytes.(*Buffer).ReadFrom(0xc000150278, {0x13dc020, 0xc000118408})
/opt/hostedtoolcache/go/1.19.6/x64/src/bytes/buffer.go:202 +0x98
crypto/tls.(*Conn).readFromUntil(0xc000150000, {0x13de260?, 0xc000013970}, 0x190a?)
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:809 +0xe5
crypto/tls.(*Conn).readRecordOrCCS(0xc000150000, 0x0)
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:616 +0x116
crypto/tls.(*Conn).readRecord(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:582
crypto/tls.(*Conn).Read(0xc000150000, {0xc0000ca000, 0x1000, 0x1?})
/opt/hostedtoolcache/go/1.19.6/x64/src/crypto/tls/conn.go:1315 +0x16f
net/http.(*persistConn).Read(0xc00028e7e0, {0xc0000ca000?, 0xc000422660?, 0xc0000bbd30?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:1929 +0x4e
bufio.(*Reader).fill(0xc0000c62a0)
/opt/hostedtoolcache/go/1.19.6/x64/src/bufio/bufio.go:106 +0xff
bufio.(*Reader).Peek(0xc0000c62a0, 0x1)
/opt/hostedtoolcache/go/1.19.6/x64/src/bufio/bufio.go:144 +0x5d
net/http.(*persistConn).readLoop(0xc00028e7e0)
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:2093 +0x1ac
created by net/http.(*Transport).dialConn
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:1751 +0x173e
goroutine 592 [select]:
net/http.(*persistConn).writeLoop(0xc00014a7e0)
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:2392 +0xf5
created by net/http.(*Transport).dialConn
/opt/hostedtoolcache/go/1.19.6/x64/src/net/http/transport.go:1752 +0x1791
goroutine 631 [chan receive]:
code.cloudfoundry.org/cli/util/configv3.catchSignal(0xc0000177d0?, {0xc00013d680, 0x3d})
/home/runner/work/cli/cli/util/configv3/write_config.go:64 +0x25
created by code.cloudfoundry.org/cli/util/configv3.(*Config).WriteConfig
/home/runner/work/cli/cli/util/configv3/write_config.go:41 +0x28b
Expected behavior
I get a stream of the app binaries. On Cli 7.6 it works.
Exact Steps To Reproduce
Run the cf curl command for download of either droplet or package in cf8
Provide more context
- Ubuntu 22.04
- Bash
- a customer has the same issue using Windows and 8.5.0
Notes regarding V6 and V7 CLI support: - V6:
- Minimum supported version of CF Deployment: v7.0.0 (CAPI Release: 1.74.0 (APIs 2.128.0 and 3.63.0))
- Maximum supported version of CF Deployment: v13.4.0 (CAPI Release: 1.94.0 (APIs 2.149.0 and 3.84.0))
- V7:
- Minimum supported version of CF Deployment: v13.5.0 (CAPI Release: 1.95.0 (APIs 2.150.0 and 3.85.0))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.