Open Bug 1916196 Opened 3 months ago Updated 18 days ago

mbasic.facebook.com - Video is saved as HTML file failing to download the video using "Save Video As" option

Categories

(Web Compatibility :: Site Reports, defect, P3)

Desktop
Windows 10

Tracking

(firefox131 affected)

Tracking Status
firefox131 --- affected

People

(Reporter: rbucata, Unassigned)

References

()

Details

(Keywords: webcompat:needs-diagnosis, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs])

User Story

platform:windows,mac,linux
impact:annoyance
configuration:general
affects:few
branch:release
diagnosis-team:webcompat

Environment:
Operating system: Windows 10
Firefox version: Firefox 117.0

Steps to reproduce:

  1. Navigate to: https://mbasic.facebook.com/story.php?story_fbid=pfbid0CHHNJNk4fon21hu5P6vEnqVT85qkZEnmAWCffjj37yKn8UmdJqdJmfX3trkXXgmxl&id=100001358737240&eav=AfbPO1Lgl3NGUWToJgPhZHhcyo4zxJoiiecbaFs4MqlC8woy12Va2DbaQfAkjWZ0xlA&refid=17&_ft_=encrypted_tracking_data.0AY8og8WoGieu9zCw7YJs2hywHm_kschRmoBgc7QuFqT8ixPt-KIUG-4Vo7sGPPPlR2A3HKYu2Uok0zyqqB04XgrGfC_23QEJzqyh5KL-yyVlCenQ_dWDEERKSWDXciDxysryB8o6Vb_g0z51BHGN2IEcK-_7-rGLSGbF6VYF-fUc04pM2VmyU5d--tAQW0X21NhBXUK4bWxd6RgK-nbT-45qtR14ggWmtbTxGmAh1SYMmMVuOdcA5HoN0swQ0PG1iVPIOD6p_iyrYVKNZ1s7g3ve1yvdT3lOtT-WStixbVWLpREBDlZNZ0x_LhwvOqQaj3GaGkwVnn9NEwy5GvBc_s4zs7BylQuG4ACZjMnLLirSCpykhqjy71R3wZRUXOgOu4-EGwch4W7WDAmZ1u8nrgKC-nIg8Di6eSbgpGvzw6PoBVLK7KLaHdpzsWOm4dfKWq0LFX-VSVWQkj_OD1JfGhbk1rihhxtk8uORImOGGLWm5OrZX-EpbzZ5n0wKvHUKZIkzp6qzooTUAUETHfO7FxFNdVGVGzionoluCGX6ufLZ9IauNNWk7tcv8F3gytkKk5CV4VrFKB9ZtuI7VwT84iy94wM32ll8ccYGJB9w81KhbZ8mo21eP_SAJippu9Uztmv1QDLL4XcKf0M0UOr2EkOcspY9W9kepqmgecn5We7xUlQghk2nzEjdOwOj3T8HWN42ky9lZvsL907OqTqXzNenw7XtMwINcx1xpEnOjkZgPGLir-4pZ52RR4NVkyXAJpvmwDWtgLeUS1stEJzj1x4C_kKMzF-fQaQ4jsKFVQ
  2. Open the video and trigger the contextual menu using the right click of the mouse
  3. Select "Save as" and observe

Expected Behavior:
The video is saved as MP4

Actual Behavior:
Video is saved as HTML

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in Firefox Nightly, and Firefox Release
  • Does not reproduce in Chrome

Created from https://github.com/webcompat/web-bugs/issues/127335

Severity: -- → S3
User Story: (updated)

Reproduces for me in Nightly 133 Oct 11.
Tried a random MP4 on a different site, gets saved as MP4

headers (via about:cache):

response-head: 
HTTP/2 200 
last-modified: Tue, 19 Sep 2023 23:43:16 GMT
content-type: video/mp4
x-needle-checksum: 3854148171
content-digest: adler32=3854148171
cross-origin-resource-policy: cross-origin
timing-allow-origin: *
access-control-allow-origin: *
cache-control: max-age=1209600, no-transform
accept-ranges: bytes
content-length: 4754922
date: Mon, 14 Oct 2024 15:01:23 GMT
x-fb-connection-quality: EXCELLENT; q=0.9, rtt=7, rtx=0, c=10, mss=1392, tbw=541, tp=-1, tpl=-1, uplat=1, ullat=-1
alt-svc: h3=":443"; ma=86400
X-Firefox-Spdy: h2
X-Firefox-Early-Data: accepted

original-response-headers: 
x-additional-error-detail: 
last-modified: Tue, 19 Sep 2023 23:43:16 GMT
content-type: video/mp4
x-needle-checksum: 3854148171
content-digest: adler32=3854148171
cross-origin-resource-policy: cross-origin
timing-allow-origin: *
access-control-allow-origin: *
cache-control: max-age=1209600, no-transform
accept-ranges: bytes
content-length: 4754922
date: Mon, 14 Oct 2024 15:01:23 GMT
x-fb-connection-quality: EXCELLENT; q=0.9, rtt=7, rtx=0, c=10, mss=1392, tbw=541, tp=-1, tpl=-1, uplat=1, ullat=-1
alt-svc: h3=":443"; ma=86400
X-Firefox-Spdy: h2

