-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Future resolved more than once #5
Comments
This was an issue previously (#3), and I thought I'd fixed it, but apparently not. |
Let me know if there is anything I can do to help... I am using 0.3.1:
|
I had a quick look through the code and couldn't spot how any of the Futures could be resolving twice, but I have to admit - I'm pretty shaky when it comes to Fibers and Futures. If you'd like to take a look at the code in this part of the codebase, that's probably where the error is occurring. |
I am a total n00b when it comes to Futures :( Never used it so far. Do you need a for loop on line 115? What if you just have:
? |
Yeah, that's there so you can put an array in as the value for |
I thought so too... Question, is client.bind asynchronous? |
Yep. |
And then here then
the code waits for the asynchronous call to return the value? Then I am almost 100% sure that the problem is NOT in _bind. Which would mean it is below in _search where searchFuture is used? Is it possible for the client.search call to fire two events? Maybe "searchEntry" and "searchReference" events? OR, and this seems more likely to me, "error" and "end" events one after another? Or the "end" event after any other event? |
WAIT! Notice above, I get: "User successfully retrieved from LDAP server", which means we are looking in the wrong place, aren't we? Line 299:
which is well after _bind and _search finished, right? |
Okay. I'm glad you persisted with this. I'm also pretty sure that My guess is that an empty I have a rough and ready fix sketched out in my head, but I don't think I'll have time to test and release a new version today. |
OK, so bad news, my error log in the OP was somehow cut-off at the worse line, the good news is that I have the new log and it shows exactly where the problem is!
As you can see, the line is 180, which is:
under searchReference event:
|
Today is NOT an issue :) No worries, I can live without it :D I just started with Meteor like a week ago, and I wanted to build an app to convince my boss that Meteor is the way to go from now on :D And for that I needed an LDAP login... The good news is that my boss is on vacation for another 10 days, so I have time :D |
Ah ... then my guess above was wrong, but this is very helpful info! |
Whenever you release it, I'll be here to test it :) Thanks! |
Cool. Thanks for your help with this. Very much appreciated. |
Just thinking out loud here, and I appologize if this is a dumb question... but, is there such a thing as future.unwait or unbind, or something that will tell the future object it should not listen anymore? |
I'd have to read up on the docs about Futures. I think I should do that anyway ... 😁 Sent from my iPhone
|
:D Can you live a link to those docs here as well, googling with the word "future" just gives back stupid results :( |
https://github.com/laverdet/node-fibers Just noticed that there is an isResolved() API call. That should solve all our problems. I'll try to release a new version in the next hour or two. |
Okay. Just released 0.3.2. Will be interested to hear what happens. |
So, it seems that the Future issue is resolved. After "User successfully retrieved from LDAP server" it prints a whole bunch of text starting with {"dn":"CN=... But then throws this error:
It says ldap_server.js:320 but that line is commented out? |
You're getting a referral there. This is something the package won't help with. I don't think it's going to be able to retrieve a record from your LDAP server unless you change the settings you're using. I've just released 0.3.3 which doesn't throw an error in this situation, but still doesn't solve your problem. |
Crap :( I have no idea where the referral comes from :( I am using these settings:
|
Question, given that this happens:
is it possible to, well, stop there? What I mean is, the user and pwd are confirmed, so what could be causing those referrals? :( |
Does the latest version (
and then fail? |
I'll have to recheck on Monday at work, but looking at the comments above, I did update after you announced 0.3.3, so I would say yes. |
Weird. And the data that immediately follows |
Exactly. (again, I will recheck on Monday to confirm this properly) |
Hmm... I'm running out of ideas. If you want to play around with this a bit, to see if you can isolate exactly what's going on, you could clone this repo into a |
Not a bad idea. I will try that first thing on Monday, then. |
Sorry for not replying yesterday, bugs happened, must be taken care of... Hopefully I will have some time during the week to try your suggestion. |
No problem at all. If you can figure it out, that'd be fantastic but, like I said, no pressure from my side -- I see any contributions as an unexpected bonus. You've already done a lot to tighten up the existing codebase by keeping this issue alive and giving feedback on the latest releases. |
Sorry for being so quiet on this issue for so long. I've released 0.4.6 today, which may or may not help. In any case, I'm grateful for your encouragement in debugging this package. |
This was happening to me when my filter was too "wide" (objectClass=user) resulting in many matches and callbacks from ldapjs client. With a proper search filter (&(CN=username)(objectClass=user)) and one match/result this stopped happening. |
Shouldnt the
in
also be wrapped with
? Thanks for great package btw |
Well... that explains a few things. And, yes, it should be wrapped as you've suggested. I imagine that would have prevented the future from resolving more than once when the net was cast too wide and it returned multiple matches. The thanks really belong to someone else. I just took |
Good day peeps, |
So, I get a "User successfully retrieved from LDAP server", but then right after the below error :(
I am using:
And this is the error:
The text was updated successfully, but these errors were encountered: