cli icon indicating copy to clipboard operation
cli copied to clipboard

invalid memory address or nil pointer dereference when consuming a topic using a context

Open natalia-ramos-bzy opened this issue 1 year ago • 7 comments

There is an error when using contexts when consuming from a topic

confluent kafka topic <topicName> --context dev
Error: runtime error: invalid memory address or nil pointer dereference

CLI details:

confluent - Confluent CLI

Version:     v3.40.0
Git Ref:     299e722ef
Build Date:  2023-11-02T23:32:56Z
Go Version:  go1.21.0 X:boringcrypto (windows/amd64)
Development: false

natalia-ramos-bzy avatar Nov 10 '23 09:11 natalia-ramos-bzy

Please update to v3.41.0 and let me know if that doesn't fix it.

brianstrauch avatar Nov 13 '23 16:11 brianstrauch

I still have the same issue with v3.42.0:

confluent - Confluent CLI

Version:     v3.42.0
Git Ref:     41bf3c3ed
Build Date:  2023-11-16T20:20:16Z
Go Version:  go1.21.0 X:boringcrypto (windows/amd64)
Development: false
confluent kafka topic consume <topicName> --context dev
Error: runtime error: invalid memory address or nil pointer dereference

natalia-ramos-bzy avatar Dec 01 '23 09:12 natalia-ramos-bzy

Looks like our telemetry wasn't able to collect that runtime error and I'm unable to replicate it. Here are a few things you can try:

  1. Give the command another run. If it results in a runtime error our telemetry systems should pick it up.
  2. Build the CLI from source and run the command. You'll see the full stack trace which you can paste here.

brianstrauch avatar Jan 10 '24 21:01 brianstrauch

Using v3.47.0 I get this new error:

confluent kafka topic <TopicName> --context dev
Error: required flag `--bootstrap` not set

natalia-ramos-bzy avatar Jan 17 '24 13:01 natalia-ramos-bzy

Did you mean to type "confluent kafka topic consume"?

brianstrauch avatar Jan 17 '24 17:01 brianstrauch

Also, as of v3.42.0 the --bootstrap flag is no longer required. Please check that you're using an up-to-date version. It sounds you may have multiple versions of the Confluent CLI installed, so make sure that the one you expect appears earlier in your $PATH.

brianstrauch avatar Jan 17 '24 17:01 brianstrauch

I get the same error when running the same command. No error when using the default context after confluent login --save. Does this command work with context?

confluent version v3.64.3

asiunov avatar Jul 04 '24 00:07 asiunov