googleapis / nodejs-web-risk

This repository is deprecated. All of its content and history has been moved to googleapis/google-cloud-node.
https://cloud.google.com/web-risk/
Apache License 2.0
18 stars 10 forks source link

fix: use compatible version of google-gax #64

Closed alexander-fenster closed 4 years ago

alexander-fenster commented 4 years ago

Starting from google-gax v1.2.0, it's OK to pass just one filename to loadProtos. Many users report issues when the newer client library still uses older version of google-gax, passing one filename parameter to an older loadProtos that still expects to see two parameters, causing weird error message:

TypeError: Cannot read property 'length' of undefined
    at Root.load (/srv/node_modules/protobufjs/src/root.js:192:44)
    at Root.loadSync (/srv/node_modules/protobufjs/src/root.js:235:17)
    at Object.loadSync (/srv/node_modules/@grpc/proto-loader/build/src/index.js:230:27)
    at GrpcClient.loadFromProto (/srv/node_modules/google-gax/build/src/grpc.js:118:44)
    at GrpcClient.loadProto (/srv/node_modules/google-gax/build/src/grpc.js:145:21)

One other important change is the set of correct headers for both gRPC and fallback scenarios.

Also, the newer google-gax pulls in the latest @grpc/grpc-js v0.6.3 which resolves some of the issues with connections.

This set of auto-PRs updates the google-gax to the latest version 1.6.3.

codecov[bot] commented 4 years ago

Codecov Report

Merging #64 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #64   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          82     82           
=====================================
  Hits           82     82

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5752e37...5131e23. Read the comment docs.