Cannot access remote/desktop tabs: "Svc.Private is undefined"

VERIFIED FIXED in Firefox 6

Status

Cloud Services
Firefox Sync: Backend
--
major
VERIFIED FIXED
6 years ago
5 years ago

People

(Reporter: mbrubeck, Assigned: mbrubeck)

Tracking

(Blocks: 1 bug, {regression})

unspecified
mozilla6
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox5 unaffected, firefox6 fixed, fennec6+)

Details

(Whiteboard: [verified in services])

Attachments

(2 attachments)

(Assignee)

Description

6 years ago
Steps to reproduce:
1. Connect Fennec to a sync account.
2. Open the "Desktop" tab on the awesome screen.

Expected results: List of remote tabs is displayed.
Actual results: No remote tabs are displayed.

Console error: "Svc.Private is undefined" resource://services-sync/engines/tab.js Line 219

This is reproducible in both desktop and Android, in both Nightly (7.0a1) and Aurora (6.0a2).
(Assignee)

Comment 1

6 years ago
Regression from bug 648364 - there is no private browsing service in Fennec, and Svc.Private no longer falls back on a dummy implementation.
Blocks: 648364
(Assignee)

Updated

6 years ago
tracking-fennec: --- → ?
status-firefox5: --- → unaffected
Keywords: regressionwindow-wanted
(Assignee)

Updated

6 years ago
Blocks: 659689
(Assignee)

Comment 2

6 years ago
Created attachment 535220 [details] [diff] [review]
patch

The problem is that nsIPrivateBrowsingService is not implemented in Fennec, and Sync no longer falls back on a dummy implementation.  This patch modifies the Svc.Private getter to return undefined always (instead of throwing an exception the first time and returning undefined later), and checks the existence of Svc.Private before trying to use it.

Alternately, you could go back to using a dummy service for Svc.Private, or we could implement a dummy service in Fennec.
Attachment #535220 - Flags: review?(philipp)
Comment on attachment 535220 [details] [diff] [review]
patch

>+XPCOMUtils.defineLazyGetter(Svc, "Private", function() {
>+  try {
>+    return Cc["@mozilla.org/privatebrowsing;1"].getService(Ci["nsIPrivateBrowsingService"]);
>+  } catch (e) {
>+    return undefined;
>+  }
>+});

Please add a comment above this stanza to explain why we're doing this lazy getter the long way round.

Looks good otherwise. Please commit on services-central, not m-c. I can also land it for you if you prefer.
Attachment #535220 - Flags: review?(philipp) → review+
Matt, btw, do you think there's a way to unit test this? I want to make sure we only make mistakes once ;)

(We really need TPS (nee Crossweave) tests to run against an actual Fennec instance for the 'mobile' test run, then we would actually have caught this.)
(Assignee)

Updated

6 years ago
Blocks: 639711
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/services/services-central/rev/054adb76530d

We can try to add some Fennec browser-chrome tests to catch sync bugs, until we are able to get the xpcshell tests running for mobile.
Flags: in-testsuite?
Whiteboard: [fixed in services]
(Assignee)

Comment 6

6 years ago
Comment on attachment 535220 [details] [diff] [review]
patch

Requesting approval-mozilla-aurora.  This is a regression compared to Firefox 5 that affects Firefox 6 and breaks major functionality in Fennec.  The fix is low risk and localized (adding a single try-catch block and null guards).

The alternate to this fix is to back out bug 648364 which was a large refactoring (over 1000 lines changed).  Since other changes to the code have landed on top of that refactoring, it probably cannot be backed out without manual conflict resolution.
Attachment #535220 - Flags: approval-mozilla-aurora?
Comment on attachment 535220 [details] [diff] [review]
patch

Looks safe
Attachment #535220 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 8

6 years ago
Pushed to Aurora for Firefox 6: http://hg.mozilla.org/releases/mozilla-aurora/rev/c2a6c74bcfa4

This is not yet fixed on trunk.  It will land in the next merge from services-central to mozilla-central.
status-firefox6: affected → fixed
Target Milestone: --- → Firefox 6
Component: General → Firefox Sync: Backend
Product: Fennec → Mozilla Services
QA Contact: general → sync-backend
Target Milestone: Firefox 6 → mozilla6
Version: Trunk → unspecified
Created attachment 535572 [details]
screenshot
Duplicate of this bug: 660659
tracking-fennec: ? → 6+
STRs for QA: Tabs from Other Computers should work on Fennec again now (was briefly broken on Aurora and Nightlies).
WFM: Verified Fixed on Aurora

Mozilla/5.0 (Android; Linux armv7l; rv:6.0a2) Gecko/20110531 Firefox/6.0a2 Fennec/6.0a2
Whiteboard: [fixed in services] → [verified in services]
http://hg.mozilla.org/mozilla-central/rev/054adb76530d
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Duplicate of this bug: 627370

Comment 15

6 years ago
Verified fixed on Firefox 6 Beta 2: Mozilla /5.0 (Android;Linux armv7l;rv:6.0) Gecko/20110713 Firefox/6.0 Fennec/6.0

Device: LG Optimus 2X (Android 2.2)
Status: RESOLVED → VERIFIED
(Assignee)

Updated

5 years ago
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.