rippled icon indicating copy to clipboard operation
rippled copied to clipboard

`subscribe` method doesn't create a listener ( Rippled Version: 2.2.0 ) ( "xrpl": "^3.1.0" )

Open zcwessels opened this issue 1 year ago • 0 comments

Issue Description

When using the subscribe command after connecting to our node a subscription is not created. We know this because when we do transactions ( TrustSet, Payment ect. ) no data is sent to our endpoint and the response body is malformed. The "status": "success" field id missing from the SubscribeResponse.

Steps to Reproduce

  • Step 1 Connect to a local node as admin.
const client = await this.connectClient();
  • Step 2 Create the subscription for a given address
const response = await client.request({
    "command": "subscribe",
    "accounts": ["rGMksprA2FzntXjuc8zkeyhJPnjDBHUcTL"],
    "url": this.baseHandlerUrl + "handleXRPStream/", // we know this endpoint is functional because the previouse version of the node used it
});
  • Step 3 The response.status field seems to be missing. The response value:
{ 
  "id": 17,
  "result": {}, 
  "type": "response"
}

Expected Result

When creating the subscription a listener should be created, and should send events to my endpoint. The response body should't be malformed and should display a status of success. Example:

{
  "id": "Example watch Bitstamp's hot wallet",
  "status": "success",
  "type": "response",
  "result": {}
}

Actual Result

The subscription is never created and the response body is malformed when creating the subscription Example:

{ 
  "id": 17,
  "result": {}, 
  "type": "response"
}

Environment

Rippled Node Linux xrpaynet-rippled-min2 4.19.0-26-cloud-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64 GNU/Linux rippled version 2.2.0

Backend that interacts with the node lang: Typescript node: v20.13.1 package: "xrpl": "^3.1.0"

zcwessels avatar Jun 12 '24 06:06 zcwessels