Closed Bug 1031588 Opened 10 years ago Closed 10 years ago

[B2G][Email]Back arrow on 'New Account' page does not function after deleting two email acccounts

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v1.4 affected, b2g-v2.0 affected, b2g-v2.1 affected)

VERIFIED FIXED
2.0 S5 (4july)
Tracking Status
b2g-v1.4 --- affected
b2g-v2.0 --- affected
b2g-v2.1 --- affected

People

(Reporter: astole, Assigned: jrburke)

References

()

Details

Attachments

(2 files)

Attached file logcat
If the user is logged into two or more e-mail accounts and they are all deleted, when the 'New Account' page is opened there is a back arrow but tapping it does not do anything. This doesn't occur if there is only one account that is deleted.

Repro Steps:
1) Update a Flame to BuildID: 20140627040205
2) Launch the Email app
3) Log into 2 or more accounts
4) Delete all accounts logged into in previous step

Actual:
Back arrow appears on 'New Account' page

Expected:
There should be no back arrow after all accounts are deleted

2.1 Environmental Variables:
Device: Flame 2.1
BuildID: 20140627040205
Gaia: b8f36518696f3191a56e4f33447ee9d6ec820da1
Gecko: 9290d7995f98
Version: 33.0a1
Firmware Version: v122

Repro frequency: 2/2, 100%
See attached: Video, logcat
Attaching video and adding qawanted to check other builds and devices.

User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
Keywords: qawanted
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
QA Contact: croesch
This bug repro's on: Flame 2.1 Master, Flame 2.0, Flame 1.4, Buri 2.1

Actual Results: Deleting two email accounts that are logged in, creates a back arrow with no functionality.

***Important***
1. Resetting phone is highly recommended if email account already exists on device.

2. When done adding first account the user MUST choose "Add Another Account" button on the Mail Account Setup screen. DO NOT choose the Continue button or this bug will NOT occur.

Environmental Variables:
Device: Flame Master
Build ID: 20140630063630
Gaia: bc3bbf42d2a606f6b7038881cff5ec3795fdf953
Gecko: 3b46de297f3f
Version: 33.0a1 (Master)
Firmware Version: v122
---------------------------------------------
Environmental Variables:
Device: Flame 2.0
Build ID: 20140630085228
Gaia: 564ab3935206a6979b317597020f47aebe8c80fe
Gecko: 7974d58adda4
Version: 32.0a2 (2.0)
Firmware Version: v122
---------------------------------------------
Environmental Variables:
Device: Flame 1.4
Build ID: 20140629211929
Gaia: aa896d5db1b4929f3bf31a0f4bb7de50530222a8
Gecko: 8cba60bc12ef
Version: 30.0 (1.4)
Firmware Version: v122
---------------------------------------------
Environmental Variables:
Device: Buri Master
Build ID: 20140630063630
Gaia: bc3bbf42d2a606f6b7038881cff5ec3795fdf953
Gecko: 3b46de297f3f
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
Keywords: qawanted
Not a regression, not device specific
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
In triaging this bug, I found the root cause:

In mail_app, the startCardArgs are reused by multiple callers, and the last arg is an object used to pass to card constructors for options. By doing choosing the "add another account" option as part of the first account setup, this caused the `allowBack
Assignee: nobody → jrburke
Status: NEW → ASSIGNED
Target Milestone: --- → 2.0 S5 (4july)
(ugh, hit wrong button while typing, continuing...)

`allowBack` option to be added to that startCardArgs object, which was then used for the `accountDeleted` pathway when setup_account_info was needed after deleting the accounts.
Attached file GitHub pull request
Use a function that returns a fresh args object for each call, instead of reusing the same array and options object for all startCardArgs uses.

Asking :mcav for review because he really enjoys bugs caused by mutable state.
Attachment #8448414 - Flags: review?(m)
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Attachment #8448414 - Flags: review?(m) → review+
Merged in master:
https://github.com/mozilla-b2g/gaia/commit/52b21688178a326becfde64e51585fb4edb59d47

from pull request:
https://github.com/mozilla-b2g/gaia/pull/21203
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
[Environment]
Gaia      0910be495385d90acdeaddbeaf1fba315aff57b0
Gecko     https://hg.mozilla.org/mozilla-central/rev/7883d8e9f210
BuildID   20140715160202
Version   33.0a1
ro.build.version.incremental=94
ro.build.date=Tue May 20 09:29:20 CST 2014


[Result]
Pass
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: