Code Monkey home page Code Monkey logo

Comments (2)

pmarkham avatar pmarkham commented on August 22, 2024

I am hitting the same problem, with a slightly different error.

		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 curl /v3/droplets/d761e4be-e2ae-4ae3-8b6c-1a1317bafc8f/download

		CLI Version
		8.7.1+9c81242.2023-06-15

		Error
		template: Display Text:467: unexpected "{" in command

		Stack Trace
			goroutine 1 [running]:
	code.cloudfoundry.org/cli/util/panichandler.HandlePanic()
		/Users/runner/work/cli/cli/util/panichandler/handler.go:19 +0x57
	panic({0x1c7b980, 0xc0004aa090})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/runtime/panic.go:884 +0x213
	text/template.Must(...)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/text/template/helper.go:26
	code.cloudfoundry.org/cli/util/ui.generateTranslationFunc.func1({0xc00be6c000, 0x586c1ce}, {0xc0004aa000, 0x1, 0x386bd9be5547b7a4?})
		/Users/runner/work/cli/cli/util/ui/i18n.go:119 +0x2fb
	code.cloudfoundry.org/cli/util/ui.(*UI).TranslateText(...)
		/Users/runner/work/cli/cli/util/ui/ui.go:409
	code.cloudfoundry.org/cli/util/ui.(*UI).DisplayText(0xc0002da4d0, {0xc00be6c000, 0x586c1ce}, {0x0?, 0x9c1c0?, 0x206f778f0?})
		/Users/runner/work/cli/cli/util/ui/ui.go:248 +0x14c
	code.cloudfoundry.org/cli/command/v7.CurlCommand.Execute({{{0x2011690, 0xc0002da4d0}, {0x20129d0, 0xc00036aa80}, {0x20027d0, 0xc000431dc0}, {0x2015c10, 0xc000204070}, 0xc000004300, 0xc0000d8360}, ...}, ...)
		/Users/runner/work/cli/cli/command/v7/curl_command.go:58 +0x2bd
	code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).executionWrapper(0xc0003d2160, {0x4f015d8, 0x27d1bc8}, {0xc000431da0, 0x0, 0x2})
		/Users/runner/work/cli/cli/util/command_parser/command_parser.go:93 +0x297
	github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc0003af5e0, {0xc000118190, 0x2, 0x2})
		/Users/runner/go/pkg/mod/github.com/jessevdk/[email protected]/parser.go:331 +0x8d4
	code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).parse(0xc0003d2160, {0xc000118190?, 0x2, 0x2}, {0x1ca7800, 0x27d01c0})
		/Users/runner/work/cli/cli/util/command_parser/command_parser.go:224 +0xf3
	code.cloudfoundry.org/cli/util/command_parser.(*CommandParser).ParseCommandFromArgs(...)
		/Users/runner/work/cli/cli/util/command_parser/command_parser.go:57
	main.main()
		/Users/runner/work/cli/cli/main.go:41 +0x2d4
	
	goroutine 18 [chan receive]:
	k8s.io/klog/v2.(*loggingT).flushDaemon(0x0?)
		/Users/runner/go/pkg/mod/k8s.io/klog/[email protected]/klog.go:1169 +0x6a
	created by k8s.io/klog/v2.init.0
		/Users/runner/go/pkg/mod/k8s.io/klog/[email protected]/klog.go:420 +0xf6
	
	goroutine 41 [chan receive]:
	code.cloudfoundry.org/cli/util/configv3.catchSignal(0x102?, {0xc000720000, 0x27})
		/Users/runner/work/cli/cli/util/configv3/write_config.go:64 +0x25
	created by code.cloudfoundry.org/cli/util/configv3.(*Config).WriteConfig
		/Users/runner/work/cli/cli/util/configv3/write_config.go:41 +0x28b
	
	goroutine 39 [IO wait]:
	internal/poll.runtime_pollWait(0x4cbde18, 0x72)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/runtime/netpoll.go:306 +0x89
	internal/poll.(*pollDesc).wait(0xc0005c0000?, 0xc00036e000?, 0x0)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32
	internal/poll.(*pollDesc).waitRead(...)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/internal/poll/fd_poll_runtime.go:89
	internal/poll.(*FD).Read(0xc0005c0000, {0xc00036e000, 0xa000, 0xa000})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/internal/poll/fd_unix.go:167 +0x299
	net.(*netFD).Read(0xc0005c0000, {0xc00036e000?, 0xc00054e00d?, 0x27e?})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/net/fd_posix.go:55 +0x29
	net.(*conn).Read(0xc00053a008, {0xc00036e000?, 0x1973?, 0xc00054e005?})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/net/net.go:183 +0x45
	crypto/tls.(*atLeastReader).Read(0xc000120f00, {0xc00036e000?, 0xc000120f00?, 0x0?})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/crypto/tls/conn.go:788 +0x3d
	bytes.(*Buffer).ReadFrom(0xc0002ed090, {0x1ff10c0, 0xc000120f00})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/bytes/buffer.go:202 +0x98
	crypto/tls.(*Conn).readFromUntil(0xc0002ece00, {0x4f1e218?, 0xc00053a008}, 0x0?)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/crypto/tls/conn.go:810 +0xe5
	crypto/tls.(*Conn).readRecordOrCCS(0xc0002ece00, 0x0)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/crypto/tls/conn.go:617 +0x116
	crypto/tls.(*Conn).readRecord(...)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/crypto/tls/conn.go:583
	crypto/tls.(*Conn).Read(0xc0002ece00, {0xc00056a000, 0x1000, 0x41?})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/crypto/tls/conn.go:1316 +0x16f
	net/http.(*persistConn).Read(0xc00027a000, {0xc00056a000?, 0xc000592300?, 0xc000518d30?})
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/net/http/transport.go:1943 +0x4e
	bufio.(*Reader).fill(0xc000521260)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/bufio/bufio.go:106 +0xff
	bufio.(*Reader).Peek(0xc000521260, 0x1)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/bufio/bufio.go:144 +0x5d
	net/http.(*persistConn).readLoop(0xc00027a000)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/net/http/transport.go:2107 +0x1ac
	created by net/http.(*Transport).dialConn
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/net/http/transport.go:1765 +0x16ea
	
	goroutine 40 [select]:
	net/http.(*persistConn).writeLoop(0xc00027a000)
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/net/http/transport.go:2410 +0xf2
	created by net/http.(*Transport).dialConn
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/net/http/transport.go:1766 +0x173d
	
	goroutine 51 [syscall]:
	os/signal.signal_recv()
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/runtime/sigqueue.go:149 +0x28
	os/signal.loop()
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/os/signal/signal_unix.go:23 +0x19
	created by os/signal.Notify.func1.1
		/Users/runner/hostedtoolcache/go/1.20.5/x64/src/os/signal/signal.go:151 +0x2a
	

		Your Platform Details
		e.g. Mac OS X 10.11, Windows 8.1 64-bit, Ubuntu 14.04.3 64-bit

		Shell
		e.g. Terminal, iTerm, Powershell, Cygwin, gnome-terminal, terminator

