Invalid username or password

command line

While trying to login rpc error: code = Unknown desc = invalid username or password

Report a Dgraph Client Bug

What Dgraph client (and version) are you using?

(put “x” in the box to select)

  • Dgo
  • PyDgraph
  • Dgraph4J
  • Dgraph-js
  • Dgraph-js-http
  • Dgraph.NET

Version:
the latest

What version of Dgraph are you using?

v20.11.1

Have you tried reproducing the issue with the latest release?

yes

What is the hardware spec (RAM, OS)?

OS

Steps to reproduce the issue (command/config used to run Dgraph).

Expected behaviour and actual result.


Experience Report for Feature Request

Note: Feature requests are judged based on user experience and modeled on Go Experience Reports. These reports should focus on the problems: they should not focus on and need not propose solutions.

What you wanted to do

I download the latest version dgo ,and I want to use the demo.but when I login the gRpc port 9080
It’s failed.

=== RUN   Example_getSchema
2021/02/22 16:30:38 While trying to login rpc error: code = Unknown desc = invalid username or password

this is the code

conn, err := grpc.Dial("127.0.0.1:9080", grpc.WithInsecure())
	if err != nil {
		log.Fatal("While trying to dial gRPC")
	}

	dc := api.NewDgraphClient(conn)
	dg := dgo.NewDgraphClient(dc)
	ctx := context.Background()

	// Perform login call. If the Dgraph cluster does not have ACL and
	// enterprise features enabled, this call should be skipped.
	for {
		// Keep retrying until we succeed or receive a non-retriable error.
		err = dg.Login(ctx, "groot", "password")
		if err == nil || !strings.Contains(err.Error(), "Please retry") {
			break
		}
		time.Sleep(time.Second)
	}
	if err != nil {
		log.Fatalf("While trying to login %v", err.Error())
	}

and when I debug I found the context is empty .I don’t know if context is empty would influence the dgo client login?
I 'm sure 9080 port is alive .
I run dgraph by
`` docker run --rm -it -p 8080:8080 -p 9080:9080 -p 8000:8000 -v ~/dgraph:/dgraph dgraph/standalone:v20.11.1`

What you actually did

Why that wasn’t great, with examples

Any external references to support your case