Closed Bug 1772239 Opened 2 years ago Closed 2 years ago

Connecting to Firefox for Android Nightly's main process shows empty page

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(firefox-esr91 unaffected, firefox101 unaffected, firefox102 fixed, firefox103 fixed)

VERIFIED FIXED
103 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox101 --- unaffected
firefox102 --- fixed
firefox103 --- fixed

People

(Reporter: agi, Assigned: jdescottes)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Thank you for helping make Firefox better. If you are reporting a defect, please complete the following:

What were you doing?

Please tell us what site you were on, and what steps led to the error you are reporting

  1. Install latest nightly from play store on Android device
  2. Connect to it using about:debugging
  3. Select the multiprocess toolbox

What happened?

A white tab opens

What should have happened?

The debugger should open

Anything else we should know?

I made sure that both my Desktop and Android Firefox Nightly are up to date.

Flags: needinfo?(jdescottes)

This was regressed by Bug 1700092, especially https://searchfox.org/mozilla-central/source/devtools/server/actors/watcher/session-context.js#162

function getWatcherSupportedTargets(type) {
  // We're completely bypassing the watcher for the non-multiprocess Browser Toolbox.
  if (
    type == SESSION_TYPES.ALL &&
    !Services.prefs.getBoolPref("devtools.browsertoolbox.fission", false)
  ) {
    return {};
  }

  return {
    [Targets.TYPES.FRAME]: true,
    [Targets.TYPES.PROCESS]: true,
    [Targets.TYPES.WORKER]:
      type == SESSION_TYPES.BROWSER_ELEMENT ||
      type == SESSION_TYPES.WEBEXTENSION,
  };
}

This code runs on the server but checks the devtools.browsertoolbox.fission pref which is assumed to be a client preference.
This pref is set to true on Nightly desktop, so desktop -> desktop remote debugging was not impacted, but this breaks remote debugging for Android.

As a workaround, you can go to about:debugging on Android and create the devtools.browsertoolbox.fission preference with the value true, but we should not read this preference on the server.

Flags: needinfo?(jdescottes)
Regressed by: 1700092

Going to set P2 for now since there's a workaround.

Severity: -- → S3
Priority: -- → P2

The devtools.browsertoolbox.fission should not be read on the server but should instead be provided to the server by the client.
The breakage can be reproduced if you try to debug a Firefox desktop with devtools.browsertoolbox.fission = false from a Firefox with devtools.browsertoolbox.fission
= true.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1700092

Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/176c288277f4
[devtools] Stop reading client preference devtools.browsertoolbox.fission in the devtools server r=ochameau,devtools-backward-compat-reviewers,bomsy
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

Comment on attachment 9279426 [details]
Bug 1772239 - [devtools] Stop reading client preference devtools.browsertoolbox.fission in the devtools server

Beta/Release Uplift Approval Request

  • User impact if declined: Without this DevTools server fix, you cannot debug the main process of Firefox for Android from Nightly. The workaround is to manually set a preference in Firefox for Android, but it would be great to simply fix it.

Can't easily be tested in automation. I will try to verify with an Android Nightly later (not sure if it is in android nightlies yet).

  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • 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): Simple JS fix. Details below:

DevTools is split between client and server, which can run on different machines. Before the patch, the server (running on FF for Android in this case) would try to read a preference. This was the only spot where this preference was read on the server, it should always have been read from a single source (ie the client's instance preferences). Otherwise we can get into unexpected situations where server and client can't work together.

Now with this patch the client is reading the preference and sending it to the server.

  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9279426 - Flags: approval-mozilla-beta?

Comment on attachment 9279426 [details]
Bug 1772239 - [devtools] Stop reading client preference devtools.browsertoolbox.fission in the devtools server

Approved for 102 beta 5, thanks.

Attachment #9279426 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]
Flags: qe-verify+

Verified as fixed on the latest Nightly 103.0a1 from 06/08 with Google Pixel 6 (Android 12).

Status: RESOLVED → VERIFIED

(In reply to Delia Pop from comment #10)

Verified as fixed on the latest Nightly 103.0a1 from 06/08 with Google Pixel 6 (Android 12).

Thanks a lot for testing, I totally forgot to verify this.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: