Closed Bug 1060922 Opened 11 years ago Closed 11 years ago

[email] can't open the account settings

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
2.1 S4 (12sep)

People

(Reporter: aryx, Assigned: jrburke)

Details

Attachments

(2 files)

Attached file logcat
Boot2Gecko 2.1.0.0-prerelease 20140829221349 on Geeksphone Keon I can't open the settings for the accounts configured in the Email app. Tapping on the account name does nothing. From the logcat's end: 08-31 17:53:23.579 I/GeckoDump( 1228): [31mERR: onerror reporting: TypeError: e is null @ app://email.gaiamobile.org/js/cards/account_prefs_mixins.js : 61[0m 08-31 17:53:23.579 E/GeckoConsole( 1228): [JavaScript Error: "TypeError: e is null" {file: "app://email.gaiamobile.org/js/cards/account_prefs_mixins.js" line: 61}] This occurs several times in the log (attached).
Looks like an upgrade issue, I thought this.identity.signature would have been empty string on upgrade, but looks like it is null. From the minified account_prefs_mixins.js file: updateSignatureButton: function() { (line 61 ->)var e = this.identity.signature, n = 0 === e.trim().length, i = this.signatureButton.firstElementChild; i.textContent = e, i.classList.toggle("empty-placeholder", n), n ? t.setAttributes(i, "settings-empty-signature-label") : i.removeAttribute("data-l10n-id"); }, Pull request up shortly.
Assignee: nobody → jrburke
Status: NEW → ASSIGNED
Target Milestone: --- → 2.1 S4 (12sep)
Attached file GitHub pull request
This bug was introduced in the changeset for bug 1052951, for determining if we should show the "Tap to Edit" default text. I just goofed and did not think through the upgrade case. I had it in my head that it would be empty string, but I think that was just the fog of last day of code changes, did not think that one through properly. I searched other .signature uses in the front end, and this was the only one that got goofed. The other uses, mainly in signature_settings.js, are fine. There is one quirk where signature_settings.js compares the text from the editor to the this.identity.signature to know if it should prompt on back save, so technically it would prompt since `'' !== null`, but I think this OK for the upgrade path, and if the user is in that card, they likely have wanted to type a signature. All it does is save an empty string vs null if they say yes, and empty string is treated the same as null as a far as signature use in the compose card -- both end up not showing a signature block. I tested getting the failure by downgrading a phone to latest 2.0, setting up an email account, then upgrading to latest email app. I got the failure. I applied the fix, and the settings were viewable and the signature_settings card was operational. It was neat because I saw the folder upgrade messages too!
Attachment #8481959 - Flags: review?(bugmail)
:mcav, also feel free to steal review if you come across this before :asuth, should be fairly easy r+ either way.
Comment on attachment 8481959 [details] [review] GitHub pull request r=asuth. I also triggered another 2 Gij runs since it was red thanks to tests that clearly aren't email's fault. Hopefully one of them comes up green.
Attachment #8481959 - Flags: review?(bugmail) → review+
I cancelled those Gij runs and rebased the patch to master since I realized the calendar failures were disabled in bug 1059159. Unfortunately I didn't have push rights for your fork so I made a rebased pull request at https://github.com/mozilla-b2g/gaia/pull/23542 so we can hopefully get a green run off of that. You're already a collaborator on my gaia fork so feel free to land and delete the branch if I forget about it, etc., but I should be around for a while tonight so I can also land.
Merged to master: https://github.com/mozilla-b2g/gaia/commit/3ef7886e15f2be9ea6240e09335ab3a746858c41 from pull request: https://github.com/mozilla-b2g/gaia/pull/23542 There is still one Gij failure, but it is calendar, and could not be remotely caused by this `|| ''` changeset inside email, and fixing the email upgrade path before branch time is more important.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
[Environment] Gaia 944e5b4582c4efa1b67cd33245dbb8f6aa25d09f Gecko https://hg.mozilla.org/releases/mozilla-aurora/rev/7546fedad918 BuildID 20140914160203 Version 34.0a2 ro.build.date Fri Jun 27 15:57:58 CST 2014 ro.bootloader L1TC00011230 ro.build.version.incremental 110 [Result] PASS
Status: RESOLVED → VERIFIED
QA Whiteboard: [COM=Gaia::E-Mail]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: