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

[HOLD for payment 2024-08-29] [$250] Voice recognition doesn't work on mobile web on Android in the message compose input #44394

Closed
1 of 6 tasks
m-natarajan opened this issue Jun 25, 2024 · 70 comments
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Jun 25, 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: 9.0.1-17
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: @quinthar
Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1719169189159419

Action Performed:

  1. Go to staging.new.expensify.com
  2. Initiate a DM to any user
  3. Tap mic icon on keyboard and say a message to be composed

Expected Result:

Message composed without any issues

Actual Result:

Voice recognition does not work if you begin it in an empty field, lose focus and it stops

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f063fe0495eff4ac
  • Upwork Job ID: 1805694285589168826
  • Last Price Increase: 2024-08-08
  • Automatic offers:
    • eh2077 | Reviewer | 103185927
Issue OwnerCurrent Issue Owner: @puneetlath
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. AutoAssignerNewDotQuality Used to assign quality issues to engineers labels Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

Triggered auto assignment to @MitchExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Jun 25, 2024

Triggered auto assignment to @deetergp (AutoAssignerNewDotQuality)

@melvin-bot melvin-bot bot added the Weekly KSv2 label Jun 25, 2024
@deetergp
Copy link
Contributor

This one seems like it could be done by an External contributor.

@deetergp deetergp added the External Added to denote the issue can be worked on by a contributor label Jun 25, 2024
@melvin-bot melvin-bot bot changed the title Voice recognition doesn't work on mobile web on Android in the message compose input [$250] Voice recognition doesn't work on mobile web on Android in the message compose input Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

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

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

melvin-bot bot commented Jun 25, 2024

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

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Jun 25, 2024
@muttmuure muttmuure moved this to CRITICAL in [#whatsnext] #quality Jun 27, 2024
@diegohosilver
Copy link

I was able to reproduce it in dev and stage

Recording.2024-06-27.095218.mp4

@MitchExpensify
Copy link
Contributor

@diegohosilver It looks like its working in your video, am I missing something?

@melvin-bot melvin-bot bot added the Overdue label Jun 27, 2024
@diegohosilver
Copy link

@MitchExpensify the focus is interrupted when the input is empty. I had to press the mic button again to continue with the dictation.

I narrowed down the problem to the RNMarkdownTextInput component. The usage of MarkdownTextInput from '@expensify/react-native-live-markdown' is what introduced this behavior. I will continue my testing tomorrow

@diegohosilver
Copy link

Proposal

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

Android dictation cuts off in Chrome web

What is the root cause of that problem?

The package @expensify/react-native-live-markdown is causing this behavior. The code below is causing the dictation to cut off when setting targetElement.innerHTML = ''

 if (!rootSpan || rootSpan.innerHTML !== dom.innerHTML) {
      targetElement.innerHTML = '';
      targetElement.innerText = '';
      target.appendChild(dom);

      if (BrowserUtils.isChromium) {
        moveCursor(isFocused, alwaysMoveCursorToTheEnd, cursorPosition, target);
      }
 }

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

  1. Check if the current text is different from the parsed ranges to HTML nodes
  2. Clear the targetElement innerHTML by removing child nodes
  3. Append the HTML nodes to the targetElement by cloning them

What alternative solutions did you explore? (Optional)

N/A

@eh2077
Copy link
Contributor

eh2077 commented Jun 30, 2024

@diegohosilver Thanks for your proposal! Can you elaborate on why this issue happens on mobile Chrome only?

@melvin-bot melvin-bot bot removed the Overdue label Jun 30, 2024
@diegohosilver
Copy link

@eh2077 no problem!

I'm not 100% sure. I would say it has to do with Android's WebView implementation:

  • It might handle contentEditable elements differently than other platforms.
  • It might be more sensitive to DOM updates during ongoing input events, causing the dictation to cut off when the DOM is modified.

I'd like to provide an answer on why this is happening, but this is where the rabbit hole led me.

@eh2077
Copy link
Contributor

eh2077 commented Jul 1, 2024

@diegohosilver Thanks for the comment. But the root cause is still not clear to me.

Looking for better proposals

Copy link

melvin-bot bot commented Jul 2, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@eh2077
Copy link
Contributor

eh2077 commented Jul 4, 2024

@MitchExpensify Should we consider increasing the bounty to get proposals to dig into the root cause of this issue?

@MitchExpensify
Copy link
Contributor

Early days for a bump, lets give it another week

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 22, 2024
Copy link

melvin-bot bot commented Aug 22, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.23-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-29. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Aug 22, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@eh2077] The PR that introduced the bug has been identified. Link to the PR:
  • [@eh2077] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@eh2077] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@eh2077] Determine if we should create a regression test for this bug.
  • [@eh2077] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 28, 2024
Copy link

melvin-bot bot commented Sep 2, 2024

@puneetlath, @JKobrynski, @eh2077 Eep! 4 days overdue now. Issues have feelings too...

@puneetlath
Copy link
Contributor

In the Slack thread it sounds like @quinthar is still experiencing the issue. So going to hold off on paying/closing this just yet.

@Skalakid
Copy link
Contributor

Skalakid commented Sep 4, 2024

Hello, I'm Michał from SWM. I also reproduced this issue when using Live Markdown. Here I prepared a fix inside the library

Copy link

melvin-bot bot commented Sep 9, 2024

@puneetlath, @Skalakid, @JKobrynski, @eh2077 Eep! 4 days overdue now. Issues have feelings too...

@puneetlath
Copy link
Contributor

@Skalakid we're just waiting to upgrade the rn-live-markdown version in the app, is that right?

@Skalakid
Copy link
Contributor

@puneetlath Hi, yes that's the last thing that we have to do. However, I see that there is already #48626 (comment) that is bumping the LM version and it will contain my fixes for this issue. So I wrote the comment under the PR to include test steps for QAs

@puneetlath
Copy link
Contributor

Sounds good!

@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

@puneetlath, @Skalakid, @JKobrynski, @eh2077 Eep! 4 days overdue now. Issues have feelings too...

@puneetlath
Copy link
Contributor

This is on prod. Messaged @quinthar in the Slack thread to have him confirm it's working for him now.

@melvin-bot melvin-bot bot removed the Overdue label Sep 16, 2024
@puneetlath
Copy link
Contributor

Ok looks like we're good to go here. @eh2077 were you involved in this one at all? Or am I good to close this?

@eh2077
Copy link
Contributor

eh2077 commented Sep 17, 2024

@puneetlath I helped review earlier proposals. After it's picked up by agency team, I helped review the first PR here #47407 (comment) but it doesn't fix the issue when the update hits production. Though it was working fine when testing the PR. I haven't checked what caused the back and forth in the live markdown repo.

Given that, should I be eligible for payment on this task? Hmm, whatever the team think is best works for me, thanks!

@puneetlath
Copy link
Contributor

Ok, I think it's fair to pay then.

Payment summary:

  • C+ - $250 - @eh2077 - to be paid via NewDot

Thanks everyone!

@github-project-automation github-project-automation bot moved this from CRITICAL to Done in [#whatsnext] #quality Sep 17, 2024
@eh2077
Copy link
Contributor

eh2077 commented Oct 10, 2024

Requested in NewDot

@JmillsExpensify
Copy link

$250 approved for @eh2077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Development

No branches or pull requests