Closed Bug 1060812 Opened 10 years ago Closed 10 years ago

TypeError: contact is null: onContactRemoved@chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js:120:7 in mochitest-bc runs

Categories

(Hello (Loop) :: General, defect)

defect
Not set
normal

Tracking

(firefox34 fixed)

RESOLVED FIXED
mozilla34
Tracking Status
firefox34 --- fixed

People

(Reporter: RyanVM, Assigned: abr)

References

Details

Attachments

(1 file, 2 obsolete files)

Adam, looks like this might be your doing?

https://tbpl.mozilla.org/php/getParsedLog.php?id=47074457&tree=B2g-Inbound

17:58:50     INFO -  740 INFO TEST-START | chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js
17:58:51     INFO -  TypeError: contact is null: onContactRemoved@chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js:120:7
17:58:51     INFO -  EventEmitter_emit@resource://gre/modules/devtools/event-emitter.js:137:11
17:58:51     INFO -  LoopContactsInternal<.remove/</</request.onsuccess@resource://app/modules/loop/LoopContacts.jsm:430:11
17:58:51     INFO -  System JS : ERROR resource://app/modules/loop/LoopContacts.jsm:294 - TypeError: can't convert null to object
17:58:51     INFO -  System JS : ERROR resource://app/modules/loop/LoopContacts.jsm:719 - TypeError: contact is null
17:58:51     INFO -  System JS : ERROR resource://app/modules/loop/LoopContacts.jsm:745 - TypeError: contact is null
17:58:52     INFO -  741 INFO TEST-OK | chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js | took 1817ms
Flags: needinfo?(adam)
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #0)
> Adam, looks like this might be your doing?

Good call. Looks like I missed some returns here.
Attachment #8481824 - Flags: review?(standard8)
Assignee: nobody → adam
Status: NEW → ASSIGNED
Flags: needinfo?(adam)
Comment on attachment 8481824 [details] [diff] [review]
Stop processing when contact is not found

This definitely gets rid of a couple of errors, however running this manually in debug mode, I'm still seeing:

212 INFO TEST-PASS | chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js | There shouldn't be a contact - true == true 
TypeError: contact is null: onContactRemoved@chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js:120:7
EventEmitter_emit@resource://gre/modules/devtools/event-emitter.js:137:11
LoopContactsInternal<.remove/</</request.onsuccess@resource:///modules/loop/LoopContacts.jsm:439:11
213 INFO TEST-PASS | chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js | There shouldn't be an error - true == true 
214 INFO TEST-PASS | chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js | There shouldn't be a contact - true == true 
215 INFO Console message: [JavaScript Error: "TypeError: contact is null: onContactRemoved@chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_LoopContacts.js:120:7
EventEmitter_emit@resource://gre/modules/devtools/event-emitter.js:137:11
LoopContactsInternal<.remove/</</request.onsuccess@resource:///modules/loop/LoopContacts.jsm:439:11
" {file: "resource://gre/modules/devtools/event-emitter.js" line: 142}]
Attachment #8481824 - Flags: review?(standard8)
Good catch on the mochi test warning message needle in the haystack of output.
This patch fixes that defect, and adds information to the mochitest output to
make it easier to figure out what is going on if something breaks in the
future.
Attachment #8482376 - Flags: review?(standard8)
Attachment #8481824 - Attachment is obsolete: true
On second thought, we really shouldn't be emitting an event at all here. This is a cleaner fix.
Attachment #8482377 - Flags: review?(standard8)
Attachment #8482376 - Attachment is obsolete: true
Attachment #8482376 - Flags: review?(standard8)
Comment on attachment 8482377 [details] [diff] [review]
Stop processing when contact is not found

Review of attachment 8482377 [details] [diff] [review]:
-----------------------------------------------------------------

That's better. r=Standard8
Attachment #8482377 - Flags: review?(standard8) → review+
https://hg.mozilla.org/mozilla-central/rev/727bbb84051d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Untracked for QE -- please needinfo me to request testing.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: