Status-react: Message sent to user who is offline not received when he appears back online

Created on 31 Oct 2019  路  12Comments  路  Source: status-im/status-react

Bug Report

Problem

No messages sent in 1-1 chat are received by recipient who appears online after being offline when messages were sent.
I can't reproduce it with real devices but it started to constantly fail with e2e using emulators.

Expected behavior

Message sent to contact who is offline is received when contact appears online

Actual behavior

Message sent to contact who is offline is not received when contact appears online
Video: https://app.saucelabs.com/tests/a65c1b55bad1430db08505714b514e70

Notes

This appeared after https://github.com/status-im/status-react/pull/9157/commits/33af176246b8a6b3261590253c9f17b370bf4301 commit

I attached logcat below.

Acceptance Criteria

e2e test related to offline message receiving (test_offline_messaging_1_1_chat) passes

Reproduction (for 1-1 chat)

  • Open Status on two emulators and create two new accounts on each device (UserA and UserB)
  • UserB, staying on 'Chats' view enables airplane mode
  • UserA adds UserB in contacts
  • UserA sends several message to UserB (who is still offline)
  • UserB disables airplane mode
  • UserB verifies new chat with messages sent from UserA appears on Chats view

Reproduction (for public chat)

  • Open Status and create new account
  • Enable Airplane mode
  • Join public chat with messages (e.g. #status)
  • Disabled Airplane mode
  • Verify messages are received in next ~60 sec

Additional Information

  • Status version: Develop StatusIm-191029-025900-dfe259-nightly-universal.apk
  • Operating System: Android 8.0 (

Logs

Logcat for scenario of joining public chat in offline mode when messages are not received after appearing online:
logcat_where_no_messages_in_public.log
Video for this logcat: https://app.saucelabs.com/tests/a65c1b55bad1430db08505714b514e70

Logcat for the same scenario but with working build:
logcat_where_everything_is_ok.log
Corresponding video with this logs: https://app.saucelabs.com/tests/aa9ebb7788b34f71bd1c5fa61035bc64#61

bug chat e2e test blocker high-priority

All 12 comments

Will take a look at this

closed via #9392 9392

Reproducible for 1-1 and group chats. See https://github.com/status-im/status-react/pull/9547#issuecomment-561181808

Crucial one for v1 release cc @rachelhamlin

I have investigated this issue a bit, it seems to do with those messages not being fetched from the mailserver.

I have checked the topics requested and it looks ok, but probably there's some issue there, this happens mostly for negotiated topics as far as I can see.

Online->Online works fine.

@cammellos
seems still an issue, however it appears much rarely now.
Caught it for 1 time in 3 days in all e2e tests.

Logs + video
Device 1 (sender) : https://app.saucelabs.com/tests/cdda1bf204974458b6ce40f3eaec28cb?auth=51ee5ea9ba7635df1dfdf87213bf5a6a#79
Device 2 (receiver) : https://app.saucelabs.com/tests/8dca1a127766480b9693cd2cf88e41b3?auth=2000c8afcd9756432347c1c9670531a3#67

Test: test_offline_messaging_1_1_chat

In code it is waiting for 180 sec - more than enough from my POV

It appears from time to time (with some of PR builds) and the most recent build run when message was not received and 1-1 chat did not appear on Chats view after appearing online was 7th of January nightly:
https://app.saucelabs.com/tests/c367ae3a089e42268b31c91ef8369435?auth=9196350b9e17881de5985c47f019e41a - message receiver device and it's full emulator
logcat.log

Second device (who sent a message) session: https://app.saucelabs.com/tests/bc32371e71794f37b7c7c64e47f73f00?auth=64ca980106f1ded090a5455084d7da25

Logs from today:
Device 1: https://saucelabs.com/jobs/6e72a4df5f84436390a018e51b2d06ab?auth=78be9d3abdaaaa6e78c14aecd0342d95 (receiver, however 3 minutes in connecting state, so test is failed due to timeout)
Device 2: https://saucelabs.com/jobs/8facabb4d6b043d08eadf303d894a21e?auth=3944158cfc6afd2ff9235af480866b14 (sender)

Still reproducible on eth.prod fleet.
Device 1 (receiver, chat does not appear): https://app.saucelabs.com/tests/f1f0d0de0abb49ea90a24a175d9da0c4?auth=43fb8668e96570b033ee991ba8bde44d#70
Logcat: logcat.log
Divice go back to online starting from 02:27:46.

Device 2 (sender): https://app.saucelabs.com/tests/83a63f325b094c86996262ac803ebcd5?auth=4a369874c31b9d886a5efbf4e1742fb0#83
Logcat:
logcat (1).log

褋褋 @cammellos @rachelhamlin

Update:

  • Messages are on the mailserver (I can't be 100% sure, but 99%, there are two envelopes with that topic at that time)
  • Issue is client side, it never made a request to the mailserver coming back online
Was this page helpful?
0 / 5 - 0 ratings

Related issues

denis-sharypin picture denis-sharypin  路  4Comments

Serhy picture Serhy  路  3Comments

andmironov picture andmironov  路  3Comments

oskarth picture oskarth  路  4Comments

annadanchenko picture annadanchenko  路  3Comments