Closed JoshOrndorff closed 6 years ago
This should have been a trivial fix which I've committed in 470eb0ef87f64860667a79c3582f3cb1e0190498
Now hitting an error that appears to have been experienced by others: https://groups.google.com/forum/#!topic/protobuf/HWx1U_-cJ4g
$ node rnodeAPI.js localhost 4041
/home/joshy/ProgrammingProjects/RChain-API/node_modules/protobufjs/src/root.js:243
throw Error("unresolvable extensions: " + this.deferred.map(function(field) {
^
Error: unresolvable extensions: 'extend google.protobuf.FileOptions' in .scalapb, 'extend google.protobuf.MessageOptions' in .scalapb, 'extend google.protobuf.FieldOptions' in .scalapb, 'extend google.protobuf.EnumOptions' in .scalapb, 'extend google.protobuf.EnumValueOptions' in .scalapb
at Root.resolveAll (/home/joshy/ProgrammingProjects/RChain-API/node_modules/protobufjs/src/root.js:243:15)
at Object.loadSync (/home/joshy/ProgrammingProjects/RChain-API/node_modules/@grpc/proto-loader/build/src/index.js:153:16)
at RNode (/home/joshy/ProgrammingProjects/RChain-API/rnodeAPI.js:40:41)
at integrationTest (/home/joshy/ProgrammingProjects/RChain-API/rnodeAPI.js:340:14)
at Object.<anonymous> (/home/joshy/ProgrammingProjects/RChain-API/rnodeAPI.js:397:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Oh! This is why I originally commented the scalapb stuff in the first place. Commenting out the import scalapb.proto line from each proto file gets us past this error.
Now stuck on
Error: 14 UNAVAILABLE: Connect Failed
at Object.exports.createStatusError (/home/joshy/ProgrammingProjects/RChain-API/node_modules/grpc/src/common.js:87:15)
at Object.onReceiveStatus (/home/joshy/ProgrammingProjects/RChain-API/node_modules/grpc/src/client_interceptors.js:1188:28)
at InterceptingListener._callNext (/home/joshy/ProgrammingProjects/RChain-API/node_modules/grpc/src/client_interceptors.js:564:42)
at InterceptingListener.onReceiveStatus (/home/joshy/ProgrammingProjects/RChain-API/node_modules/grpc/src/client_interceptors.js:614:8)
at callback (/home/joshy/ProgrammingProjects/RChain-API/node_modules/grpc/src/client_interceptors.js:841:24)
@dckc I need your debugging help.
ugh.
typo: deprecate, not depricate
Woah, how did github know to close the issue? Is it because of the commit message?
yes.
https://github.com/JoshOrndorff/RChain-API/blob/master/rnodeAPI.js#L40 uses
grpc.load
which is deprecated and generates warnings.DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
The @grpc/proto-loader is demonstrated at https://grpc.io/docs/tutorials/basic/node.html#loading-service-descriptors-from-proto-files
Previously we ran into problems with this approach because we had to serialize data client-side. Now that we're using https://github.com/dcodeIO/protobuf.js making this switch seems feasible.