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

VERIFIED FIXED

Status

Hello (Loop)
Server
P1
normal
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: oteo, Assigned: natim)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
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
(Reporter)

Updated

3 years ago
Blocks: 1036490
(Assignee)

Updated

3 years ago
Assignee: nobody → rhubscher
(Reporter)

Comment 1

3 years ago
setting ni to Borja if he wants to add more technical details,
Thanks!
Flags: needinfo?(borja.bugzilla)
Whiteboard: [qa+]
(Reporter)

Updated

3 years ago
Whiteboard: [qa+] → [qa+][blocking]
(Assignee)

Comment 2

3 years ago
Can you check that when you GET /calls on the callee the state of the call is set to terminate?
(Assignee)

Comment 3

3 years ago
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)
Duplicate of this bug: 1053414
Flags: needinfo?(ferjmoreno)
(Reporter)

Updated

3 years ago
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)
Created attachment 8483424 [details] [review]
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)
Created attachment 8483545 [details] [review]
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+
(Reporter)

Updated

3 years ago
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!
(Assignee)

Comment 12

3 years ago
https://github.com/mozilla-services/loop-server/commit/bc90e0bce67d5db4d7747735386be715e91c978f
Status: NEW → RESOLVED
Last Resolved: 3 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.