Coder Social home page Coder Social logo

Comments (44)

sublimator avatar sublimator commented on May 28, 2024

What do you mean the transaction succeeded? The money was actually sent? You verified this how?

If you are seeing transactions that seem to have made it into the ledger but ripple-lib is telling you are failed, it's possible that just the Fee was claimed.

There's a class of transaction results, tec*, that signifies the transaction failed, but it does claim(the c in tec) a Fee.

Anything that claims a Fee must alter an AccountRoot (where an account's xrp Balance is stored) in the ledger.

The only way a ledger entry can be modified is via a transaction. You can look at transaction metadata to determine what the "successful" transaction actually changed.

http://ripple.com/tools/info is useful for this task.

Do you have any transactionID or transaction hashes for the "successful" transactions?

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

6EB44A3F84DFC271D50EDEFBA59B459F5EF08C56DBC67F9FDAB0C53CAC3FDD02

this is one of the transactions. My code implements automatic deposit, so many times send IOU like this transactions.

I find this situation when I see the error message mail send by my code(about 10+ times). I think it is not normal, then, I use https://ripple.com/graph/#rwVJd5YWGhvhhDEPaJR3hjN5feGk6bQXmY, find that 2013-11-30, about 10+times send 100CNY, every transaction succeeded,but my code recive error message like
"RippleError: Path could not send partial amount"( this error message record by my code)
tx.submit(function (txerr, res) {
if (txerr) {
//log txerr ==RippleError: Path could not send partial amount
// I write this message in my database and send a email to me.
//res is undefined
}
});

so I don't know why? please help me

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP

Is this your account you are sending from?

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

https://ripple.com/tools/info/#17D58C3BDD1827B07602F84D47CEA10CB92A147607F3EA80E068DF3147B7C4DB

Please expand the meta and note the tecPATH_DRY TransactionResult

https://ripple.com/tools/info/#3621330

You can see the ledger was from the 30th of November

https://gist.github.com/sublimator/ed0962d0b79a38c72768

Check this list of transactions ^

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Interestingly, I saw no tecPATH_PARTIAL transactions for sending 100CNY

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Transactions sending CNY from "rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP" that
resulted in tecPATH_PARTIAL

https://gist.github.com/sublimator/eb577e2ddfa48eb526da

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Note that all of those transactions bar 1 didn't specify Paths/SendMax

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

How are you logging failed transactions?

How are you mapping a ripple transaction to a given deposit?

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

I only log the the error message, not log the transaction.

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

So you don't really know it was the 100 CNY transactions that were erring

It could have been any in that last gist I created for you.

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

I didn't log the transaction, but the CNY number use which the transactions used
so I think the log's

RPCWrapper.ripplePay(user_wallet,deposit.amount, 'CNY', function (err, txid) {
if (err) {
var msg = "my use and the deposit infomation" + deposit.amount + 'remote error='+err;
//then send email to me and log to database
}
......
}, function(){
//some unlock code,because I send IOU to my user, I lock the deposit.
if error,then, unlock the deposit.
});

ripplePay:
function _ripplePay(payto, amount, currency, callback, unlockCallback) {
currency = currency.toUpperCase();
var _remote = getRemoteByCurrency(currency);
var _from = getPayFromWalletByCurrency(currency);
var _amount = Amount.from_human(amount + currency);

if (currency != 'XRP') _amount.set_issuer(CONST.GATEWAY_ADDR);
else _amount.set_issuer(_from);
var log = { amount: amount, currency: currency, des: payto }

//1.record auto pay log
AutoPayLog.newAndSave(log, function (err, logObj) {
if (err) {
Log.fError(err);
return;
}
var tx = _remote.transaction();

tx.payment({
  from: _from,
  to: payto,
  amount: _amount
});

tx.submit(function (txerr, res) {
if (txerr) {
var errmsg = '';
if (res != undefined) {
logObj.state = res.error;
logObj.msg = res.error_message;
errmsg = res.error_message
}
else {
logObj.state = "undefined error";
logObj.msg = "undeined message";
errmsg = "unknow error";
}

    logObj.save(function (err) {
      if (err)


      if (typeof callback == 'function')
        callback(txerr, null);
    });

    if (typeof unlockCallback == 'function')
      unlockCallback();
  }

...
}

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

I get the error message show me that, 100CNY and a error message like remote error=RippleError: Path could not send partial amount

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

What account you were sending from?

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Definitely rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP?

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

and when I get error RippleError: Path could not send partial amount;
tx.submit(function (txerr, res) ..

the res is undefined,"So you don't really know it was the 100 CNY transactions that were erring "
I can't get any res,So I can‘t log that

var src_cny = 'rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP'; this is the hot wallet

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

You can log tx.tx_json :)

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

But anyway, you said you logged the 100CNY amount yes?

I didn't see any 100CNY transactions in the ledger that had tecPATH_PARTIAL

Can you check again?

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

I didn't log tx.tx_json ,So I only see the error message.
I also couldn't find any 100CNY transaction in this URL https://gist.github.com/sublimator/ed0962d0b79a38c72768

but my log show me this, and my code all show to you. I sure I log the amount and the error message.

I will continue to track the problem

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

I aslo couldn't find any 100CNY transaction in this URL https://gist.github.com/sublimator/ed0962d0b79a38c72768

Please note that the error message would be different, as it's tecPATH_DRY, not tecPATH_PARTIAL

Only the second gist I made for you contains tecPATH_PARTIAL

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Can you gist me part of your logs ?

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

taobao tradeid:20131130XXXXXXXX1111(Privacy),amount:100.00,remark:(my gateway's some unique deposit remark).Please manual processing this deposit remote error=RippleError: Path could not send partial amount. user's email:[email protected](Privacy)

this is the log content

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

I see nothing about any currency in that log

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

sorry,the currency only CNY, no other current, so I write in log without the currency

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

I recive 13 email the same content about 100 and RippleError: Path could not send partial amount

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Oh, wait, sorry, I've made a mistake (I'm working on something else atm)

    {   tecPATH_DRY,            "tecPATH_DRY",              "Path could not send partial amount."                   },
    {   tecPATH_PARTIAL,        "tecPATH_PARTIAL",          "Path could not send full amount."                      },

There are 14 100 CNY transactions here: https://gist.github.com/sublimator/ed0962d0b79a38c72768

The transactions made it into the ledger but couldn't send funds.

tecPATH_DRY == "Path could not send partial amount."

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Anyway, it seems it's as I suspected originally, the Fee was claimed, and thus the transaction made it into the ledger (not to be confused with tesSUCCESS)

You may want to log the following in the future for all transactions:

tx.submittedTxnIDs
tx.tx_json

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

It will make things easier to debug

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

What causes this situation? How can I avoid?

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

Thank you sublimator , I will log more infomation

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

I think it's because there is no trust (at all), or insufficient funds in the hot wallet

If you look at https://gist.github.com/sublimator/ed0962d0b79a38c72768 you will see there is no Paths field set.

That means there must be a direct trustline between the recipient and the hot wallet account.

https://gist.github.com/sublimator/ed0962d0b79a38c72768

You could look at all the Destination addresses in that gist to see if there's a supporting trust line

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

https://ripple.com/tools/info/#rwVJd5YWGhvhhDEPaJR3hjN5feGk6bQXmY

If you look at the account_lines there ^ it doesn't seem the hot wallet is trusted at all.

Before submitting a payment transaction you could check if there's a path either by querying for a RippleState ledger entry or using the path finding api.

If they need to first trust you you could send them an email, and retry the deposit later

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

Thank you sublimator, remain this issuer, please. I will find other data show you . I will go home.
I will show you later.

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

hello,sublimator, can you find this rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ wallet's 30 CNY transaction ?
I use https://ripple.com/tools only can get last 20

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

I saw no payments to that account from the hot wallet

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

https://ripple.com/graph/#1D5DD310D18559CF94930568C9C8CB97E2DC6DBDC82E923F78F8E89B212FFA74
Amount: 30 CNY
Issuer: rM8199qFwspxiWNZRChZdZbGN5WrCepVP1
Path:
rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP → rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ
Result: tesSUCCESS

rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP is our hot wallet.
can you check it?

I can get the success transactions from rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ,
I need the fail transactions send from our hot wallet

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Good find :)

Sorry, bit distracted atm

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024
  30/CNY: 1D5DD310D18559CF94930568C9C8CB97E2DC6DBDC82E923F78F8E89B212FFA74
  {
      "Account": "rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP",
      "Amount": {
          "currency": "CNY",
          "issuer": "rM8199qFwspxiWNZRChZdZbGN5WrCepVP1",
          "value": "30"
      },
      "Destination": "rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ",
      "Fee": "54",
      "Flags": 0,
      "Sequence": 3208,
      "SigningPubKey": "02BAADA9F5CE4681376B8BD61659268F8C7ABAE7EC4F18C64739D56ADC7AF82991",
      "TransactionType": "Payment",
      "TxnSignature": "3046022100E1093AA313368274FB8CB98133D36174F357A2A8EC44E0528B668890A425E38D0221008FFEF5E5A560AC5E811BBF8A90F389FC6D312C28BB9BD2A929A743EBA83B5E89"
  }
  {
      "AffectedNodes": [
          {"ModifiedNode": {
              "FinalFields": {
                  "Balance": {
                      "currency": "CNY",
                      "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
                      "value": "4878.82689791"
                  },
                  "Flags": 65536,
                  "HighLimit": {
                      "currency": "CNY",
                      "issuer": "rM8199qFwspxiWNZRChZdZbGN5WrCepVP1",
                      "value": "0"
                  },
                  "HighNode": "0000000000000000",
                  "LowLimit": {
                      "currency": "CNY",
                      "issuer": "rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP",
                      "value": "60000"
                  },
                  "LowNode": "0000000000000000"
              },
              "LedgerEntryType": "RippleState",
              "LedgerIndex": "09E2E8FD31485CB75C6703D6AAAE35B0A65324D6D0B861B0999B1A15215E0C66",
              "PreviousFields": {"Balance": {
                  "currency": "CNY",
                  "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
                  "value": "4908.82689791"
              }},
              "PreviousTxnID": "DF176104F2DA1E479D0874347F5CA82369C284A989A7D1688FB4B7CEE2D8F9F6",
              "PreviousTxnLgrSeq": 3629823
          }},
          {"ModifiedNode": {
              "FinalFields": {
                  "Balance": {
                      "currency": "CNY",
                      "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
                      "value": "30"
                  },
                  "Flags": 65536,
                  "HighLimit": {
                      "currency": "CNY",
                      "issuer": "rM8199qFwspxiWNZRChZdZbGN5WrCepVP1",
                      "value": "0"
                  },
                  "HighNode": "0000000000000010",
                  "LowLimit": {
                      "currency": "CNY",
                      "issuer": "rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ",
                      "value": "50050"
                  },
                  "LowNode": "0000000000000000"
              },
              "LedgerEntryType": "RippleState",
              "LedgerIndex": "6C5E42CE4063F12961B579C95F284473807C782300DF7239E14AB909EA6C5286",
              "PreviousFields": {"Balance": {
                  "currency": "CNY",
                  "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
                  "value": "0"
              }},
              "PreviousTxnID": "5DFC136E941940C30A762F888A710F2B5E097BD264C9BA2BCBBE2CDE58C5D468",
              "PreviousTxnLgrSeq": 3629381
          }},
          {"ModifiedNode": {
              "FinalFields": {
                  "Account": "rHTLdR8F4v9gJmLoW6Fk6zmBvCM2bqzqLP",
                  "Balance": "277192984",
                  "Flags": 0,
                  "OwnerCount": 2,
                  "Sequence": 3209
              },
              "LedgerEntryType": "AccountRoot",
              "LedgerIndex": "CF75E5118ED28B209FEC7C8431B85E467D9F34A77246195420A6120FE65D5E9D",
              "PreviousFields": {
                  "Balance": "277193038",
                  "Sequence": 3208
              },
              "PreviousTxnID": "DF176104F2DA1E479D0874347F5CA82369C284A989A7D1688FB4B7CEE2D8F9F6",
              "PreviousTxnLgrSeq": 3629823
          }}
      ],
      "TransactionIndex": 0,
      "TransactionResult": "tesSUCCESS"
  }

  Result tesSUCCESS

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

You can use remote.request_account_tx to get an accounts transactions

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

sorry, sublimator,
Maybe my words do not make you clearly understand what I mean
I get use remote.request_account_tx to find all tx from my hot wallet(rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ's account_tx only show the success transactions send from my hot wallet),but my hot wallet has too much transactions to find the fail transactions which send to rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ,
I saw you can get the transactions what you need, like a SQL query.
can you teach me? or show me like https://gist.github.com/sublimator/ed0962d0b79a38c72768 ,all transactions is send to rwVJd5YWGhvhhDEPaJR3hjN5feGk6bQXmY and the state is failed

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

I'm finished for the day, I'm afraid :)

Tomorrow I can teach you, but for now: https://gist.github.com/sublimator/bd514dc1f7687a563d9b

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

Above gist is all transactions sent from hot wallet to rwVJd5YWGhvhhDEPaJR3hjN5feGk6bQXmY that failed why claiming a Fee, but not necessarily all the transactions sent that failed, there's a difference

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

Thank you for your work , Though I need the failed transaction send to rfWh2ZMjewVfRdj92pCnP3sug8Y9nBAShQ
sublimator. see you tomorrow.
:)

from xrpl.js.

sublimator avatar sublimator commented on May 28, 2024

https://gist.github.com/sublimator/75a178b3f63de1bfd20a

All tesSUCCESS

from xrpl.js.

witterlee avatar witterlee commented on May 28, 2024

thanks sublimator :)

from xrpl.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.