Ticket #24 (closed defect: fixed)
Blocking/unblocking contacts too fast kills them
| Reported by: | dx | Owned by: | dx |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.0 |
| Component: | emesenelib | Version: | |
| Keywords: | MESSAGE | Cc: | Ny |
Description
IMPORTANT NOTE: DON'T TRY THIS IF YOU DON'T KNOW HOW TO FIX IT. Before testing, activate the /eval plugin, and have a conversation window opened. You have to know how to add/remove users manually (/eval) if something goes wrong.
If you block a contact and don't wait until stage 1 is finished, this happens:
### dx blocks someone
>>> RML 20 68
<ml><d n="hotmail.com"><c n="someone" t="1" l="2" /></d></ml>
>>> ADL 21 68
<ml><d n="hotmail.com"><c n="someone" t="1" l="4" /></d></ml>
<<< RML 20 OK
<<< ADL 21 OK
### dx unblocks someone
>>> RML 22 68
<ml><d n="hotmail.com"><c n="someone" t="1" l="4" /></d></ml>
>>> ADL 23 68
<ml><d n="hotmail.com"><c n="someone" t="1" l="2" /></d></ml>
### block soap request 0
block user (stage 0): (200, 'OK')
### unblock DL replies
<<< RML 22 OK
<<< ADL 23 OK
### unblock soap request 0 (block 1 not sent)
unblock user (stage 0): (500, 'Internal Server Error')
Traceback (most recent call last):
File "Controller.py", line 351, in process
self.msn.process()
File "/home/dx/esevene/emesenelib/core.py", line 563, in process
'''
File "/home/dx/esevene/emesenelib/SoapManager.py", line 51, in process
response.getCallback()( response, *response.getArgs() )
File "/home/dx/esevene/emesenelib/core.py", line 1026, in onUserUnblocked
self.emit( 'user-list-change' )
emesenelib.core.SoapError: 'User could not be unblocked (stage 0)' (500, 'Internal Server Error'): u'Member does not exist '
After that (fatal) error, emesene execution loop stops. If you don't /resurrect it, the blocked contact won't appear again in your contact list, and you'll be unable to add it again (using the GUI, because /eval can help you)
Remember to fix:
- Disable the contact management options until the operation is finished
- Handle the exceptions on soap errors
- Do not handle the exceptions in Controller.py:351 (self.msn.process()), or make it give a good visual feedback. These kind of exceptions are always bugs, and they need the attention from the user.
