Version 2.0.1:
Hi I am getting the following error when running any code from the readme…
(node:58011) UnhandledPromiseRejectionWarning: TypeError: jspb.Message.getBooleanFieldWithDefault is not a function
at Function.proto.api.Request.toObject (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/generated/api_pb.js:368:28)
at proto.api.Request.toObject (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/generated/api_pb.js:350:28)
at Object.stringifyMessage (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/util.js:52:31)
at Txn.<anonymous> (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/txn.js:132:64)
at step (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/txn.js:43:23)
at Object.next (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/txn.js:24:53)
at /Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/txn.js:18:71
at new Promise (<anonymous>)
at __awaiter (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/txn.js:14:12)
at Txn.doRequest (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/txn.js:112:16)
1.1.0
Checked in the logs of each container, all showing v1.1.0, and running without problems. Running new upserts from ratel dashboard works as well.
Getting this error in the js client when doing anything more than initializing the client…
Also tried running with play.dgraph.io as the db, but same error occurs.
can you delete any previously existing data (volumes)?
Also, make sure to pull the latest version from docker-hub - preferably use dgraph/dgraph:v1.1.0.
I just uninstall and reinstalled dgraph-js with yarn, thinking that maybe v2.0.1 had been installed improperly and strangely this is now the error I get:
Do request:
{"startTs":0,"query":"query all($a: string) {\n all(func: eq(name, $a))\n {\n name\n }\n }","varsMap":[["$a","Alice"]],"readOnly":false,"bestEffort":false,"mutationsList":[],"commitNow":false}
(node:88133) UnhandledPromiseRejectionWarning: TypeError: Incorrectly typed arguments to startBatch
at _startBatchIfReady (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client_interceptors.js:752:10)
at Object.final_requester.start (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client_interceptors.js:801:21)
at InterceptingCall._callNext (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client_interceptors.js:421:43)
at InterceptingCall.start (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client_interceptors.js:456:8)
at next (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client_interceptors.js:453:22)
at InterceptingCall._callNext (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client_interceptors.js:428:12)
at InterceptingCall.start (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client_interceptors.js:456:8)
at ServiceClient.Client.makeUnaryRequest (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client.js:585:21)
at ServiceClient.method_func [as query] (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/grpc/src/client.js:1000:43)
at /Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/util.js:46:15
And with your code example I get this error:
Alter request:
{"schema":"\n name: string @index(exact) .\n age: int @index(int) .\n friend: [uid] @reverse .\n ","dropAttr":"","dropAll":false,"dropOp":0,"dropValue":""}
(node:90442) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'serializeBinary' of undefined
at Object.createPayload (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/types.js:65:105)
at DgraphClient.<anonymous> (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/client.js:86:36)
at step (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/client.js:32:23)
at Object.throw (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/client.js:13:53)
at rejected (/Users/paulrostorp/Documents/Apps/kickoff-project/kickoff-api/node_modules/dgraph-js/lib/client.js:5:65)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
By “deleting data volumes” you mean delete the “p”, “w” and “zw” folder in “/data” ? If so I had already done so when updating to v1.1.0
I see. The Dgraph client is not able to be initialized properly.
First of all, let’s pull the latest image from docker-hub, and the make sure Dgraph cluster is up and running. Try running some mutation and queries from either curl/tour/ratel.
Then, let’s make sure DGRAPH_HOST env var is accessible.
If not, using process.env.DGRAPH_HOST+":9080" will be getting resolved to undefined:9080.
Thank you for your help. Are there any steps you’d like me to take in order to better understand the root of the problem ? Personally I cannot make sense of the errors thrown