bigchaindb / js-bigchaindb-driver

Official BigchainDB JavaScript driver for Node.js and the browser
https://docs.bigchaindb.com/projects/js-driver/en/latest/usage.html
Apache License 2.0
216 stars 92 forks source link

400 BAD REQUEST when running from Node #269

Open aronanda opened 5 years ago

aronanda commented 5 years ago

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' 
}
alko89 commented 4 years ago

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

Ayan-Ali commented 3 years ago

having the same problem pls help