-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-06-28] [$250] mWeb - Video - Download option is not working #43117
Comments
Triggered auto assignment to @twisterdotcom ( |
@twisterdotcom 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 |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Download video option doesn't work. What is the root cause of that problem?When we press the download option, it will take the video player ref source uri props and append an encryptedAuthToken to it. App/src/components/VideoPlayerContexts/VideoPopoverMenuContext.tsx Lines 32 to 42 in 66b4072
However, the video player ref source uri already has encryptedAuthToken appended to it. (if not a local file)
App/src/components/VideoPlayer/BaseVideoPlayer.tsx Lines 347 to 351 in 66b4072
So, encryptedAuthToken is appended twice resulting in error. What changes do you think we should make in order to solve the problem?Remove App/src/components/VideoPlayerContexts/VideoPopoverMenuContext.tsx Lines 32 to 42 in 66b4072
|
ProposalPlease re-state the problem that we are trying to solve in this issue.mWeb - Video - Download option is not working. What is the root cause of that problem?In below code, we are adding encryptedAuthToken in the URL, but there's a possibility that it's already added:
This is already being added from here as well:
This leads to duplicate query params. There are multiple other places as well where
App/src/components/PDFThumbnail/index.tsx Line 23 in 90dee7a
Why does this issue happen only on mWeb? Because on normal web, duplicate params are being handled gracefully (extra one is not there in the request). But on mWeb, the duplicate ones don't get removed which leads to an exception. What changes do you think we should make in order to solve the problem?We should update the logic of export default function (url: string) {
if (url.includes('encryptedAuthToken')) {
return url
}
return `${url}?encryptedAuthToken=${encodeURIComponent(encryptedAuthToken)}`;
} We can also change the name to This will also make it future-proof, even if the auth token method gets called multiple times, it would only be added once. |
Job added to Upwork: https://www.upwork.com/jobs/~013079356c488afb74 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani ( |
We can remove the But It looks that we already passing the EncryptedAuthToken already then @bernhardoj 's Proposal of removing the 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@twisterdotcom, @jayeshmangwani, @grgia Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 @ShridharGoel 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@grgia I think @jayeshmangwani meant to approve my proposal |
@twisterdotcom, @jayeshmangwani, @ShridharGoel, @grgia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@jayeshmangwani could you highlight the chosen proposal, I was under the impression you had said @ShridharGoel's proposal was fine. When you choose a proposal, could you include only the chosen proposal with the |
I will keep this in mind for future reference. I should have split the comment. 🤦 |
@jayeshmangwani could you address #43117 (comment) ? Or would you suggest we move forward with @bernhardoj's proposal. Thanks for your understanding everyone |
When I was testing the downloadAttachment function with a few scenarios, we were passing the addEncryptedAuthTokenToURL to the source files every time. That's why I was considering going with the @bernhardoj 's proposal. I asked the same question to @ShridharGoel two weeks ago to see if they could find any scenario where we are not passing the encryptedAuthToken.
@grgia If there is no need to add the addEncryptedAuthTokenToURL for any file, then we can safely remove it as per @bernhardoj's proposal. |
@jayeshmangwani #3597 |
Yes If isAuthTokenRequired is true then we need to append the encryptedAuthToken to the source url, but the thing here in this issue is we are appending the encryptedAuthToken twice, we already added EncryptedAuthTokenToURL to the
Then, we are passing the sourceURL to Video source.uri App/src/components/VideoPlayer/BaseVideoPlayer.tsx Lines 347 to 351 in 8dea185
And here we are again appending the encryptedAuthToken to the
|
Gotcha, that makes much more sense thank you @jayeshmangwani |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Going to go with @bernhardoj's proposal. @ShridharGoel let me know if you need help finding an issue to work on! |
PR is ready cc: @jayeshmangwani |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.0-9 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-06-28. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
Regression Test Proposal
Do we agree 👍 or 👎 |
Payment Summary:
|
Requested $250 on NewDot. |
$250 approved for @jayeshmangwani |
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: 1.4.79-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4594355
Email or phone of affected tester (no customers): applausetester+vd_mweb060424@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Pre-requisite: the user must be logged in
Expected Result:
The video should start downloading on the device
Actual Result:
Nothing happens after tapping on "Download" option
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6502136_1717538746108.Vnsc8116_1_.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @twisterdotcomThe text was updated successfully, but these errors were encountered: