Closed Bug 796664 Opened 14 years ago Closed 14 years ago

[email] setting up ActiveSync hotmail account through the mobile network hangs

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ghtobz, Unassigned)

Details

(Whiteboard: [label:email])

[GitHub issue by nhirata on 2012-09-17T19:29:33Z, https://github.com/mozilla-b2g/gaia/issues/4824] ## Environment : Otoro phone, build 2012-09-17 Taken from default.xml in b2g-distro: * "platform_build" revision= 1532e3d7099724a8701da220ce29e705a33f78eb * "gaia" revision= 97a730d0457c62a5811198cd9ae1f758bcfbb715 * "mozilla-central" revision= d3bb93eead1bdd12d0596dc52a20c813287449b8 * "gonk-misc" revision= 9daac8b6ffb4215779c64d2f91ea383e6648fa62 ## Repro : 1. do not setup wifi, have a sim card installed. 2. launch email 3. setup email with valid hotmail username/account ## Expected : 1. eventually the mail account sets up. ## Actual : 1. I gave up after 5 minutes. It's still stuck on the Please wait while I setup your account.
[GitHub comment by nhirata on 2012-09-17T19:33:27Z] Note: if you try to join a wifi while the email is still progressing, (8 minutes) it will still not use the wifi. You have to kill the app and reenter the information.
[GitHub comment by asutherland on 2012-09-17T19:42:21Z] I've retitled this to express that we actually hang/fail rather than taking a long time. I assume this is a case of an error being swallowed rather than an actual timeout, but @mozsquib, does our XHR logic have a timeout constraint?
[GitHub comment by asutherland on 2012-09-17T19:42:43Z] @nhirata did anything show up in the logcat for the device?
[GitHub comment by mozsquib on 2012-09-17T19:52:55Z] We don't currently time out. I suppose we should. What's a good timeout?
[GitHub comment by nhirata on 2012-09-17T20:39:11Z] @asutherland , I think it might be a 2 part thing. If you turn wifi off, you get an error message. There's also a need for a timeout. Should we split this into two bugs or do you want to handle both in this bug? 09-17 19:34:19.704: I/IdleService(436): Get idle time: time since reset 15 msec 09-17 19:34:19.704: I/IdleService(436): Idle timer callback: current idle time 15 msec 09-17 19:34:19.704: I/IdleService(436): next timeout 1347910460694453 usec (984 msec from now) 09-17 19:34:19.704: I/IdleService(436): SetTimerExpiryIfBefore: next timeout 1347910460694453 usec 09-17 19:34:19.704: I/IdleService(436): reset timer expiry from 0 usec to 1347910460704453 usec 09-17 19:34:19.914: E/GeckoConsole(436): [JavaScript Error: "NS_ERROR_NOT_INITIALIZED: Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" {file: "jar:file:///system/b2g/omni.ja!/components/WifiWorker.js" line: 1952}] 09-17 19:34:20.405: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:143360 offset:1478656 fd:208 09-17 19:34:20.615: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:307200 offset:7520256 fd:370 09-17 19:34:20.625: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:143360 offset:3457024 fd:418 09-17 19:34:20.625: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:143360 offset:7827456 fd:423 09-17 19:34:20.635: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4aeec000 size:143360 offset:3457024 fd:418 09-17 19:34:20.635: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4ad09000 size:143360 offset:1478656 fd:208 09-17 19:34:20.635: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b208000 size:368640 offset:6717440 fd:413 09-17 19:34:20.645: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b1ae000 size:368640 offset:6348800 fd:408 09-17 19:34:20.685: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:307200 offset:6348800 fd:208 09-17 19:34:20.685: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:339968 offset:6656000 fd:408 09-17 19:34:20.695: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b1ae000 size:307200 offset:6348800 fd:208 09-17 19:34:20.695: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b2cc000 size:307200 offset:7520256 fd:370 09-17 19:34:20.705: I/IdleService(436): Get idle time: time since reset 202 msec 09-17 19:34:20.705: I/IdleService(436): Idle timer callback: current idle time 202 msec 09-17 19:34:20.705: I/IdleService(436): next timeout 1347910461505732 usec (797 msec from now) 09-17 19:34:20.705: I/IdleService(436): SetTimerExpiryIfBefore: next timeout 1347910461505732 usec 09-17 19:34:20.705: I/IdleService(436): reset timer expiry from 0 usec to 1347910461515732 usec 09-17 19:34:20.705: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b317000 size:143360 offset:7827456 fd:423 09-17 19:34:20.735: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:339968 offset:7520256 fd:208 09-17 19:34:20.825: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:339968 offset:7860224 fd:370 09-17 19:34:20.825: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b2cc000 size:339968 offset:7520256 fd:208 09-17 19:34:21.206: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b1f9000 size:339968 offset:6656000 fd:408 09-17 19:34:21.216: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b31f000 size:339968 offset:7860224 fd:370 09-17 19:34:21.506: I/IdleService(436): Get idle time: time since reset 1012 msec 09-17 19:34:21.506: I/IdleService(436): Idle timer callback: current idle time 1012 msec 09-17 19:34:21.506: I/IdleService(436): next timeout 1347910760505732 usec (298987 msec from now) 09-17 19:34:21.506: I/IdleService(436): SetTimerExpiryIfBefore: next timeout 1347910760505732 usec 09-17 19:34:21.506: I/IdleService(436): reset timer expiry from 0 usec to 1347910760515732 usec 09-17 19:34:21.506: I/IdleService(436): Idle timer callback: tell observer 43f776f0 user is idle 09-17 19:34:21.506: I/IdleService(436): Get idle time: time since reset 1012 msec 09-17 19:34:21.696: E/GeckoConsole(436): [JavaScript Error: "not well-formed" {file: "app://email.thisdomaindoesnotexist.org/index.html" line: 2 column: 45 source: "<!-- PreprocessInfo: BTSA007:RR1BLDA112, -- Version: 13,500,20764,0 -->"}] 09-17 19:34:23.498: E/GeckoConsole(436): CC(T+771.9) duration: 18ms, suspected: 385, visited: 1603 RCed and 1319 GCed, collected: 8 RCed and 0 GCed (8 waiting for GC) 09-17 19:34:23.498: E/GeckoConsole(436): ForgetSkippable 5 times before CC, min: 1 ms, max: 6 ms, avg: 2 ms, total: 12 ms, removed: 1077 09-17 19:34:24.889: E/GeckoConsole(436): [JavaScript Error: "no element found" {file: "https://m.hotmail.com/Microsoft-Server-ActiveSync" line: 1}] 09-17 19:34:27.362: I/GeckoDump(436): [32mLOG: Added folder Inbox (1/0)[0m 09-17 19:34:27.382: I/GeckoDump(436): [32mLOG: Added folder Drafts (1/1)[0m 09-17 19:34:27.392: I/GeckoDump(436): [32mLOG: Added folder Junk (1/2)[0m 09-17 19:34:27.392: I/GeckoDump(436): [32mLOG: Added folder Trash (1/3)[0m 09-17 19:34:27.402: I/GeckoDump(436): [32mLOG: Added folder Sent (1/4)[0m 09-17 19:34:27.422: I/GeckoDump(436): [32mLOG: Synced folder list[0m 09-17 19:34:27.482: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:307200 offset:6348800 fd:342 09-17 19:34:27.502: D/memalloc(436): /dev/pmem: Allocated buffer base:0x4aba0000 size:307200 offset:6656000 fd:407 09-17 19:34:27.912: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b1f9000 size:307200 offset:6656000 fd:407 09-17 19:34:27.912: D/memalloc(436): /dev/pmem: Freeing buffer base:0x4b1ae000 size:307200 offset:6348800 fd:342 09-17 19:34:28.713: I/IdleService(436): next timeout 1347910469722651 usec (999 msec from now) 09-17 19:34:28.713: I/IdleService(436): SetTimerExpiryIfBefore: next timeout 1347910469722651 usec 09-17 19:34:28.713: I/IdleService(436): reset timer expiry from 1347910760515732 usec to 1347910469732651 usec 09-17 19:34:28.713: I/IdleService(436): Reset idle timeout: tell observer 43f776f0 user is back 09-17 19:34:28.973: I/GeckoDump(436): [32mLOG: accuracy ranges length: 0[0m 09-17 19:34:28.973: I/GeckoDump(436): [32mLOG: accumulate request false[0m 09-17 19:34:28.973: I/GeckoDump(436): [32mLOG: IGNORING HEADER NOTIFICATIONS[0m
[GitHub comment by nhirata on 2012-09-17T20:56:21Z] I came to realize something. I didn't have data connection turned on. It should timed out for this, thought. With data connection turned on it takes a little longer, but it does setup the account. logcat does not show the error message of : NS_ERROR_NOT_INITIALIZED.
[GitHub comment by mozsquib on 2012-09-17T21:37:28Z] What happens when you try this for an IMAP account?
[GitHub comment by tonychung on 2012-09-18T20:50:42Z] > What happens when you try this for an IMAP account? i tried this with Gmail, using an invalid email/password combination. It just sits forever, trying to connect, and never times out.
[GitHub comment by asutherland on 2012-09-18T21:15:01Z] gmail is actually ActiveSync too.
[GitHub comment by mozsquib on 2012-09-18T21:55:49Z] That's mozilla-b2g/gaia-email-libs-and-more#40 (which will have a corresponding issue/PR in gaia momentarily). EDIT: and that's pushed to gaia/master now.
[GitHub comment by mozsquib on 2012-09-18T22:21:30Z] Specifically, what I'm wondering is if the IMAP/SMTP probers bail out if they detect that we're not online. We try no matter what for ActiveSync, but I could add a check for the online state before we run autodiscovery. I just want to make sure I'm adding the check at the appropriate level in the code. @asutherland?
[GitHub comment by asutherland on 2012-09-18T22:31:14Z] @mozsquib They do not (other than via failure handling.) I would add the online check in mailuniverse.js in tryToCreateAccount and just have it fast-path a return invocation of the callback that passes the 'offline' error. There is no need for every prober to check the connection status themselves.
[GitHub comment by mozsquib on 2012-09-18T22:33:59Z] One downside of doing this is that we won't be able to make fake accounts while offline (though this isn't a big downside, really).
[GitHub comment by asutherland on 2012-09-18T23:01:56Z] That's a fair point, but fake accounts are so limited in their capabilities and fake-ness that I think they should be generally removed from the system anyways. I depend on my hacked up messageGenerator.js in fake/account.js for some unit tests, however, so don't actually remove that file yet. I think the idea of fake accounts is still pretty useful for demo purposes, etc., but just having a simple VM that runs dovecot with a simple XHR-accessible API that provisions accounts by rsync-ing an example mail hierarchy over is probably the best way to accomplish that.
[GitHub comment by mozsquib on 2012-09-28T01:51:03Z] @nhirata, Can you try this with a current build? PR #5325 probably fixed this, or at least improved our situation.
Component: Gaia → Gaia::E-Mail
(In reply to GH to BZ from comment #15) > [GitHub comment by mozsquib on 2012-09-28T01:51:03Z] > @nhirata, Can you try this with a current build? PR #5325 probably fixed > this, or at least improved our situation.
Flags: needinfo?(nhirata.bugzilla)
WFM on today's build. 10/10/2012
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: needinfo?(nhirata.bugzilla)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.