-
Notifications
You must be signed in to change notification settings - Fork 452
TypeError: Cannot destructure property 'message' of 'tracker.fetch(...)' as it is null #890
Comments
A minimal reproduction will be needed to provide support on this. |
This problem occurs maybe once a day out of 5 running instances. Reproduction is going to be impossible. My recommendation is to add a check for the case described in the error message and emit an error back to the client. That way, I can handle the error in my code rather than the application crash. |
So you are fine with applications crashing that use your code? |
I asked for more information. You declined to give it. I cannot diagnose a problem without a reproduction. There should be zero instances that a message is unavailable. So there is most likely some issue in whatever ldap conversation that resulted in the report. I am quite willing to collaborate on a diagnosis and solution if you are, but we'll need a reproduction. |
I have met the same issue in my production ENV. I can try to catch it as "uncaughtException" on process level, but it's not a long term solution. Hope the issue can be solved, otherwise we have to change our LDAP solution. |
In client/message/tracker/index.js line 91 TypeError: Cannot destructure property 'message' of 'tracker.fetch(...)' as it is null. tracker.fetch = function fetchMessage (msgID) {
const tracked = messages.get(msgID)
if (tracked) {
purgeAbandoned(msgID, abandoned)
return tracked
return null
}
// We sent an abandon request but the server either wasn't able to process
// it or has not received it yet. Therefore, we received a response for the
// abandoned message. So we must return the abandoned message's callback
// to be processed normally.
const abandonedMsg = abandoned.get(msgID)
if (abandonedMsg) {
return { message: abandonedMsg, callback: abandonedMsg.cb }
}
return null
} |
Thank you for the diagnosis @benzhuo. It at least gives us something to go on. It looks like the difference is the following: v2.x: node-ldapjs/lib/client/client.js Lines 878 to 889 in 92dfc80
v3: node-ldapjs/lib/client/client.js Lines 878 to 920 in f289008
The short of it is: we neglected to recognize that |
Hello! In my case this error happens every time the ldap server takes more time than "timeout" configuration parameter to answer. I configured it to 10000 ms. I'm trying always a search action. My logs are:
|
Hi Jsumners, |
Please recognize that we are not in the same parts of the world and that while you are awake I am asleep. I also need to take time to verify that proposed changes cover the issue correctly, and my current priority is finding gainful employment. |
I understand, hope this can be released as soon. good luck, there will be bread. |
Thanks, jsumner |
ldapjs 3.0.2
I'm getting an occasional crash with the following error. I do have an error handler registered with the client, so I think this is a case that is not covered.
The text was updated successfully, but these errors were encountered: