Skip to content

Uncaught grpc error #1205

Description

@richardkazuomiller

Not sure what's causing this error which crashes the process.

/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2440
                            throw Error(this+"#"+keyOrObj+" is not a field: undefined");
                            ^

Error: .google.datastore.v1beta3.Value#name is not a field: undefined
    at Error (native)
    at MessagePrototype.set (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2440:35)
    at MessagePrototype.set (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2434:38)
    at Message (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2363:34)
    at ProtoBuf.Reflect.ElementPrototype.verifyValue (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:1877:28)
    at new ProtoBuf.Map.Map (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:4894:46)
    at ProtoBuf.Reflect.FieldPrototype.verifyValue (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:3427:28)
    at MessagePrototype.set (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2443:59)
    at MessagePrototype.set (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2434:38)
    at Message (/Users/richardkazuomiller/Sites/momoclo/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2363:34)

@stephenplusplus HALP!

Activity

  1. stephenplusplus commented on Apr 5, 2016

    @stephenplusplus
    Contributor

    I'm here, I'm here! Can you show the gcloud-node code that triggers this?

  2. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: datastoreIssues related to the Datastore API.
    on Apr 5, 2016
  3. richardkazuomiller commented on Apr 5, 2016

    @richardkazuomiller
    Author

    It's hard to trace because the error stack trace doesn't show any of my code but I think I narrowed it down to this transaction

    self.googleDataset.runInTransaction(function(transaction, done) {
          transaction.get(key, function(err, entity) {
            if (err) {
              try{
                transaction.rollback(done);
              }
              catch(e){
                _done(err)
              }
              return;
            }
    
            if(entity && entity.data){
              extend(entity.data,data)
            }
            else{
              entity = {
                key: key,
                data : data
              }
            }
    
            transaction.save(entity)
    
            done();
          });
        }, function(err) {
    
        });
    
  4. richardkazuomiller commented on Apr 5, 2016

    @richardkazuomiller
    Author

    This is the key path

    [ 'ComradeServer', 'bfbf170a-782b-41d8-bef9-d01f3c5473d4' ]
    

    and this is the entity

    { key: 
       Key {
         namespace: undefined,
         name: 'bfbf170a-782b-41d8-bef9-d01f3c5473d4',
         kind: 'ComradeServer',
         path: [Getter] },
      data: 
       { role: 'app',
         alive: true,
         created: 1459859557961,
         updated: 1459859557969,
         metadata: { ip: '127.0.0.1', port: '8006' } } }
    
  5. stephenplusplus commented on Apr 5, 2016

    @stephenplusplus
    Contributor

    Reproduced. Working on a fix, I'll ping you when the PR is ready.

  6. richardkazuomiller commented on Apr 5, 2016

    @richardkazuomiller
    Author

    Awesome. Thanks!

  7. stephenplusplus commented on Apr 5, 2016

    @stephenplusplus
    Contributor

    PR sent! #1206

  8. stephenplusplus commented on Apr 5, 2016

    @stephenplusplus
    Contributor

    v0.30.2 released!

  9. 5o50 commented on Aug 15, 2016

    @5o50

    I have the same error when trying to call datastore.get() passing an Array of 300+ Datastore keys. It works under 300 keys, is it a Protobuf limitation ? I think it opens too much network sockets

    [nodemon] starting `node server.js`
    info: api-svc ✓ PORT: 3000 PID: 1816 NODE_ENV: staging
    INPUT 304
    error: Unhandled Promise Rejection: Error: .google.datastore.v1beta3.Key#name is not a field: undefined
        at Error (native)
        at MessagePrototype.set (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:2440:35)
        at MessagePrototype.set (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:2434:38)
        at Message (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:2363:34)
        at ProtoBuf.Reflect.ElementPrototype.verifyValue (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:1877:28)
        at ProtoBuf.Reflect.FieldPrototype.verifyValue (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:3417:43)
        at MessagePrototype.set (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:2443:59)
        at MessagePrototype.set (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:2434:38)
        at Message (/Users/baltaci/Desktop/api-svc/node_modules/protobufjs/dist/ProtoBuf.js:2363:34)
        at serialize (/Users/baltaci/Desktop/api-svc/node_modules/grpc/src/node/src/common.js:87:23)
        at Client.makeUnaryRequest (/Users/baltaci/Desktop/api-svc/node_modules/grpc/src/node/src/client.js:381:19)
        at Client.clientMethodTrace [as lookup] (/Users/baltaci/Desktop/api-svc/node_modules/@google/cloud-trace/lib/hooks/userspace/hook-grpc.js:52:23)
        at Object.retryOpts.request (/Users/baltaci/Desktop/api-svc/node_modules/@google-cloud/common/src/grpc-service.js:245:32)
        at makeRequest (/Users/baltaci/Desktop/api-svc/node_modules/retry-request/index.js:88:28)
        at retryRequest (/Users/baltaci/Desktop/api-svc/node_modules/retry-request/index.js:58:3)
        at Datastore.GrpcService.request (/Users/baltaci/Desktop/api-svc/node_modules/@google-cloud/common/src/grpc-service.js:263:3)
    [nodemon] app crashed - waiting for file changes before starting...
    rs
    [nodemon] starting `node server.js`
    info: api-svc ✓ PORT: 3000 PID: 1828 NODE_ENV: staging
    INPUT 300
    300
    info: POST /graphql? 200 4053ms
    INPUT 300
    300
    info: POST /graphql? 200 2052ms
    
  10. stephenplusplus commented on Aug 16, 2016

    @stephenplusplus
    Contributor

    Reproduced. I'm going to open a new issue for this.

  11. amdp-chauhan commented on Nov 29, 2018

    @amdp-chauhan

    Hi, I am using grpc along with Node.js and facing similar issue:

    Error: 13 INTERNAL: .employees.Empty#$__ is not a field: undefined

    Facing this when trying call callback from server stub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: datastoreIssues related to the Datastore API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions