You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Nicolas KP (JIRA)" <ji...@apache.org> on 2019/01/01 11:46:00 UTC

[jira] [Created] (TINKERPOP-2123) Javascript driver connection.open() hangs

Nicolas KP created TINKERPOP-2123:
-------------------------------------

             Summary: Javascript driver connection.open() hangs
                 Key: TINKERPOP-2123
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2123
             Project: TinkerPop
          Issue Type: Bug
    Affects Versions: 3.3.4
            Reporter: Nicolas KP


Hi,

I think that 80% it's just me using the api wrong, but there's definitely a catch I don't get: when I try to connect through the js api, client.open() calls connection.open() which launches a promise which just waits without giving any error. It doesn't matter if I give a wrong url (it should have thrown an error in that case), or not, it just waits for the timeout (I've tried with 5s and 100s timeouts), execution never reaches .resolve() or .reject() of connection._openPromise.

Here's a code to reproduce the issue:
{code}
const authenticator = new gremlin.driver.auth.PlainTextSaslAuthenticator(username, password);
const client = new gremlin.driver.Client(
"graphgoblin.gremlin.cosmosdb.azure.com:443",
 { "authenticator": authenticator });


const clientSubmitTimeout = 5 * 1000;
return await rejectOnTimeout(clientSubmitTimeout, async () => {
	try {
		await client.open(); //I know it's called in .submit, but I added it here to test more easily which part hangs. Execution never reaches the next statement
		const result = await client.submit(gremlinQuery);
		return result;
         }
	catch (err) {
		this.log("Error from gremlin server: ", err.message || err.toString());
		throw err;
 	}
	finally {
		await client.close(); //maybe unnecessary?
	 }
 });
{code}
 
  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)