Skip to content

[Due for payment 2025-03-21] [$500][HIGH] Safari - Unable to play video attachment #52673

Closed

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.63-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @rojiphil
Slack conversation (hyperlinked to channel name): ts_external_expensify_bugs

Action Performed:

  1. Sign in to an existing account
  2. Navigate to a chat which has a video attachment
  3. Attempt to play the video.

Expected Result:

The video should play

Actual Result:

The app crashes with Not supported error in dev environment
Unable to play the video in staging environment

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
attachment-play-crash.mp4
attachment-play-crash-staging.mp4
Recording.3170.mp4

https://github.com/user-attachments/assets/2b502b64-83c3-4b81-bc7b-b57cf6892ab0 (Video used as attachment)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021858504313972501020
  • Upwork Job ID: 1858504313972501020
  • Last Price Increase: 2025-02-19
Issue OwnerCurrent Issue Owner: @isabelastisser

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 16, 2024
  2. melvin-bot commented on Nov 16, 2024

    @melvin-bot

    Triggered auto assignment to @puneetlath (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.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 18, 2024
  4. changed the title [-]Safari - Unable to play video attachment[/-] [+][$250] Safari - Unable to play video attachment[/+] on Nov 18, 2024
  5. melvin-bot commented on Nov 18, 2024

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 18, 2024
  7. melvin-bot commented on Nov 18, 2024

    @melvin-bot

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

  8. me-ZaidAli commented on Nov 18, 2024

    @me-ZaidAli

    @m-natarajan can you please the video format that's causing the bug coz mp4 is working in safari

  9. peter-zsigmond commented on Nov 20, 2024

    @peter-zsigmond

    Edited by proposal-police: This proposal was edited at 2024-11-24 13:13:08 UTC.

    Proposal

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

    A video attachment in the chat won't start playing in Safari on macOS.

    What is the root cause of that problem?

    Safari don't support AV1 codec playback on devices older than iPhone 15 and M3 Mac. They put a hardware decoder into the new devices in 2023, that can play these video formats, as stated here. But older devices don't support it.

    There is further proof of this from caniuse.com:

    The video's codec information:

    2024-11-24 - 12 31 23

    caniuse.com states that Safari don't fully support it:

    2024-11-24 - 12 31 55

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

    First we have to solve the Unhandled Promise Rejection error. That happens because setStatusAsync(status) called on a video, that failed to load. So I would add a catch to this call, that handles rejections:

    playVideoPromiseRef.current = currentVideoPlayerRef.current?.setStatusAsync(newStatus);

    Second, I would add a fallback image for these situations, when a video couldn't be played. There is an onError hook on the Video component, that calls a method, when a fatal error happened, and the video couldn't be played. I would add an isError state, and render a fallback image when it's set to true.
    Furthermore, we can't really find out why the video can't be played, since the browser will not give us any error message, and the Content-Type doesn't contains the codec, that would give us the ability to find out manually, if the browser supports it, so I propose to use a generic fallback image, just like with AttachmentOfflineIndicator.

    Generic fallback image, when the video couldn't be played: 2024-11-24 - 12 05 30 2024-11-24 - 12 11 21

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  10. melvin-bot commented on Nov 20, 2024

    @melvin-bot

    📣 @PeterZsigmond! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  11. peter-zsigmond commented on Nov 20, 2024

    @peter-zsigmond

    Contributor details
    Your Expensify account email: zspeti02@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~0101f7c93c2c56ada0

  12. melvin-bot commented on Nov 20, 2024

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  13. 165 remaining items

  14. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.12-7 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 2025-03-21. 🎊

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

    • @hoangzinh requires payment through NewDot Manual Requests
    • @peter-zsigmond requires payment (Needs manual offer from BZ)
    • @HezekielT requires payment through NewDot Manual Requests
  15. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    @hoangzinh @hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  16. melvin-bot commented on Mar 21, 2025

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @isabelastisser you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  17. melvin-bot commented on Mar 21, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@isabelastisser)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1858504313972501020/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  18. hoangzinh commented on Mar 21, 2025

    @hoangzinh
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: No offending PR. It's a case that we haven't covered before

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    Test:

    On Web/Desktop/Android/Android Chrome

    1. Sign in to any account
    2. Open any report and send a video with AV1 codec
    3. Play the video
    4. Verify the video plays as expected

    On IOS/IOS Safari

    1. Sign in to any account
    2. Open any report and send a video with AV1 codec
    3. Play the video
    4. Verify that a slashed video with an error message that says An error occurred while trying to play this video

    Do we agree 👍 or 👎

  19. hoangzinh commented on Mar 21, 2025

    @hoangzinh
    Contributor

    Requested payment in ND

  20. isabelastisser commented on Mar 21, 2025

    @isabelastisser
    Contributor

    Payment summary:

    • @hoangzinh requires payment through NewDot Manual Requests $500 for C+ review
    • @HezekielT requires payment through NewDot Manual Requests $500 for proposal.
  21. isabelastisser commented on Mar 21, 2025

    @isabelastisser
    Contributor

    All set!

  22. garrettmknight commented on Mar 31, 2025

    @garrettmknight
    Contributor

    $500 approved for @hoangzinh

  23. garrettmknight commented on Jul 21, 2025

    @garrettmknight
    Contributor

    $500 approved for @HezekielT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions