cloudfoundry / cli

The official command line client for Cloud Foundry
https://docs.cloudfoundry.org/cf-cli
Apache License 2.0
1.75k stars 929 forks source link

runtime error: invalid memory address or nil pointer dereference #1865

Closed zyh425285360 closed 1 month ago

zyh425285360 commented 4 years ago

Describe the bug and the command you saw an issue with 13:42:09 Command 13:42:09 cf login -a https://api.cf.cn40.platform.sapcloud.cn -u -p -o IPD_ipd-factory -s ipd --skip-ssl-validation 13:42:09 13:42:09 CLI Version 13:42:09 6.47.2+d526c2cb3.2019-11-05 13:42:09

What happened 13:42:09 Error 13:42:09 runtime error: invalid memory address or nil pointer dereference 13:42:09 13:42:09 Stack Trace 13:42:09 goroutine 1 [running]: 13:42:10 code.cloudfoundry.org/cli/util/panichandler.HandlePanic() 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/panichandler/handler.go:19 +0x81 13:42:10 panic(0xe1f800, 0x18d0960) 13:42:10 /usr/local/go/src/runtime/panic.go:522 +0x1b5 13:42:10 code.cloudfoundry.org/cli/command/v6.(LoginCommand).determineAPIEndpoint(0x18f9768, 0xc0008499b8, 0x416c7f, 0x7f86a8acb520, 0x0, 0x0, 0xc0008499e0) 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/command/v6/login_command.go:283 +0x19e 13:42:10 code.cloudfoundry.org/cli/command/v6.(LoginCommand).Execute(0x18f9768, 0xc000458000, 0x0, 0xc, 0x0, 0x0) 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/command/v6/login_command.go:127 +0x89 13:42:10 main.executionWrapper(0x7f86a8b0d788, 0x18f9768, 0xc000458000, 0x0, 0xc, 0x0, 0x0) 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/main.go:249 +0x27b 13:42:10 code.cloudfoundry.org/cli/vendor/github.com/jessevdk/go-flags.(Parser).ParseArgs(0xc0005d3730, 0xc0001fa280, 0xc, 0xc, 0xc000623ee0, 0x207221ea38d9b62b, 0x18eb300, 0xc000000180, 0xc0001f1080) 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/vendor/github.com/jessevdk/go-flags/parser.go:331 +0x883 13:42:10 main.parse(0xc0001fa280, 0xc, 0xc, 0xe249c0, 0x18f6dc0, 0xc0001ec058) 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/main.go:61 +0xaa 13:42:10 main.main() 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/main.go:49 +0xa3 13:42:10
13:42:10 goroutine 18 [syscall]: 13:42:10 os/signal.signal_recv(0x0) 13:42:10 /usr/local/go/src/runtime/sigqueue.go:139 +0x9c 13:42:10 os/signal.loop() 13:42:10 /usr/local/go/src/os/signal/signal_unix.go:23 +0x22 13:42:10 created by os/signal.init.0 13:42:10 /usr/local/go/src/os/signal/signal_unix.go:29 +0x41 13:42:10
13:42:10 goroutine 712 [chan receive]: 13:42:10 code.cloudfoundry.org/cli/util/configv3.catchSignal(0xc00020f680, 0xc000200c80, 0x79) 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/configv3/write_config.go:55 +0x34 13:42:10 created by code.cloudfoundry.org/cli/util/configv3.(
Config).WriteConfig 13:42:10 /tmp/build/80754af9/gopath/src/code.cloudfoundry.org/cli/util/configv3/write_config.go:40 +0x2ae

Expected behavior No error

To Reproduce

https://ipd.codepipes.wdf.sap.corp/job/CPES/job/Poc~New~Function~Test-IPD_TestManagement-Deploy~to~AC-Factory-Deploy~into~ac-factory~system/5/consoleFull

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/170229901

The labels on this github issue will be updated when the story is started.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed.

a-b commented 1 month ago

Thank you for your submission. If you still run into this issue with the latest CLI v8, please open a new ticket.