October 22, 2017, 02:05:04 am

Author Topic: Send raw transaction - 500 (Internal Server Error)  (Read 1281 times)

mihmix

  • Newbie
  • *
  • Posts: 2
    • View Profile
Send raw transaction - 500 (Internal Server Error)
« on: October 26, 2015, 03:14:09 pm »
Dear all
I'm trying to send assets.

1. Calling send assets - OK. Got raw transaction.

{
  'fees': 1000,
  'from': '17uVzHyqqStcsJf8dA7MiUShKgmyNkT7zQ',
  'to': [
    {
      'address': 'akBgmkr3962GTGdsPaLaRmQYQKe2NxmbcRt',
      'amount': '10000000',
      'asset_id': 'AQNL67PmuN176tiSfb3179oH8DszCRjZuo'
    }
  ]
};

2. Sign unsigned raw transaction - OK

http://lenschulwitz.com/base58 - the link was used to convert compressed private key to HEX format (the first 2 characters and last 10 characters were removed).

3. When I'm try to pushing the signed transaction I've got error:
POST https://api.coinprism.com/v1/sendrawtransaction 500 (Internal Server Error)

What might be wrong? Please, any help on this will be appreciated!

mihmix

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Send raw transaction - 500 (Internal Server Error)
« Reply #1 on: October 26, 2015, 03:29:55 pm »
Here is my signed raw transaction in js:

Code: [Select]
var request = new XMLHttpRequest();

request.open('POST', 'https://api.coinprism.com/v1/sendrawtransaction');

request.setRequestHeader('Content-Type', 'application/json');

request.onreadystatechange = function () {
  if (this.readyState === 4) {
    console.log('Status:', this.status);
    console.log('Headers:', this.getAllResponseHeaders());
    console.log('Body:', this.responseText);
  }
};

var body = '0100000002cab9122e6570d8166a0456047849c9996feff46f432e5eae6364b471672df4d3020000006c493046022100adb5ca4efb02952a802556a85704e323a5834023b4f18e4ff48dd195658532e3022100afc9b494e13d82f540b1f43958dd805a216542fbe5edc3286f1ce896c888bea2012102a0edf89045ee39dd1c8844b9d15840ced57037f1ad28e470a96c3f4938ad86d6ffffffffcab9122e6570d8166a0456047849c9996feff46f432e5eae6364b471672df4d3030000006c493046022100f1f337da4bc1a6cd164e5852fb1d12b0fdf464f725055f12b2a63cd5076e7c49022100ecca7e3a7fad0c1f55450845125cefa3e2922ed8afb5797d4677ffd521ef291b012102a0edf89045ee39dd1c8844b9d15840ced57037f1ad28e470a96c3f4938ad86d6ffffffff040000000000000000116a0f4f4101000280ade204c0aa9da3090058020000000000001976a91407ec0de01ab0a2cd8c0118fa5df81ed39e297d7188ac58020000000000001976a9144bbe951fe1b2c09194eb3d4f4a0b62712eaafc7388ac86970000000000001976a9144bbe951fe1b2c09194eb3d4f4a0b62712eaafc7388ac00000000';

request.send(JSON.stringify(body));

I've got

Code: [Select]
Body: {"Message":"An error has occurred."}

lofty

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Send raw transaction - 500 (Internal Server Error)
« Reply #2 on: December 06, 2015, 06:48:41 pm »
I'm having a similar error, I'm able to get the raw transaction fine, sign it (validated on https://coinb.in/#verify ), but when trying to use the pushtx, I get a 500 Internal server error.

Does anyone know of a solution for this?