We're running into an issue with the initialize function for the ApiClient never resolving or rejecting. It just hangs forever. When we connect to https://test.openchain.org with the client, it will initialize, but not when connecting to a local instance at http://localhost:8080. In this case we're running the Openchain docker image on OSX 10.10.5. Below is a test script that replicates our issue:
var openchain = require('openchain');
var client = new openchain.ApiClient('http://localhost:8080');
console.log('Initializing Openchain client');
client.initialize().then(function () {
console.log('Openchain client initialized');
}, function (err) {
console.error(err.stack);
});
When we run the script, 'Initializing Openchain client' is logged, and nothing else happens. The promise that is returned from getInfo() never resolves, though if we run curl http://localhost:8080/info in a terminal, we get a 200 and the JSON containing the namespace back.
We noticed that if we run docker-compose restart to restart the openchain-server container while that script is running, after a few seconds, the promise returned from initialize resolves.
Provided this is not a configuration issue on our side, could our issue have something to do with differences between httpinvoke in the browser and httpinvoke running in node, e.g. jakutis/httpinvoke#17
We're running into an issue with the
initializefunction for the ApiClient never resolving or rejecting. It just hangs forever. When we connect to https://test.openchain.org with the client, it will initialize, but not when connecting to a local instance at http://localhost:8080. In this case we're running the Openchain docker image on OSX 10.10.5. Below is a test script that replicates our issue:When we run the script, 'Initializing Openchain client' is logged, and nothing else happens. The promise that is returned from getInfo() never resolves, though if we run
curl http://localhost:8080/infoin a terminal, we get a 200 and the JSON containing the namespace back.We noticed that if we run
docker-compose restartto restart the openchain-server container while that script is running, after a few seconds, the promise returned frominitializeresolves.Provided this is not a configuration issue on our side, could our issue have something to do with differences between httpinvoke in the browser and httpinvoke running in node, e.g. jakutis/httpinvoke#17