Closed
Bug 824190
Opened 12 years ago
Closed 12 years ago
[email] once attachments are downloaded, the file size shows NaN
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect, P3)
Tracking
(blocking-basecamp:+)
People
(Reporter: nhirata, Assigned: asuth)
Details
Attachments
(3 files)
## Environment :
Unagi phone, build 2012-12-21
## Repro :
1. send yourself an email with a picture or two or 5...
2. open email w/ email account associated
3. download the picture
4. go back to the main list of emails
5. go back to the email with the picture
## Expected :
1. filesize still shows
## Actual :
1. NaN appears as the file size
## Note :
1. probably should suggest some sort of feedback saying that the attachment had been downloaded as well (separate bug?)
| Assignee | ||
Comment 1•12 years ago
|
||
adb logcat needed: https://wiki.mozilla.org/Gaia/Email/RequiredBugInfo
This may be ActiveSync only; please try and repro on IMAP.
Keywords: qawanted
| Reporter | ||
Comment 2•12 years ago
|
||
It's activesync only.
| Reporter | ||
Comment 3•12 years ago
|
||
actually I was mistaken. It happens on both imap and activesync.
| Reporter | ||
Comment 4•12 years ago
|
||
Meh. I posted the logcat, but I should have checked it before posting it to verify that the pref was set. I'll have to redo it.
| Assignee | ||
Comment 5•12 years ago
|
||
The log is fine; there's GeckoDump and GeckoConsole stuff in there.
=== A concerning truncated bit is:
12-26 12:04:00.407: I/GeckoDump(2148): ERR: onerror reporting: Error: Problem handling message type: sliceSplice Error: onsplice notification error T
ypeError: message.subject is null
12-26 12:04:00.407: I/GeckoDump(2148): displaySubject@app://email.gaiamobile.org/js/message-cards.js:24
12-26 12:04:00.407: I/GeckoDump(2148): MessageListCard.prototype.updateMessageDom@app://email.gaiamobile.org/js/message-cards.js:605
12-26 12:04:00.407: I/GeckoDump(2148): MessageListCard.prototype.onMessagesSplice/<@app://email.gaiamobile.org/js/message-cards.js:575
12-26 12:04:00.407: I/GeckoDump(2148): MessageListCard.prototype.onMessagesSplice@app://email.gaiamobile.org/js/message-cards.js:569
12-26 12:04:00.407: I/GeckoDump(2148): ma__recv_sliceSplice@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:2031
12-26 12:04:00.407: I/GeckoDump(2148): ma___bridgeReceive@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:1954
12-26 12:04:00.407: I/GeckoDump(2148): createBridgePair/TMB.__sendMessage/<@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:37533
12-26 12:04:00.407: I/GeckoDump(2148): handleMessage@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:686
12-26 12:04:00.407: I/GeckoDump(2148):
12-26 12:04:00.407: I/GeckoDump(2148): reportError@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:1794
12-26 12:04:00.407: I/GeckoDump(2148): ma__recv_sliceSplice@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:2035
12-26 12:04:00.407: I/GeckoDump(2148): ma___bridgeReceive@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:1954
12-26 12:04:00.407: I/GeckoDump(2148): createBridgePair/TMB.__sendMessage/<@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:37533
12-26 12:04:00.407: I/GeckoDump(2148): handleMessage@app://email.gaiamobile.org/js/ext/gaia-email-opt.js:686
12-26 12:04:00.407: I/GeckoDump(2148): @ app://email.gaiamobile.org/js/ext/gaia-email-opt.js : 1794
=== The relevant bit looks to be:
2-26 12:05:47.482: I/GeckoDump(2148): LOG: runOp(do: {"type":"download","longtermId":"0/8","lifecycle":"do","localStatus":"done","serverStatus":"doing","tryCount":0,"humanOp":"download","messageSuid":"0/0/30","mes)
12-26 12:05:48.633: I/GeckoDump(2148): WAR: failed to save attachment to pictures bug.gif type: image/gif
12-26 12:05:48.713: I/GeckoDump(2148): LOG: saved attachment to pictures bug-1356552348648.gif type: image/gif
12-26 12:05:53.277: I/GeckoDump(2148): ERR: onerror reporting: TypeError: attachment._file is null @ app://email.gaiamobile.org/js/message-cards.js : 1269
12-26 12:05:53.287: E/GeckoConsole(2148): [JavaScript Error: "TypeError: attachment._file is null" {file: "app://email.gaiamobile.org/js/message-cards.js" line: 1269}]
12-26 12:06:10.654: I/GeckoDump(2148): ERR: onerror reporting: TypeError: attachment._file is null @ app://email.gaiamobile.org/js/message-cards.js : 1269
12-26 12:06:10.654: E/GeckoConsole(2148): [JavaScript Error: "TypeError: attachment._file is null" {file: "app://email.gaiamobile.org/js/message-cards.js" line: 1269}]
12-26 12:06:12.266: I/GeckoDump(2148): LOG: runOp(local_do: {"type":"download","longtermId":"0/9","lifecycle":"do","localStatus":"doing","serverStatus":null,"tryCount":0,"humanOp":"download","messageSuid":"0/0/30","messa)
12-26 12:06:12.266: I/GeckoDump(2148): LOG: runOp(do: {"type":"download","longtermId":"0/9","lifecycle":"do","localStatus":"done","serverStatus":"doing","tryCount":0,"humanOp":"download","messageSuid":"0/0/30","mes)
12-26 12:06:13.627: I/GeckoDump(2148): WAR: failed to save attachment to pictures Triple-Spiral-Labyrinth-animated.gif type: image/gif
12-26 12:06:13.697: I/GeckoDump(2148): LOG: saved attachment to pictures Triple-Spiral-Labyrinth-animated-1356552373632.gif type: image/gif
| Assignee | ||
Comment 6•12 years ago
|
||
This has apparently been going on forever; a Blob's length is stored in "size", not "length". We update it after the download completes because, at least for IMAP, the file size is just an estimate until we have actually downloaded and decoded the file.
I added unit test coverage that ensures that the attachment size is correct after we download the attachment. The test failed before the fix, succeeds after it.
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
Attachment #696625 -
Flags: review?(squibblyflabbetydoo)
| Assignee | ||
Updated•12 years ago
|
blocking-basecamp: --- → ?
Updated•12 years ago
|
blocking-basecamp: ? → +
Priority: -- → P3
Target Milestone: --- → B2G C4 (2jan on)
| Assignee | ||
Comment 7•12 years ago
|
||
landed on gaia-email-libs-and-more/master:
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/107
landed on gaia/master:
https://github.com/mozilla-b2g/gaia/pull/7275
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 9•12 years ago
|
||
Comment on attachment 696625 [details] [review]
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/107
Marking r+ since I forgot to do so on the bug (but already did over on github).
Attachment #696625 -
Flags: review?(squibblyflabbetydoo) → review+
Updated•12 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in
before you can comment on or make changes to this bug.
Description
•