Closed Bug 1838541 Opened 11 months ago Closed 2 months ago

Full screen video exits browser and UI becomes unresponsive, UI moves to top right quarter of screen

Categories

(GeckoView :: Media, defect, P3)

Firefox 114
All
Android

Tracking

(firefox118 wontfix, firefox119 verified, firefox120 verified)

RESOLVED DUPLICATE of bug 1886083
120 Branch
Tracking Status
firefox118 --- wontfix
firefox119 --- verified
firefox120 --- verified

People

(Reporter: christov, Assigned: tthibaud)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][foundation][group4])

Attachments

(5 files)

User Agent: Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/114.0 Firefox/114.0

Steps to reproduce:

Brows to any YouTube video in a private window with portrait mode on
Login
Tap full screen on the video

Actual results:

Fullscreen appears briefly
Exits to home screen
When loading Firefox again, the UI is positioned in the top right hand corner of the screen (portrait) but only displays the bottom left corner of the UI.
UI is also unresponsive

Expected results:

Video should be played fullscreen in landscape view

Screenshot of end result after pressing full screen

Tested further and does not require login

Same and after hit fullscreen goes back homescreen.

https://bugzilla.mozilla.org/show_bug.cgi?id=1838728

The severity field is not set for this bug.
:jonalmeida, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jonalmeida942)
Severity: -- → S2
Severity: S2 → --
Flags: needinfo?(jonalmeida942) → qe-verify+

The severity field is not set for this bug.
:jonalmeida, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jonalmeida942)

Hi! We were not able to reproduce the described issue on the:

  • latest Nightly 116.0a1 (2023-06-30).
  • latest RC 115.0 (build 2).
  • RC 114.0 (2023-06-02).
  • RC 114.1.1.
  • Nightly 114.0a1 (2023-04-20).

Devices used:

  • Redmi 9C NFC (Android 10)
  • Xiaomi Mi11 Lite (Android 11)
  • Motorola Moto G9 plus (Android 11)
  • Oppo Find X5 (Android 13)
  • Google Pixel 7 (Android 14)

Removing the qe-verify flag.

Flags: qe-verify+

Hi. Latest available version in play store is 114.2, using an ASUS ZenFone 8 on Android 13.
Build 11r4.2 has not been tested in your list.

