ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

subscribepeerorders - Unhandled 'error' event #423

Closed offerm closed 6 years ago

offerm commented 6 years ago

Here is what I did:

Connect 2 XUDs:

admins-MacBook-Pro-2:xud admin$ ./bin/xucli -p 7002 connect 0235584e2ac9a34a13ce6f6dc9fb8aa1e7918d7701f0b4b69dc002887e6b3fbba3@localhost:8885
(node:94239) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
{
  "result": "Connected to peer 0235584e2ac9a34a13ce6f6dc9fb8aa1e7918d7701f0b4b69dc002887e6b3fbba3"
}

Listen to the straem:

admins-MacBook-Pro-2:xud admin$ ./bin/xucli  -p 7002 subscribepeerorders
(node:94240) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Place an order:

admins-MacBook-Pro-2:xud admin$ ./bin/xucli -p 7001 limitorder LTC/BTC 3 0.0025 .008779
(node:94241) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
{
  "matchesList": [],
  "remainingOrder": {
    "price": 0.008779,
    "quantity": 0.0025,
    "pairId": "LTC/BTC",
    "peerPubKey": "",
    "id": "09752dc0-ad0b-11e8-b163-9f8d75743af1",
    "localId": "3",
    "createdAt": 1535712354972,
    "invoice": "",
    "canceled": false
  }
}

Listening to stream failed:

admins-MacBook-Pro-2:xud admin$ ./bin/xucli  -p 7002 subscribepeerorders
(node:94240) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: 13 INTERNAL: Expected argument of type xudrpc.SubscribePeerOrdersResponse
    at Object.exports.createStatusError (/Users/admin/github/xud/node_modules/grpc/src/common.js:87:15)
    at ClientReadableStream._emitStatusIfDone (/Users/admin/github/xud/node_modules/grpc/src/client.js:235:26)
    at ClientReadableStream._receiveStatus (/Users/admin/github/xud/node_modules/grpc/src/client.js:213:8)
    at Object.onReceiveStatus (/Users/admin/github/xud/node_modules/grpc/src/client_interceptors.js:1256:15)
    at InterceptingListener._callNext (/Users/admin/github/xud/node_modules/grpc/src/client_interceptors.js:564:42)
    at InterceptingListener.onReceiveStatus (/Users/admin/github/xud/node_modules/grpc/src/client_interceptors.js:614:8)
    at /Users/admin/github/xud/node_modules/grpc/src/client_interceptors.js:1019:24
Emitted 'error' event at:
    at ClientReadableStream._emitStatusIfDone (/Users/admin/github/xud/node_modules/grpc/src/client.js:236:12)
    at ClientReadableStream._receiveStatus (/Users/admin/github/xud/node_modules/grpc/src/client.js:213:8)
    [... lines matching original stack trace ...]
    at /Users/admin/github/xud/node_modules/grpc/src/client_interceptors.js:1019:24
admins-MacBook-Pro-2:xud admin$ 
kilrau commented 6 years ago

Make sure this is fixed in the redesign: https://github.com/ExchangeUnion/xud/issues/123

sangaman commented 6 years ago

The rpc subscription calls were totally revamped with #500 and passed my tests as part of that PR, so I'm closing this.