platform icon indicating copy to clipboard operation
platform copied to clipboard

nodeForage throws error on fresh network

Open dashameter opened this issue 3 years ago • 0 comments

Using dashmate with nodeForage as a wallet.adapter throws after a network reset:

error: Error injecting plugin Assertion failed Error [AssertionError]: Assertion failed
    at new goog.asserts.AssertionError (node_modules/google-protobuf/google-protobuf.js:87:1065)
    at Object.goog.asserts.doAssertFailure_ (node_modules/google-protobuf/google-protobuf.js:88:257)
    at Object.goog.asserts.assert (node_modules/google-protobuf/google-protobuf.js:89:83)
    at jspb.BinaryWriter.writeUint32 (node_modules/google-protobuf/google-protobuf.js:443:78)
    at Function.proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest.serializeBinaryToWriter (node_modules/@dashevo/dapi-grpc/clients/core/v0/nodejs/core_protoc.js:4792:12)
    at proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest.serializeBinary (node_modules/@dashevo/dapi-grpc/clients/core/v0/nodejs/core_protoc.js:4754:65)
    at protobufToJson (node_modules/@dashevo/grpc-common/lib/client/converters/protobufToJsonFactory.js:19:35)
    at Object.sendMessage (node_modules/@dashevo/grpc-common/lib/client/interceptors/jsonToProtobufInterceptorFactory.js:36:14)
    at InterceptingCall.sendMessageWithContext (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:214:24)
    at InterceptingCall.sendMessage (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:228:14) {
  reportErrorToServer: true,
  messagePattern: 'Assertion failed'
}
node_modules/@dashevo/wallet-lib/src/types/Account/_preparePlugins.js:16
          this.emit('error', e, {
               ^

TypeError: this.emit is not a function
    at node_modules/@dashevo/wallet-lib/src/types/Account/_preparePlugins.js:16:16

The wallet.adapter must be disabled or the nodeForage db.json file deleted to avoid this error message.

this.emit should also be fixed accordring to @markin-io https://discord.com/channels/670271785974890526/718217459144065045/989793396208046130

dashameter avatar Jun 24 '22 08:06 dashameter