Closed Bug 1058706 Opened 10 years ago Closed 10 years ago

Old Loop Mobile calls are received when a non reachable user connects back

Categories

(Hello (Loop) :: Server, defect, P1)

x86_64
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: oteo, Assigned: rhubscher)

References

Details

(Whiteboard: [mobile app][loop server][blocking][patch available][qa+])

Attachments

(2 files)

Environment:
Two devices A and B registered in Loop

STR:
1)Device B is switched off or without connection
2)Device A tries to call B several times without success.
3)Device B is switched on or recovers the connection

Current Result:
B receives incoming calls for the calls that were made when he was disconnected

Expected result:
B should not receive any incoming call from A
Blocks: 1036490
Assignee: nobody → rhubscher
setting ni to Borja if he wants to add more technical details,
Thanks!
Flags: needinfo?(borja.bugzilla)
Whiteboard: [qa+]
Whiteboard: [qa+] → [qa+][blocking]
Can you check that when you GET /calls on the callee the state of the call is set to terminate?
Also on the push notification, you've got the version which is the timestamp of the call. You could decide whenever to use it or not based on the delay.

The call is save for 30s so if you've got the notification after 30 seconds you shouldn't get any call in GET /calls and if it is less than 30s after 10 already the call should have been set to terminate state.
Flags: needinfo?(borja.bugzilla) → needinfo?(ferjmoreno)
Flags: needinfo?(ferjmoreno)
Priority: -- → P1
(In reply to Rémy Hubscher (:natim) from comment #3)
> The call is save for 30s so if you've got the notification after 30 seconds
> you shouldn't get any call in GET /calls and if it is less than 30s after 10
> already the call should have been set to terminate state.
Hi Remy,
After investigating this I've found the following issue. If I wait more than 30 seconds the scenario is working as expected, so the array is empty when requesting calls given a version.

However, the following scenario is failing:
- User A calls B, but B is in 'Airplane Mode'
- User A call is over due to 'terminated:timeout' (the one related with the first 10 seconds)
- User B is connected again to the network
- User B receives a push message with a version. After requesting the calls given this version...

EXPECTED:
I receive the call with the state to 'terminated', so the attention screen is not shown.

CURRENTLY:
I receive the call with no state param, so I can not differentiate this with a regular incoming call.

Could you take a look? It seems that this would need some Server work as well. Thanks!
Flags: needinfo?(rhubscher)
Attached file Gaia patch
Attachment #8483424 - Flags: review?(josea.olivera)
I would actually expect the server to not return a call that's terminated at all, I'm working on a patch for this.
Flags: needinfo?(rhubscher)
Attached file link to github PR #196
This patch changes two things:

1. The server is not returning anymore the terminated calls;
2. The server ensure the call state is set to the right one (terminated) on timeouts.

Borja, I've updated the dev server with the code from this branch, can you try it there and tell me if that fixes the issues you're having?

https://loop-dev.stage.mozaws.net/ is the dev server URL.
Attachment #8483545 - Flags: review?(tarek)
Comment on attachment 8483545 [details] [review]
link to github PR #196

Just added a small comment about states variables
Attachment #8483545 - Flags: review?(tarek) → review+
Whiteboard: [qa+][blocking] → [mobile app][loop server][blocking][patch available][qa+]
Comment on attachment 8483424 [details] [review]
Gaia patch

LGMT. r=me

Gave a try and everything works as expected.

Thanks guys!
Attachment #8483424 - Flags: review?(josea.olivera) → review+
(In reply to Alexis Metaireau (:alexis) from comment #8)

> Borja, I've updated the dev server with the code from this branch, can you
> try it there and tell me if that fixes the issues you're having?

I'll comment here with Borja's permission. Well, tested with the dev server and it works as expected.

Thanks Alexis!
https://github.com/mozilla-services/loop-server/commit/bc90e0bce67d5db4d7747735386be715e91c978f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Went out with 0.12.0.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: