js-bigchaindb-driver icon indicating copy to clipboard operation
js-bigchaindb-driver copied to clipboard

400 BAD REQUEST when running from Node

Open aronanda opened this issue 6 years ago • 2 comments

I can get a transaction commit to work fine when running from the browser, but, when I run the same code in Node.js I get this 400 bad request error. I've tried with both the test server and my local server and the results are the same. Is there something that's missing from the header of the js driver? Could it somehow be a CORS issue? This is a blocker for me, I want to encapsulate the Bigchain server from the outside world by passing the transaction signatures through a custom Node API and then on to the Bigchain server.

I should mention that CREATE transactions work fine, this problem is only with TRANSFER transactions in Node.js. (TRANSFER transactions work fine in the browser)

{ 
  message: 'HTTP Error: Requested page not reachable',
  status: '400 BAD REQUEST',
  requestURI: 'http://localhost:9984/api/v1/transactions?mode=commit' 
}

aronanda avatar Dec 01 '18 00:12 aronanda

Just managed to finally be able to try 4.1 and got the same problem.

alko89 avatar Dec 16 '19 19:12 alko89

having the same problem pls help

Ayan-Ali avatar May 16 '21 04:05 Ayan-Ali