Setting CF_TRACE=1 and rerunning results in an output file that has the trace at the beginning and the downloaded droplet after that. The output from the trace (sanitized) is:

REQUEST: [2023-06-20T08:58:24+10:00]
GET /v3/droplets/d761e4be-e2ae-4ae3-8b6c-1a1317bafc8f/download HTTP/1.1
Host: api.system.example.com
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: cf/8.4.0+b4c083e.2022-06-02 (go1.17.10; arm64 darwin)

RESPONSE: [2023-06-20T08:58:42+10:00]
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 92717518
Content-Type: application/zip
Date: Mon, 19 Jun 2023 22:58:26 GMT
Etag: "41011bd8b5c52b2cd7c4c2XXXXXXXXX"
Last-Modified: Mon, 19 Jun 2023 05:30:32 GMT
Server: AmazonS3
X-Amz-Id-2: xxxxxxxxxxzxio0TZwpTKIuYz4SGi3vq4b36WqVJYuIMgobO8AX2971v/1Ktx+ydPNxxxxxxxxxx
X-Amz-Replication-Status: COMPLETED
X-Amz-Request-Id: VN86J5AEN9XXXXXX
X-Amz-Server-Side-Encryption: aws:kms
X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id: arn:aws:kms:ap-southeast-2:012345678901:key/xxxxxxxx-6b13-4c3d-b625-xxxxxxxxxxxx
X-Amz-Version-Id: dEBb4o4ikUcIBdMrGfKPVlXXXXXXXXXX

This happens on both Ubuntu 22.04 using Bash and MacOS 13.4 using zsh

from cli.

jameshochadel avatar jameshochadel commented on August 22, 2024

I'm seeing the same issue, with the same command:

CLI Version
8.7.7+583a09a.2023-12-26

Error
template: Display Text:211: unrecognized character in action: U+001F

As a workaround, use the --output arg to download the curl response to a file. I think the problem is that the package archive gets passed to a text display template which attempts to internationalize it, but it fails since the archive is not text (and thus not internationalizable).

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.