(In reply to christov from comment #7)

Hi. Latest available version in play store is 114.2, using an ASUS ZenFone 8 on Android 13.
Build 11r4.2 has not been tested in your list.

Hi,
I guess that means you can still reproduce this issue with Firefox 114.2.0 on your Asus ZenFone 8? Can you confirm that? 

Thanks a lot!

Flags: needinfo?(christov)

Hi, yes still reproducible on 114.2.0 on an Asus ZenFone 8

Tried without any add-ons and with add-ons. Same result as above.

Flags: needinfo?(christov)

Hi now upgraded to 115.2, same device and the issue does not occur unless you are signed in to youtube.

When browsing the site without being logged in, full screen videos appear as normal.
However as soon as I log in the videos have the same behaviour as this bug.

Notably if I close and reopen Firefox the full screen videos will then also cause this bug until I clear the app cache. At this point, once the cache is cleared, videos will play full screen as expected again.

Severity: -- → S3
Priority: -- → P3
Stacktrace from my Google Pixel Fold device which causes a fatal system process and phone soft restart.

I am able to reproduce on my Pixel Fold with additional STR below and error level only stacktrace. On my device this even causes a fatal exception in the android.display system process which causes the phone to appear to restart. Video is also included.

STR

  • Open Firefox release
  • Have a lot of tabs, load one of these tabs
  • Background the app
  • Open other apps like Youtube, Play Store, Slack, etc. (maybe not really needed but it seemed to help reproduce....could be placebo)
  • Foreground Firefox release and make sure it is on a loaded non-private tab
  • Open a new private tab
  • Navigate to Youtube
  • Click Fullscreen

Expected:
Should go fullscreen

Actual:
Toast message is shown, App is backgrounded/crashes, phone jumps to Google logo and logs show android.display system process fatal exception

I've tried this on other video sites as well and can reproduce 100% with the STR above. Bumping to an S2 due to this creating a fatal exception in the android.display process and causing the users device to soft restart. :jnicol this looks like it may be related to a graphics issue happening prior to the crash, I will upload more stack traces today (debug level this time).

Severity: S3 → S2
Flags: needinfo?(jnicol)

Is the "graphics issue" you're referring to just the android.display fatal exception, or is there something else in the log I'm missing? I don't think that's a graphics issue per se. It seems to be regarding the configuration change (from portrait to landscape).

Can you only reproduce in private browsing mode?

It looks like getTaskFragment() is returning null here. Does private browsing mode do anything that could make that be the case? perhaps removing a window/fragment/something from the screen and adding a different one for private mode?

Flags: needinfo?(jnicol)
See Also: → 1849524
Component: Browser Engine → Media
Product: Fenix → GeckoView
Blocks: 1852822
Assignee: nobody → zmckenney
Duplicate of this bug: 1844707
Duplicate of this bug: 1837284
Duplicate of this bug: 1849524

I've tried reproducing in Debug builds with many 116 and 117 versions but other than release version 117.1.0 (Build #2105973691) I haven't been successful. After not being able to reproduce I investigated possible causes which could link this with other issues we're seeing when entering full screen. I believe what is causing my device to crash is actually the same as what is causing irregular behavior in these tickets which I've updated:
1837284
1844707
1849524

Code Path Walkthrough

When a user goes to full screen we call into FullscreenFeature.kt here which updates our state. For the UI handling and setting immersive mode in the Activity it is observed in BaseBrowserFragment.kt here. More importantly it is handled in MediaSessionFullscreenFeature.kt here which calls for the activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE. This is then handled in our HomeActivity in onConfigurationChanged as expected.

Issues found so far

In release 117 on my Pixel Fold when attempting to go full this activity instance is null and will crash when in Private Browsing. I've stopped the configuration from continuing in the activity on my Pixel 7 as well (which is not crashing) and am able to replicate the screenshots posted to this and other tickets.

This code runs continuously after full screening the app. I've checked the state objects being passed and they are continuously changing (different addresses) and the activity.requestedOrientation is continuing to rerun.

Next Steps

I will build an exact debug variant of the release causing issues to try to reproduce, specifically looking into the Activity configuration changes. I will investigate the MediaSessionFullscreenFeature.kt state updating and configuration setting since this seems like it could cause issues.

Debug version of the release that crashes for me does not have issues even after replicating the STR many times (which I can 100% reproduce on release version). The activity not properly handling a configuration change could still be related to the media session fullscreen state constantly updating the activity configuration but I'm looking for others who can help me reproduce and test.

Whiteboard: [fxdroid][foundation]

When a video is set to fullscreen, every tab that has a media session triggers the processFullscreen() function within MediaSessionFullscreenFeature but in the function only the first tab's state is used. This has been fixed in PR 3757 so it now will only fire once for the active tab when the fullscreen state has changed.

Because I needed to uninstall Firefox apps on my device to use a locally built release version of 117.1.0 (due to debug key) I'm no longer able to reproduce on any builds (even the previously broken release version) using the STR I posted. This could be due to changes in my history and tabs.

:tthibaud and I are going to look over this again on Monday but he may take it moving forward due to time constraints on my end.

Flags: needinfo?(jonalmeida942)
Assignee: zmckenney → tthibaud

Hi Christov,
By any chance, can you reproduce this bug with Firefox Nightly and/or Firefox Beta?

Flags: needinfo?(christov)

Authored by Titouan Thibaud
https://github.com/mozilla-mobile/firefox-android/commit/b8b4b59262f00cbcff3eb47a33d091af83bea72e
[main] Bug 1838541: Changed distinctUntilChanged for MediaSessionFullScreenFeature

Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

We landed the patch in Nightly.

I hope this can help us validate that we are not creating any regression.
If Christov (or anybody else) can reproduce it on Beta but not in Nightly, then we can uplift the fix to beta and see with them if it is fixed. If yes, we can probably consider that the bug is fixed. If not, we will have to investigate more.

Hi!
I managed to reproduce this issue on RC 117.1.0, using the steps from Comment 12.
Verified as fixed on the latest Nightly build (120.0a1 from 2023-10-04) using the same steps.
Device used: Google Pixel 7 (Android 14).
Marking the ticket as verified for 120.

Flags: qe-verify+

:tthibaud next week is the final week of beta for Fx119.
Based on Lorand's comment 26, it would be nice to uplift this to beta?

Flags: needinfo?(tthibaud)

(In reply to Donal Meehan [:dmeehan] from comment #27)

:tthibaud next week is the final week of beta for Fx119.
Based on Lorand's comment 26, it would be nice to uplift this to beta?

I and [:brclark] totally agree, I'll create the uplift request. Thanks a lot for flagging this, and thanks [:ljanos] for verifying the bug fix!

Comment on attachment 9357638 [details] [review]
[mozilla-mobile/firefox-android] Bug 1838541: Changed distinctUntilChanged for MediaSessionFullScreenFeature (backport #3757) (#4016)

Beta/Release Uplift Approval Request

  • User impact if declined: Some users may continue experiencing crash or unresponsive UI when watching a fullscreen video in portrait mode.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The code is covered by tests, and have been in Nightly without any detected problems for one week.
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(tthibaud)
Attachment #9357638 - Flags: approval-mozilla-beta?
Comment on attachment 9357638 [details] [review]
[mozilla-mobile/firefox-android] Bug 1838541: Changed distinctUntilChanged for MediaSessionFullScreenFeature (backport #3757) (#4016)

Approved for Fenix/Focus 119.0b8
Attachment #9357638 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Authored by Titouan Thibaud
https://github.com/mozilla-mobile/firefox-android/commit/40a3e1d8541d5334ae6bd4f4732bb50115efe8f8
[releases_v119] Bug 1838541: Changed distinctUntilChanged for MediaSessionFullScreenFeature

Flags: qe-verify+

Verified fixed on latest Beta 119.0b8. The issue is no longer reproducible.
Tested with:

  • Google Pixel 7 Pro ( Android 14)
  • Lenovo Tab P11 Pro (Android 12)
  • Xiaomi Mi 8 Lite (Android 10)
  • Huawei MediaPad M2 (Android 5.1.1)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Blocks: 1875938

Reopening this ticket as we've recently discovered that this issue is related to PiP and it is not reproducible when PiP for Fenix/Firefox is disabled. We will be investigating further for the underlying reason(s).

Status: VERIFIED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---

Redirect a needinfo that is pending on an inactive user to the triage owner.
:m_kato, since the bug has high severity and recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(christov) → needinfo?(m_kato)
Flags: needinfo?(m_kato) → needinfo?(tthibaud)
Whiteboard: [fxdroid][foundation] → [fxdroid][foundation][s2-list25?]
Flags: needinfo?(tthibaud)
Whiteboard: [fxdroid][foundation][s2-list25?] → [fxdroid][foundation][s2-list25?] [group4]
Duplicate of this bug: 1875938
Depends on: 1886083

I'll close this bug as a duplicate of Bug 1886083, as there are already very precise STR there and the conversation is already happening there.

Status: REOPENED → RESOLVED
Closed: 8 months ago2 months ago
Duplicate of bug: 1886083
Resolution: --- → DUPLICATE
Whiteboard: [fxdroid][foundation][s2-list25?] [group4] → [fxdroid][foundation][group4]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: