-
Notifications
You must be signed in to change notification settings - Fork 92
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
interactResult: aborting due to stale decision reference! #52
Comments
Just for the record, the relevant log line is
After a first glance, this could very well be caused by using multiple MTM instances in different processes that do not share the same |
This really looks like a multi-process issue to me. Initially I thought it might be a problem with multi-threaded access to A regular SSLSocket must be blocked until the user has decided, and the |
This is of course the case in DAVdroid. Every
Yes, that would require file-based locking. However, that would not be that important. The problem is that the user-decision is just ignored. Maybe the |
In the second process, MTM seems to wait for a response forever. This is the problem:
Possible solution:
|
MTM starts its UI by means of a startActivity call that is posted to the original Context's getMainLooper(): I could imagine that for the davdroid:sync process, this leads to the startActivity actually being called on the original process and not on the sync process. However, I have no idea why or how that might actually be happening if you have a second MTM instance. |
Indeed, it does.
Adding I have verified that this is the problem by temporarily removing the In my opinion, this can only be handled by either not using multiple processes (:-1:) or using IPC/services (:+1:). |
Adding
allows |
Would you accept a patch that defines a new service (which always runs in the defined process), and changes the MTM UI so that it accesses this service? This should solve problems for multi-process environments. |
Hello,
We have seen increasing problems with MTM in DAVdroid. Honestly, I don't know how to start debugging (except from dissecting the whole code line for line).
The problem is that MTM doesn't remember the "Always" click in the "Accept certificate?" dialog. As far as I have found out, it's not a key store problem, but related to how MTM GUI works (maybe some kind of thread synchronization problem?). DAVdroid uses a global (process-wide) MTM singleton in various components (Activities, Services etc.) and various threads. There are also up to two processes (a normal process and a
:sync
process), so there might be two singletons sharing the same key store.When MTM is called by the customized okhttp HttpClient, it correctly shows the "Accept certificate?" dialog. However, as soon as I click the "Always", button, I see this log message:
and MTM ignores the click.
Do you have any idea what this could be or how I could start debugging it?
The text was updated successfully, but these errors were encountered: