Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure in npm/google-cloud@0.44.0 #1806

Closed
abawany opened this issue Nov 19, 2016 · 3 comments
Closed

Failure in npm/google-cloud@0.44.0 #1806

abawany opened this issue Nov 19, 2016 · 3 comments
Assignees
Labels
api: logging Issues related to the Cloud Logging API.

Comments

@abawany
Copy link

abawany commented Nov 19, 2016

Trying to upgrade from 0.41.2 to 0.44.0. No idea why this is happening.

/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:2472
                            throw Error(this+"#"+keyOrObj+" is not a field: undefined");
                            ^

Error: .google.logging.v2.LogEntry#type is not a field: undefined
    at Error (native)
    at MessagePrototype.set (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:2472:35)
    at MessagePrototype.set (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:2466:38)
    at Message (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:2395:34)
    at ProtoBuf.Reflect.ElementPrototype.verifyValue (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:1909:28)
    at ProtoBuf.Reflect.FieldPrototype.verifyValue (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:3455:43)
    at MessagePrototype.set (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:2475:59)
    at MessagePrototype.set (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:2466:38)
    at Message (/x/node_modules/google-cloud/node_modules/protobufjs/dist/protobuf.js:2395:34)
    at serialize (/x/node_modules/google-cloud/node_modules/grpc/src/node/src/common.js:87:23)
@stephenplusplus
Copy link
Contributor

Could you show the code that's producing the error?

@stephenplusplus stephenplusplus added the api: logging Issues related to the Cloud Logging API. label Nov 21, 2016
@abawany
Copy link
Author

abawany commented Nov 22, 2016

Here is a method to duplicate the error (which isn't working for me today so I guess I will close the bug):

  • Install deps (in a clean dir):
npm install winston
npm install winston-googlecloud
  • Code that shows the error:
node
> process.env.GCLOUD_PROJECT='gcloud-project-name';
> let winston = require('winston');
> require('winston-googlecloud');
> let opts = {level: 'info', gcl_project_id: process.env.GCLOUD_PROJECT, gcl_log_name: 'some-log'};
> winston.add(winston.transports.GoogleCloudLogging, opts);
> winston.error({t: true, 'hello': 'something'});

On Saturday (11/19/16), this was generating the above error for me but today the log shows up in gcloud as expected. I rolled my code back already to use gcloud@0.37.0 for now and will try to migrate to google-cloud@latest at some point in the future.

@abawany abawany closed this as completed Nov 22, 2016
@stephenplusplus
Copy link
Contributor

This is probably because of a change we made in our Logging module (#1666). winston-googlecloud doesn't depend on a specific version of google-cloud, it just pulls the latest. If they locked down to an older version, that would work. Otherwise, they'll need to make changes to accommodate the restructure introduced in #1666.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API.
Projects
None yet
Development

No branches or pull requests

2 participants