Open Bug 1561284 Opened 1 year ago Updated 3 months ago

[remote-dbg-next] Fenix/Firefox Preview stuck in "waiting for browser" unless a tab is opened

Categories

(DevTools :: about:debugging, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

STRs:

  • go to about:debugging
  • enable USB devices debugging
  • start Fenix/FirefoxPreview, enable USB debugging
  • make sure you don't have any tab opened in Fenix
  • make sure you don't have any other Firefox for android with USB dbg enabled running
  • connect phone to computer

Expected result: Firefox Preview should show up in the sidebar, with a Connect button.
Actual result: The phone is detected but shows "waiting for browser"

I believe the debugger server is only started when opening a Tab in Firefox Preview, for performance reasons. However, this makes the user experience quite confusing

I asked about this in #gv and it turns out that apart from rewriting parts of the debugger server in native code, there is no real fix here, as GeckoView (and Gecko, SpiderMonkey, etc.) is only loaded when a tab opens in Fenix. This should improve in the future as the plan is to make GV load as soon as it is not blocking first paint, which will make this issue less noticeable in most cases.

Maybe there is some UI treatment we can do in remote debugging to inform the user or nudge them towards opening a tab.

Thanks for checking Panos! Then we should update the message to mention that a tab is needed. Maybe we can even detect if Fenix is installed on the device to only show this on relevant devices.

The use case for which I don't really have a solution in mind is when you have Fenix running alongside Fennec/Firefox for Android. In that case if you don't have any tab opened in Fenix, we will just show one sidebar item for the detected Fennec browser ("waiting for browser" is only displayed when we have a connected device with no browser available for debugging).

Looks like we can detect if fenix is running with await shell(this.id, "ps | grep fenix"); from adb-device.js. I think that if we see Fenix running but we don't have a debugging server running on it, we should probably show a dedicated sidebar item for it.

I think we won't really be able to distinguish the following scenarios
1/ Fenix with no tab opened
2/ Fenix with USB debugging disabled

consequently the sidebar item text should try and cover both.

I also have the problem that about:debugging is stuck on "waiting for browser". I tried it on Firefox Preview and Firefox Mobile.

As I understand Julian, debugging should work as soon as a new tab is opened, though that doesn't work for me. I also tried those steps without success:

  1. Closed the apps
  2. Disabled USB devices
  3. Reenabled USB devices
  4. Opened Firefox Preview/Firefox Mobile again
  5. Opened new tabs

Disconnecting and reconnecting the device is recognized immediately, though.

Sebastian

Severity: normal → S2

S1 or S2 bugs needs an assignee - could you find someone for this bug?

Flags: needinfo?(jdescottes)
Severity: S2 → S3
Flags: needinfo?(jdescottes)
Priority: P3 → P2
You need to log in before you can comment on or make changes to this bug.