Something is deciding to save this as .htm; my guess is in the front-end code - perhaps saveMedia() in browser/base/content/pageinfo/pageInfo.js?

Flags: needinfo?(florian)

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #2)

perhaps saveMedia() in browser/base/content/pageinfo/pageInfo.js?

That code is only used when clicking the "Save as…" button in the Media tab of the Page Info dialog.

For the general context menu, I think the code is at https://searchfox.org/mozilla-central/rev/d56687458d4e6e8882c4b740e78413a0f0a69d59/browser/base/content/nsContextMenu.sys.mjs#2156-2179

Flags: needinfo?(florian)

saveHelper is being called with https://mbasic.facebook.com/video_redirect/?src=https%3A%2F%2Fvideo.fybz1-1.fna.fbcdn.net%2Fv%2Ft42.1790-2%2F380039820_213718745043538_1983403095636140383_n.mp4%3F_nc_cat%3D109%26ccb%3D1-7%26_nc_sid%3D55d0d3%26efg%3DeyJ2ZW5jb2RlX3RhZyI6InN2ZV9zZCIsInZpZGVvX2lkIjo2MTQzODYzMTc0NDM4NjZ9%26_nc_e2o%3D614386317443866%26_nc_ohc%3Drb05HXVXDv0Q7kNvgGYohNE%26tn%3DtVyXjw7vmRr_HEEz%26_nc_zt%3D28%26_nc_rml%3D0%26_nc_ht%3Dvideo.fybz1-1.fna%26_nc_gid%3DAVak0Gi-p6vvRzmU74BzLEs%26oh%3D00_AYC16-OB1Nws31WG1ohGxjYtcrbazepOJMFD4YykIvgd0A%26oe%3D6726314B&source=misc&id=614386317443866&noredirect=0&watermark=0&refid=52&_ft_=encrypted_tracking_data.0AY-XsViauECSHN-1wpOidLCAGG72BKsrX0_DZ4x0V8rxDPH3q7eQPRAb9bCh5V-psXI7mLvjE2uCz3xxx4X6f-SgP4tAQLeFtQCy9B4crlCG54UA3nlJzvvh9S5wSXtbAlumcIbLae4A9iSurtCaK2fa7yzz08xtcucejWvU7EmFbCbSA7BBjA8RhF8-hCB8kB8OxxDir9FRuydFtJre9Co2pOKAnuY8J65jP7kWg_JGj88e2Bw9qanMzAv0oQK4V4sBobLZ9LGJ3gJb3W5sUrLw_BPAoDPhNgkKj6jvYLjnTUJ2EyCN1X16AWzZI_R8Zplrkh9Us4kiq4B_IyVTmVA57Mr06NPTxki8kzh3CMXRRrrJ_u7lpwkfjiMoXDkYodmBKo7-e1XPqhUgv0Erf35YF0lKw4hu1AXfJIQSR11vAkV-FvMzJLL0cp9KrRcf-HEbcGytfsvwR47D9mr68C5I0T5KA5T2UuDyA_j9ffm4kZbD4y9S7rL2kw5Ldy0OFDyPFP5sfhs8hrvxjhAUUT0bnVGG7kQA_uujjmfVkEYKMNByEbP1Koj9h9VuJivqb7Pq1AFBFVEme-e0d6h27iO95xtc-jOn86J9H1bvX6bpIZxSGKPjG-HViLDs1o_oCMfBc68-dsNMiiqzv-JLtuR7cN1zhbhbeBmK4NaVErLZQIQEQv6YISpuuNtnfktxAh-vNYh8fJKtbITcJRCz8nniz7TElU2uU0VppRcN4kdQed5ID_iV2X4e9ynYE24qMRyCmT56PPKOcWcLCOMQHg3vJbhm_-ldlwBJWaZlxA&__tn__=FH-R

instead of https://video.fybz1-1.fna.fbcdn.net/v/t42.1790-2/380039820_213718745043538_1983403095636140383_n.mp4?_nc_cat=109&ccb=1-7&_nc_sid=55d0d3&efg=eyJ2ZW5jb2RlX3RhZyI6InN2ZV9zZCIsInZpZGVvX2lkIjo2MTQzODYzMTc0NDM4NjZ9&_nc_e2o=614386317443866&_nc_ohc=rb05HXVXDv0Q7kNvgGYohNE&tn=tVyXjw7vmRr_HEEz&_nc_zt=28&_nc_rml=0&_nc_ht=video.fybz1-1.fna&_nc_gid=AVak0Gi-p6vvRzmU74BzLEs&oh=00_AYC16-OB1Nws31WG1ohGxjYtcrbazepOJMFD4YykIvgd0A&oe=6726314B

saveHelper gets the url from context.mediaURL and that seems to come from currentSrc on the video element which is the video_redirect url

Severity: S3 → S4
User Story: (updated)
Priority: P2 → P3

I get redirected away from mbasic.facebook.com now so can't reproduce the issue anymore.

Raul, can you still reproduce?

Flags: needinfo?(rbucata)

I get redirected as well, and I can not trigger the contextual menu on videos. anymore, on any browser.

Flags: needinfo?(rbucata)
You need to log in before you can comment on or make changes to this bug.