Skip to content
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

[$500] Android - Chat - Sound not heard if user is mentioned or message is received #37434

Closed
1 of 6 tasks
kavimuru opened this issue Feb 28, 2024 · 10 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause

Comments

@kavimuru
Copy link

kavimuru commented Feb 28, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.44-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: applause internal team
Slack conversation:
Issue found when executing #36848

Action Performed:

  1. Open the app in two separate sessions, one for User A and one for User B.
  2. Log in to User A's account and navigate to any report that both user A and user B have access to.
  3. Send a message mentioning User B (or any message text) in the report.
  4. Verify that User B receives an "Attention" notification sound for the mention.

Expected Result:

Receive message and mention sound can be heard in android app

Actual Result:

Received message sound and mention sound not heard in android app (Sending message sound can be heard)

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6395748_1709133075590.mobizen_20240228_095137.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e1370f0cd60cbf79
  • Upwork Job ID: 1765140418082988032
  • Last Price Increase: 2024-03-05
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 28, 2024
Copy link

melvin-bot bot commented Feb 28, 2024

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@kavimuru
Copy link
Author

@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@kavimuru
Copy link
Author

We think this bug might be related to #vip-vsb

@johncschuster
Copy link
Contributor

Checking in #vip-vsb 👍

Copy link

melvin-bot bot commented Mar 5, 2024

@johncschuster Huh... This is 4 days overdue. Who can take care of this?

@johncschuster johncschuster added the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label Mar 5, 2024
@johncschuster
Copy link
Contributor

Update for the issue: I've added this to the #vip-vsb project and have simultaneously added the retest-weekly label to see if the issue persists.

@melvin-bot melvin-bot bot removed the Overdue label Mar 5, 2024
@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Mar 5, 2024
@melvin-bot melvin-bot bot changed the title Android - Chat - Sound not heard if user is mentioned or message is received [$500] Android - Chat - Sound not heard if user is mentioned or message is received Mar 5, 2024
Copy link

melvin-bot bot commented Mar 5, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01e1370f0cd60cbf79

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 5, 2024
Copy link

melvin-bot bot commented Mar 5, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

@CristiCeban
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue.

Android - Sound not heard if user is mentioned or message is received

What is the root cause of that problem?

On receiving onyx api update event here:

PusherUtils.subscribeToMultiEvent(Pusher.TYPE.MULTIPLE_EVENT_TYPE.ONYX_API_UPDATE, (pushJSON: OnyxServerUpdate[]) => {
playSoundForMessageType(pushJSON);

playSoundForMessageType is called which run this part

if ('html' in message) {
return playSoundExcludingMobile(SOUNDS.RECEIVE);
}

that does nothing for mobile

// mobile platform plays a sound when notification is delivered (in native code)
export default function playSoundExcludingMobile() {}

So the problem is that for mobile, push notifications are not delivered (I didn't get any for Android, I might be wrong here, I tested for both Android adhoc and local dev build - both real devices with notification permission enabled).
The change was introduced here
And it have assumption that all notification with plain messages will display as notifications, and will not trigger a sound, which is not the case here (didn't receiving notifications). From the code I understand that notification are showing to the foreground also, but I couldn't tests them.

What changes do you think we should make in order to solve the problem?

From android debugging I noticed that the notifications are not coming, someone has to look on the server if it triggers them where needed, I don't know how the notifications are configured on the project and what service is used in the backend.

Another fix will be to rollback these changes (and also others 2 cases in this file)

if ('html' in message) {
return playSoundExcludingMobile(SOUNDS.RECEIVE);
}

back to

if ('html' in message) { 
     return playSound(SOUNDS.RECEIVE); 
 } 

that will fix the current bug, but need to be sure how it will behave when played simultaneously with the push notification sound

@hungvu193
Copy link
Contributor

There were a conversation here about this one.
The final decision is that we only play the sound when we receive notification message from native platform (android, ios).
cc @Julesssss.
I think we can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause
Projects
No open projects
Status: CRITICAL
Development

No branches or pull requests

6 participants