[
https://issues.apache.org/jira/browse/TINKERPOP-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16764157#comment-16764157
]
Nicolas KP commented on TINKERPOP-2123:
---------------------------------------
Dears, could you help us with this issue? We're stuck during the upgrade to
gremlin 3 because of it.
Thank you
> Javascript driver connection.open() hangs
> -----------------------------------------
>
> Key: TINKERPOP-2123
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2123
> Project: TinkerPop
> Issue Type: Bug
> Components: javascript
> Affects Versions: 3.3.4
> Reporter: Nicolas KP
> Priority: Major
>
> 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)