[SMS API] Retrieve a 'sent' message show field 'sender' as 'undefined' STRING, not undefined

RESOLVED FIXED in Firefox 18

Status

()

defect
P1
normal
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: mossop, Assigned: fabrice)

Tracking

({b2g-testdriver, unagi})

unspecified
B2G C2 (20nov-10dec)
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed, firefox20 fixed)

Details

Attachments

(2 attachments)

This used to work but since I updated today I can no longer delete sms messages. I hit edit, then select all, then press delete and nothing happens.
Gregor, could the DB upgrade have affected this?
(In reply to Chris Jones [:cjones] [:warhammer] from comment #1)
> Gregor, could the DB upgrade have affected this?

I can't see how the DB upgrade is related to this but I will try to reproduce.
It works for me on unagi with mc and gaia tip.
I tried with an old DB that triggers the upgrade code but I can still delete the messages afterwards on current mc and gaia tip.
I just deleted a few SMSes about jury duty from my dogfooding unagi that went through the upgrade.  I probably broke the law, but the messages are gone.
blocking-basecamp: ? → +
Priority: -- → P2
WORKFORME
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
just ran into this testing it with cjones :-)  sorry david... must be some race condition...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Milestoning for C2 (deadline of 12/10), as this meets the criteria of "known P2 bugs found before or during C1".
Target Milestone: --- → B2G C2 (20nov-10dec)
Assignee: nobody → fbsc
It's working for me (Today BUILD, latest in Gaia, Unagi device). Could you check it again?
(In reply to Borja Salguero [:borjasalguero] from comment #8)
> It's working for me (Today BUILD, latest in Gaia, Unagi device). Could you
> check it again?

This is an intermittent bug :( We should try to get a logcat when it happens again.
Tested with the Unagi build
    * Gecko-67437dc
    * Gaia-92b7a95

and works fine for me. I was able to delete two different messages from differente conversations.
In order to reproduce the bugs is useful add the TIP of the build. If this information is not provided developers and Qa can't reproduce the same environment.
(In reply to mbarone from comment #11)
> In order to reproduce the bugs is useful add the TIP of the build. If this
> information is not provided developers and Qa can't reproduce the same
> environment.

Can you explain what a TIP is?
Component: Gaia → Gaia::SMS
[:jsmith] This is working properly. Nothing changes in SMS from one week and a half ago. Could you recheck again? 

For me it's working. Build 11/22, Otoro, Latest Gaia.
Assignee: fbsc → nobody
Component: Gaia::SMS → DOM: Device Interfaces
OS: Windows 7 → Gonk (Firefox OS)
Product: Boot2Gecko → Core
Hardware: x86_64 → ARM
We have changed due to we have discovered what it's happening. The bug is in Gecko, when sending a SMS. Scenario:
- Send a SMS to phone number 123123123
- 'message.sender' is null

+ EXPECTED: SMS DB should store null/undefined

+ CURRENTLY: SMS DB is storing "undefined" as a STRING. So when SMS App is checking the following line:
var num =  message.sender || message.receiver;
SENDER is not undefined (is a STRING), so we are not rendering properly the thread.

+ SOLUTION: Store undefined properly in DB
Summary: Can't delete sms messages → [SMS API] Retrieve a 'sent' message show field 'sender' as 'undefined' STRING, not undefined
Depends on: 815596
Assignee: nobody → fabrice
Raised priority to P1 since this is blocking a smoketest blocker (bug 815470)
Priority: P2 → P1
I haven't looked at the special problem here but from reading comment 14 I remember having similar problems with contacts. This is an XPCOM/IDL problem. When you have a callback function defined in IDL like foo(in DOMString arg1) and you call it with foo(null), the argument in the callback function will hold 'undefined'.

I know it's ugly but the right fix is a === 'undefined' check.
Gregor is right, I checked that we store |undefined| in the DB when sending the SMS.

Borja, can you fix that on the gaia side with the === 'undefined' hack?
So, Borja fixed this one in bug 815596. I don't know if we'll have a fix for the xpconnect underlying issue in time for v1 though, so I'm tempted to close this one.
I fixed one, but due to this bug is open we are having a lot of issues in SMS App:
https://bugzilla.mozilla.org/show_bug.cgi?id=815470

This bug should be fixed asap in order to make our SMS App (or future SMS Apps) work properly! So we cant  close this one because is not fixed.
I will try to fast track fixing the gecko bug, but you should not wait on that.
Posted patch TestSplinter Review
I've done this quick modification of the already existing SMS xpcshell tests just to confirm the xpconnect issue mentioned above.

If I am not wrong, a quick temporary solution would be passing 'null' instead of 'undefined' while creating the SMS objects.
Posted patch patchSplinter Review
Workaround in the sms db implementation. The root issue is in the RIL though. Sigh...
Attachment #686522 - Flags: review?(ferjmoreno)
Attachment #686522 - Flags: review?(ferjmoreno) → review+
https://hg.mozilla.org/mozilla-central/rev/5b625f3f1fe5
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.