Posts

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 18): AssertionError [ERR_ASSERTION]: issuer must be defined

Free training on Ripple development. Click here for details.
If you are trying to submit a transaction (in my case Check Cash using issued currency), and getting the error "AssertionError [ERR_ASSERTION]: issuer must be defined" , then the cause could be missing value for ripple account of issuer.

For example, in my case, I created a check in the XRP ledger using the CreateCheck transaction  by sender successfully, but when the receiver account was trying to cash the check, the payload did not mentioned the sender address resulting in above error. Below is the payload giving the error :

{ "checkID":checkID,
"amount": {
    "currency": "USD",
    "value": ""+checkAmount
  }
}

To fix the error, I had to add the counterparty parameter as highlighted below and the check got cashed.

checkCashTx = { "checkID":checkID,
"amount": {
    "currency": "USD",
"counterparty":sender,
   …

Ripple tecPATH_DRY error

Free training on Ripple development. Click here for details.
If you are trying to  do a payment transaction and using issued currency (eg. USD) for the payment, you may come across below error during the transaction : 
{ resultCode: 'tecPATH_DRY',  resultMessage: 'Path could not send partial amount.' }
The reason for above error is that for transactions involving issued currency , a trustline has to be established between sender and receiver before doing the actual transaction like Payment. 
Fix:
To fix the issue, create a trustline transaction as illustrated below . Note that the counter party in the trustline should be sender address and the trustline transaction should be prepared and signed by receiver as highlighted in bold below.
//payload for trustline trustlineTxt={ "currency":"USD", "counterparty":sender, "limit":""+trustlineAmount      }
trustlineTxtJSON = {} txres='' api.prepareTrustline(receiver,trustline…

tecNO_PERMISSION - No permission to perform requested operation

Free training on Ripple development. Click here for details.
If you are trying to submit some ripple transaction, and coming across
"tecNO_PERMISSION - No permission to perform requested operation" 
in the transaction response, then the probable cause could be that the sender does not have permission to do this operation.

For example,
1. The EscrowCreate transaction tried to create an Escrow with FinishAfter time which is not adjusted for Ripple Epoch .
2. Someone tried to use PaymentChannelFund on a channel the sender does not own,
3. A Payment tried to deliver funds to an account with the "DepositAuth" flag enabled.

Fix:
Below is an example of request payload where the transaction returned tecNO_PERMISSION 

{
            "TransactionType": "EscrowCreate",
            "Account": sender,
            "Fee" : _fee+"",
    "Amount": "10000",
            "Destination": receiver,
"FinishAft…

RippledError Submit failed resultCode: 'temMALFORMED while submitting a transaction

Free training on Ripple development. Click here for details.
If you are submitting a signed ripple transaction and the transaction payload is not having all the fields required for the transaction , the response will come as rejected with temMALFORMED resultCode as shown below :

Promise {
[RippledError(Submit failed, { resultCode: 'temMALFORMED',
  resultMessage: 'Malformed transaction.' })],
  domain:
   Domain {
     domain: null,
     _events: { error: [Function: debugDomainError] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [] } }

Fix:

Refer the Ripple documentation for all the fields for your transaction types and try submitting the transaction with values for all the possible fields even if the documentation says the field is optional.

For example, for a "PaymentChannelClaim" , the documentation mentions "Balance" as optional field , so below requrest was submitted without "Balance" parameter but it resulted i…

Ripple Development and Training Suit

Please note that new training videos are added frequently.
Subscribe to our newsletter to get updates on products, videos and support.

Click here to see video tutorials on how to use the "Ripple Development and Training Suit" .


Ethereum Developer Kit

Please note that new training videos are added frequently.
Subscribe to our newsletter to get updates on products, videos and support.

Click here to see video tutorials on how to use the Ethereum Developer kit .