Repository navigation
Logger breaks on nested objects #1302
Copy link
Copy link
Closed
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.
Description
Activity
- addedapi: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.
on May 10, 2016 I'll look right into this, thanks for reporting!
The raised error is:
/Users/mike/testProject/node_modules/protobufjs/dist/ProtoBuf.js:2440 throw Error(this+"#"+keyOrObj+" is not a field: undefined"); ^ Error: .google.protobuf.Value#fields is not a field: undefined at Error (native) at MessagePrototype.set (/Users/mike/testProject/node_modules/protobufjs/dist/ProtoBuf.js:2440:35) at MessagePrototype.set (/Users/mike/testProject/node_modules/protobufjs/dist/ProtoBuf.js:2434:38) at Message (/Users/mike/testProject/node_modules/protobufjs/dist/ProtoBuf.js:2363:34) at ProtoBuf.Reflect.ElementPrototype.verifyValue (/Users/mike/testProject/node_modules/protobufjs/dist/ProtoBuf.js:1877:28) at new ProtoBuf.Map.Map (/Users/mike/testProject/node_modules/protobufjs/dist/ProtoBuf.js:4894:46) at ProtoBuf.Reflect.FieldPrototype.verifyValue (/Users/mike/testProject/node_modules/protobufjs/dist/ProtoBuf.js:3427:28)It works this way!
Great!@stephenplusplus didn't this one make it to 0.33.0 on npm? facing the same issue here in my docker container
It did. Can you paste the code to reproduce and the error?
Yes one sec, ps logging breaks with entries containing boolean fields as well throwing the error:
/src/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2440 throw Error(this+"#"+keyOrObj+" is not a field: undefined"); ^ Error: .google.protobuf.Value#booleanValue is not a field: undefined
bigquery.createDataset(datasetName, function(err, dataset) { if (err && err.code !== 409) throw err; logger.createSink(loggerName, { destination: bigquery.dataset(datasetName) }, function(err, sink){ if (err && err.code !== 409) throw err; console.log('logger service started.'); log = logger.log('syslogs'); nc.subscribe('events.logger.error', function(data){ _syslog(data); }) }); function _syslog(data) { var entry = log.entry({}, data); log.write(entry, (err, apiResponse) =>{ console.log(err, apiResponse); }); }
The data I'm writing looks like this:
{ error: 'Unprocessable Entity', message: 'Please check your phone number and try again.', code: 422, retry: false, whoami: { image: 'service-sms', port: 5000, online: true, host: '46.101.140.203', name: 'sms', region: 'local', version: '0.0.1', dockerhost: '172.17.0.5', publichost: '46.101.140.203', ports: [ 5000 ] }, severity: 'INFO', origin: 'server', method: 'send', request: { to: 'xx', text: 'hello world' } }
Yup, one sec please
It's throwing this error:
/src/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2440 throw Error(this+"#"+keyOrObj+" is not a field: undefined"); ^ Error: .google.api.MonitoredResource#image is not a field: undefined(It's also screaming about
autoPaginateelsewhere in my code not being a function, wondering if the datastore query API has changed)grr sorry my bad sec please
Ok that seemed to have fixed this error! the callback returns error 400 though, I'm not sure why that is
11 remaining items
- added 4 commits that reference this issue
on Nov 11, 2022 - added a commit that references this issue
on Mar 5, 2026
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.
Hi,
I'm facing a real strange problem:
after updating to 0.32.0 the logging service breaks when a nested object is passed.
es:
Thanks in advance