You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on May 14, 2024. It is now read-only.
When I try to use ldapjs client.unbind with node 10.0.0 (or 10.4.0) it does not work and the callback of unbind is never called. I debugged and it seems something in _sendSocket stops working, the function messageCallback is never called. While debugging it worked sometimes and the UnbindResponse was received successfully, but most of the time it didn't work, so I was wondering if it might be some timing issue, as while debugging everything runs slower/stepped.
client.search('ou=domain,dc=sub,dc=net',opts,(err,res)=>{if(err){cb(err,null);return;}res.on('searchEntry',entry=>{if(entry.object.hasOwnProperty('mail')){retrievedUsers[entry.object.uid]=entry.object;}});res.on('error',err=>{cb(err,null);client.unbind(err=>{if(err){logger.error(err);}});});res.on('end',()=>{client.unbind(err=>{// << --- never calledcb(err,retrievedUsers);});});});
Activity
risa commentedon Jun 15, 2018
The same applies to node 10.4.1
jvanalst commentedon Aug 2, 2018
I can confirm that that unbind callback isn't being called in node any v10. The last working version was node v9.
jvanalst commentedon Aug 2, 2018
There's a pull request attempting to fix this (#485) but it's failing some tests still.
purplemana commentedon Oct 11, 2018
Pardon the pun but I am really in a bind to get this fix :). @jgeurts: Would you mind giving a fork?
acappella2017 commentedon Nov 23, 2018
I believe this issue is caused by some weird behavior of Nodejs 10. Opened nodejs/node#24577
Remove node 10 builds because unbind does not work ldapjs/node-ldapjs…
jgeurts commentedon Dec 10, 2018
@purplemana It's fixed with https://www.npmjs.com/package/ldapts, if you want to give that a go.
hwkd commentedon Feb 16, 2019
@jgeurts I just switched to using
ldaptspackage instead. Ended up producing better code and easier to test and works with node 11.Fix ldapjs#483: Unbind hangs in node v10
jsumners commentedon Aug 26, 2019
Please track #524.
jsumners commentedon Mar 10, 2023
problem that seems to be covered by this issue, please open a new issue.
Please include a minimal reproducible example
when opening a new issue.