You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-03-21] [$500][HIGH] Safari - Unable to play video attachment #52673
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:
Sign in to an existing account
Navigate to a chat which has a video attachment
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 evidenceattachment-play-crash.mp4attachment-play-crash-staging.mp4Recording.3170.mp4
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:
caniuse.com states that Safari don't fully support it:
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:
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:
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.
📣 @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:
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.
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.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
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:
@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]
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!
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.
Activity
melvin-bot commentedon Nov 16, 2024
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.[-]Safari - Unable to play video attachment[/-][+][$250] Safari - Unable to play video attachment[/+]melvin-bot commentedon Nov 18, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021858504313972501020
melvin-bot commentedon Nov 18, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)me-ZaidAli commentedon Nov 18, 2024
@m-natarajan can you please the video format that's causing the bug coz mp4 is working in safari
peter-zsigmond commentedon Nov 20, 2024
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:
caniuse.com states that Safari don't fully support it:
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:
App/src/components/VideoPlayerContexts/PlaybackContext.tsx
Line 43 in 3ebe852
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:
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.
melvin-bot commentedon Nov 20, 2024
📣 @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:
Format:
peter-zsigmond commentedon Nov 20, 2024
Contributor details
Your Expensify account email: zspeti02@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0101f7c93c2c56ada0
melvin-bot commentedon Nov 20, 2024
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
165 remaining items
melvin-bot commentedon Mar 14, 2025
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:
melvin-bot commentedon Mar 14, 2025
@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]
melvin-bot commentedon Mar 21, 2025
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!
melvin-bot commentedon Mar 21, 2025
Payment Summary
Upwork Job
BugZero Checklist (@isabelastisser)
hoangzinh commentedon Mar 21, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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
On IOS/IOS Safari
Do we agree 👍 or 👎
hoangzinh commentedon Mar 21, 2025
Requested payment in ND
isabelastisser commentedon Mar 21, 2025
Payment summary:
isabelastisser commentedon Mar 21, 2025
All set!
garrettmknight commentedon Mar 31, 2025
$500 approved for @hoangzinh
garrettmknight commentedon Jul 21, 2025
$500 approved for @HezekielT