Closed Bug 721110 Opened 10 years ago Closed 10 years ago

Hide Sync setup banner on about:home for devices that don't support sync

Categories

(Firefox for Android Graveyard :: General, defect, P2)

ARM
Android
defect

Tracking

(blocking-fennec1.0 +, fennec11+)

RESOLVED FIXED
Firefox 12
Tracking Status
blocking-fennec1.0 --- +
fennec 11+ ---

People

(Reporter: tchung, Assigned: sriram)

References

Details

(Whiteboard: [sync])

Attachments

(3 files)

We've discovered that the current state of Nightly builds don't support Android 2.2 devices (soon to be fixed? bug 717691), and Kindle fire (bug 719714).   There may be others out there that we dont know about.

Wondering if there's a way to remove the Sync setup banner and any additional instructions anywhere if we had to turn it off per device or OS.   Can we add this fallback hook?
Out of curiosity, if you tap the Sync banner on a non-supported device, does it crash right now?
Assignee: nobody → lucasr.at.mozilla
(Hmm, wonder if I can find a magic way to get CCed on all Fennec bugs that mention sync…)
Richard, what are the Android releases that we should disable Sync for? Is there a simple call that I can make to check if the system supports Sync?
(In reply to Lucas Rocha (:lucasr) from comment #3)
> Richard, what are the Android releases that we should disable Sync for? Is
> there a simple call that I can make to check if the system supports Sync?

We don't really know yet. Certainly devices on which the account system is unavailable, such as the Fire. For these, getAccountsForType should fail, because the framework that provides it is unavailable. If it doesn't fail, that would be sad.
Tony, could you please run latest nightly on a, say, Kindle Fire, and let me know if you see any exception being thrown when using the AccountManager API? If it doesn't fail in any way, we will have to explicitly blacklist it somehow.
tracking-fennec: --- → 11+
Priority: -- → P2
(In reply to Lucas Rocha (:lucasr) from comment #5)
> Tony, could you please run latest nightly on a, say, Kindle Fire, and let me
> know if you see any exception being thrown when using the AccountManager
> API? If it doesn't fail in any way, we will have to explicitly blacklist it
> somehow.

01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): error reading json file
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): org.json.JSONException: No value for title
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.get(JSONObject.java:354)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.getString(JSONObject.java:510)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.readLastTabs(AboutHomeContent.java:506)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.access$400(AboutHomeContent.java:91)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent$5$2.run(AboutHomeContent.java:294)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.handleCallback(Handler.java:587)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Looper.loop(Looper.java:130)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:185)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): error reading json file
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): org.json.JSONException: No value for title
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.get(JSONObject.java:354)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.getString(JSONObject.java:510)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.readLastTabs(AboutHomeContent.java:506)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.access$400(AboutHomeContent.java:91)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent$5$2.run(AboutHomeContent.java:294)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.handleCallback(Handler.java:587)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Looper.loop(Looper.java:130)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:185)
Attached file logcat
the full logcat on startup and pageload
Tony, this is an unrelated crash. I've just sent a patch for it on bug 722655 btw. Maybe you could test again once my fix lands. Or just make sure you don't have any tabs without a title.
(In reply to Lucas Rocha (:lucasr) from comment #8)
> Tony, this is an unrelated crash. I've just sent a patch for it on bug
> 722655 btw. Maybe you could test again once my fix lands. Or just make sure
> you don't have any tabs without a title.

okay, i was just pasting what i saw during the startup operation.   didnt think it was that helpful, but thought you'd make more sense of it.

Sure, i'll watch bug 722655 and retest then.
Target Milestone: --- → Firefox 12
(In reply to Tony Chung [:tchung] from comment #9)
> (In reply to Lucas Rocha (:lucasr) from comment #8)
> > Tony, this is an unrelated crash. I've just sent a patch for it on bug
> > 722655 btw. Maybe you could test again once my fix lands. Or just make sure
> > you don't have any tabs without a title.
> 
> okay, i was just pasting what i saw during the startup operation.   didnt
> think it was that helpful, but thought you'd make more sense of it.
> 
> Sure, i'll watch bug 722655 and retest then.

Tony, could you test this again now that bug 722655 has been fixed?
Still seeing the banner.  attaching logcat of home screen.

Tested on Kindle Fire - 2012-02-23 13.0a1 nightly build.
Attached file logcat 02-23-2012
You're seeing a StrictMode exception which is also unrelated to this bug :-/ I filed and fixed it in bug 729945. Let's get this landed first and then you can try it again.
blocking-fennec1.0: --- → +
Status: NEW → ASSIGNED
Whiteboard: [sync]
Tony, could you try this again?
Do we know on which type of devices we wouldn't have Sync support? This affects marketing efforts and we would need to plan around it if it is still the case at launch.
(In reply to Irina Sandu from comment #15)
> Do we know on which type of devices we wouldn't have Sync support? This
> affects marketing efforts and we would need to plan around it if it is still
> the case at launch.

The Kindle Fire is the big one that I know of. Other devices that ship a stripped-down version of Android might also be unable to support Sync.
Those are not so many so it shouldn't be a problem. But if you find this issue on mainstream devices (Samsung, HTC, Sony etc.), please let us know.
(In reply to Irina Sandu from comment #17)
> Those are not so many so it shouldn't be a problem. But if you find this
> issue on mainstream devices (Samsung, HTC, Sony etc.), please let us know.

There were about 6 million Fires shipped in Q4, which is about half of the entire (US?) Android tablet market.
(In reply to Lucas Rocha (:lucasr) from comment #14)
> Tony, could you try this again?

Still reproducible.  03-18-2012 nightly.
(In reply to Tony Chung [:tchung] from comment #19)
> (In reply to Lucas Rocha (:lucasr) from comment #14)
> > Tony, could you try this again?
> 
> Still reproducible.  03-18-2012 nightly.

to clarify, the sync banner appearing is still reproducible.   I dont see the StrictMode exception anymore from bug 729945.
(In reply to Richard Newman [:rnewman] from comment #18)

> There were about 6 million Fires shipped in Q4, which is about half of the
> entire (US?) Android tablet market.

Relative to our addressable market and where we are being distributed this issue does not pose a communications challenge. The discussion on overall availability and support for the Kindle Fire is separate from this.
(In reply to Tony Chung [:tchung] from comment #20)
> (In reply to Tony Chung [:tchung] from comment #19)
> > (In reply to Lucas Rocha (:lucasr) from comment #14)
> > > Tony, could you try this again?
> > 
> > Still reproducible.  03-18-2012 nightly.
> 
> to clarify, the sync banner appearing is still reproducible.   I dont see
> the StrictMode exception anymore from bug 729945.

Ok, I was expecting the accounts manager to cause a crash or something when used on a device without sync support. I guess we can blacklist devices on a case-by-case basis but that's not optimal. Do we know the exact range of devices we want to disable sync on? Are we just talking about the Kindle Fire here?
Moving to Sriram. If we can't find a simple way to check for the "Accounts and Sync" applet, then let's just blacklist the kindle fire.
Assignee: lucasr.at.mozilla → sriram
W/AccountManagerService( 1374): caller uid 10041 is different than the authenticator's uid
F/FirefoxSync(23924): java.lang.SecurityException: caller uid 10041 is different than the authenticator's uid
F/FirefoxSync(23924): 	at android.os.Parcel.readException(Parcel.java:1322)
F/FirefoxSync(23924): 	at android.os.Parcel.readException(Parcel.java:1276)
F/FirefoxSync(23924): 	at android.accounts.IAccountManager$Stub$Proxy.addAccount(IAccountManager.java:547)
F/FirefoxSync(23924): 	at android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:507)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.setup.SyncAccounts.createAccount(SyncAccounts.java:75)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.setup.activities.SetupSyncActivity.onComplete(SetupSyncActivity.java:366)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.JPakeClient.complete(JPakeClient.java:333)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.stage.CompleteStage.execute(CompleteStage.java:12)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.JPakeClient.runNextStage(JPakeClient.java:225)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.stage.DecryptDataStage.execute(DecryptDataStage.java:72)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.JPakeClient.runNextStage(JPakeClient.java:225)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.stage.GetRequestStage$1.handleSuccess(GetRequestStage.java:71)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.stage.GetRequestStage$2.handleHttpResponse(GetRequestStage.java:120)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:232)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:254)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:260)
F/FirefoxSync(23924): 	at org.mozilla.gecko.sync.jpake.stage.GetRequestStage$GetStepTimerTask.run(GetRequestStage.java:194)
F/FirefoxSync(23924): 	at java.util.Timer$TimerImpl.run(Timer.java:284)
E/SyncAccounts(23924): Failed to add account!


This is the crash I get.
http://cl.ly/3V0S0Y1o2h1i0h091y32 <-- I see sync working. Is the bug just for a lack of an interface to enable/disable sync? And I can see the screen too: http://cl.ly/051j392W2W3L2m0M0G1n
I saw that crash too, on MV wifi, but not when I got home (on my Galaxy Nexus and Nexus S)

Based on comment 25, is this still a bug?
I just convinced tchung that everything works fine ;)
Waiting for him to close it. :)
Okay i've started testing the Fire again, and a lot has changed since bug 719714 was filed.  In particular, it seems like AccountManager on the Fire is now exposed.   Fennec's Sync banner seems to skip directly to the Firefox Sync Manager screen now, and show the simple setup screen.   Given this experience, we have an exposed way to get into your sync account and do magical stuff.   The other change is Android Sync is no longer a separate apk like it was before.   

That said, i was able to run through a quick set of smoketests:
- setup Sync via Jpake with a desktop machine
- sync bookmarks, history, and tabs  (evidence!  http://i.imgur.com/WWfmH.png)
- pair another device from the UI
- remove the sync account.
- verify the sync banner (This bug!) shows and hides on about:home correctly based on account activation or not.

I still see issues in logcat that need reporting (eg.  http://pastebin.mozilla.org/1541667)  but for the most part, this is working, and we should resolve this and bug 719714 as magically fixed.  :)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.