-
Notifications
You must be signed in to change notification settings - Fork 0
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
JPC: Local ID not found; Unhandled promise rejection #61
Comments
These aren't async functions so they'll just throw the exception immediately.
This function is
Now, what's interesting is that the code is trying to pass an I tried updating mustang to see if I could reproduce the error. The update didn't like my mail.db so I stupidly deleted it and lost all of my account settings. Furthermore, your switch to SQL accounts broke what little EWS support there was. I've pushed some partial fixes to branch |
I was unable to reproduce the bug within mustang itself using the It shouldn't be possible for a local object to be unknown... I even tried writing a test for JPC which created an Event Emitter, added an event listener to it, tried to collect garbage, and arranged for an event to be fired on it, but nothing got garbage collected, and the event fired as expected. The sequence of events that deletes a local object is as follows:
You might be able to get more information as to what's going on by logging the relevant id in |
Together, Neil and me found that this happens when the frontend reloads, but the backend keeps running. The backend doesn't know that the frontend is gone, and the IMAP lib keeps the IMAP connection open. When a notification from the IMAP server arrives, the IMAP lib calls the event handlers ( That means:
|
Do you want to differentiate between a transient disconnection and a reload? You could simplify matters by just reloading if the client gets disconnected. There are two aspects to this. From the point of view of JPC itself, it would like to know that the client has gone away for good, so that it can clear out its object tables. If you're not going to support transient connections, then it can do this on every connection, otherwise the best place to do this would seem to be on the call to get the remote start object, if it can be arranged that this only happens once per reload. From the point of view of the client/server code, the server would also like to know when the client has reloaded. One way to do this would be to have a function that the client calls after it reloads and gets the start object. Other options could be for the server to have a callback to get the start object, or an event when the server clears its object tables. |
2 separate issues, which might be related:
await
ortry/catch
)The text was updated successfully, but these errors were encountered: