Closed
Bug 1232256
Opened 10 years ago
Closed 7 years ago
Alarm fails to play because of "TypeError: alert is undefined"
Categories
(Firefox OS Graveyard :: Gaia::Clock, defect)
Tracking
(blocking-b2g:2.6?, b2g-master affected)
People
(Reporter: jlorenzo, Unassigned)
References
Details
(Keywords: foxfood)
Attachments
(1 file)
|
283.26 KB,
text/plain
|
Details |
This morning, a race condition similar to bug 1181489 made my alarm ring with 4 minutes differences.
Pre-requisites
I'm not too sure, but based on the logs (see attachment), the race condition seems easier to trigger if you have:
* a caldav calendar set up.
* a Wi-Fi connection enabled.
* the device electrically plugged.
STR
1. Set an alarm to 7:35am (6:35am UTC)
2. Wait until the alarm rings.
Results
The alarm didn't ring at 7:35, but did at 7:39.
In the logs (see attachment for the full version), you see these notable steps:
> 12-14 07:35:00.056 2727 2727 I Clock : Content JS LOG: [Clock] ### ALARM FIRED! ### Details: {"id":32254,"date":"2015-12-14T06:35:00.000Z","respectTimezone":"ignoreTimezone","data":{"id":1,"type":"normal","date":"2015-12-14T06:35:00.000Z"}}
> 12-14 07:35:00.066 318 318 I Gecko : AlarmService: Remove alarm from DB successfully.
> ...
> 12-14 07:35:00.136 318 318 I GeckoDump: [system] [AppWindow][Clock][AppWindow_19][90264.683] [cwf] handling mozbrowseropenwindow
> ...
> 12-14 07:35:00.436 318 318 I GeckoDump: [system] [AttentionWindow][clock.gaiamobile.org][AttentionWindow_56][90264.985] Registered alarm audio channel
> ...
> 12-14 07:35:00.446 318 318 I Gecko : AlarmService: receiveMessage(): AlarmsManager:Remove
> 12-14 07:35:00.446 318 318 I Gecko : AlarmService: remove(32254, app://clock.gaiamobile.org/manifest.webapp)
> 12-14 07:35:00.446 318 318 I Gecko : AlarmService: _removeAlarmFromDb()
> 12-14 07:35:00.466 318 318 I Gecko : AlarmService: Callback after removing alarm from database.
> 12-14 07:35:00.466 318 318 I Gecko : AlarmService: Current alarm: {"date":"2015-12-14T06:39:05.502Z","ignoreTimezone":true,"data":{"type":"sync"},"pageURL":"app://calendar.gaiamobile.org/index.html","manifestURL":"app://calendar.gaiamobile.org/manifest.webapp","timezoneOffset":-60,"id":32263,"alarmFiredCb":null}
> ...
> 12-14 07:39:05.128 318 318 I GeckoDump: [system] [AttentionWindow][clock.gaiamobile.org][AttentionWindow_56][90509.668] aria-hidden on browser element:false
> 12-14 07:39:05.978 318 318 I GeckoDump: [system] [AudioChannelService][90510.526] Playing AttentionWindow_56_alarm
It looks like the alarm was on the edge of playing the ringtone file, but got removed before it did play.
Build info (latest available dogfood)
Build ID 20151130132746
Gaia Revision 702773bee0b70e479ccebe5e061f571e977bc376
Gaia Date 2015-11-30 02:51:04
Gecko Revision https://hg.mozilla.org/mozilla-central/rev/a18630f9ab42ddfde03ba8c7757a42069c48c7ed
Gecko Version 45.0a1
Device Name aries
Firmware(Release) 4.4.2
Firmware(Incremental) eng.naoki.20151007.074137
Firmware Date Wed Oct 7 07:41:46 PDT 2015
Bootloader s1
| Reporter | ||
Comment 1•10 years ago
|
||
[Blocking Requested - why for this release]: Race condition that may be hard to reproduce (like bug 1181489), but its impact will hurt users' trust.
blocking-b2g: --- → 2.6?
Summary: Right after being correctly fired, mozAlarm mixed 2 alarms before → Right after being correctly fired, mozAlarm mixed 2 alarms that prevented the clock from ringing
| Reporter | ||
Updated•10 years ago
|
Keywords: foxfood
OS: Unspecified → Gonk (Firefox OS)
Hardware: Unspecified → ARM
Version: 38 Branch → 45 Branch
| Reporter | ||
Comment 2•10 years ago
|
||
I don't think bug 1232363 is related: The regression happened on Dec 11th, whereas the build I have is from November 30th. On the second hand, bug 1232363 mentions that no sound is made at all, however my phone doesn't show any sound problem, except this single time.
See Also: 1232363 →
| Reporter | ||
Comment 3•10 years ago
|
||
(In reply to Johan Lorenzo [:jlorenzo] (QA) from comment #1)
> [Blocking Requested - why for this release]: Race condition that may be hard
> to reproduce (like bug 1181489), but its impact will hurt users' trust.
In the past 2 weeks, I encountered this issue 3 times (still the same build as comment 0). So, this problem happens more often than bug 1181489 used to.
Updated•10 years ago
|
Component: DOM → DOM: Device Interfaces
Comment 4•10 years ago
|
||
From the log, it appears some time of bug in the clock app was triggered and that this is not a mozAlarms problem:
12-14 07:35:00.836 2727 2727 E Clock : [JavaScript Error: "TypeError: alert is undefined" {file: "app://clock.gaiamobile.org/js/onring.js" line: 1138}]
12-14 07:35:00.836 2727 2727 E Clock : RingView.prototype.refreshDisplay@app://clock.gaiamobile.org/js/onring.js:1138:1
12-14 07:35:00.836 2727 2727 E Clock : _setMozHour12@app://clock.gaiamobile.org/gaia_build_defer_onring.js:247:75
12-14 07:35:00.836 2727 2727 E Clock : req.onsuccess@app://clock.gaiamobile.org/gaia_build_defer_onring.js:247:333
12-14 07:35:00.856 318 318 I GeckoDump: DeveloperHUD: [app://clock.gaiamobile.org/manifest.webapp] Error (content javascript): "TypeError: alert is undefined" in app://clock.gaiamobile.org/js/onring.js:1138:1
The unhappy line of code seems to be the last line in here:
===
/**
* Update the display to show the currently active alert. If there
* are a stack of alerts pending, only the most recent alert is
* shown, as added to this.alerts by this.addAlert().
*/
refreshDisplay: function() {
// First, silence any existing sound or vibration. If a previous
// alarm was going off, this alarm may have different settings.
// The new alarm will replace any prior settings.
this.silence();
var alert = this.alerts[0];
// Set the label (blank or falsey becomes a default string).
if (alert.label) {
===
Component: DOM: Device Interfaces → Gaia::Clock
Product: Core → Firefox OS
Version: 45 Branch → unspecified
Comment 5•10 years ago
|
||
Elaborating: The clock app appears to be woken up correctly at 7:35. Since your device was plugged in per comment 0, this wasn't a wakelock problem. The mozAlarm activity at 7:39 seems to be just the calendar app doing its thing. The fact that this caused the alarm go off I would assume has to do with the clock alarm API getting poked by the window manager doing things as the clock app was launched. However, this is a fairly cursory investigation... I think :mcav or some other generous clock person needs to dig into the log a little more to understand.
Summary: Right after being correctly fired, mozAlarm mixed 2 alarms that prevented the clock from ringing → Alarm fails to play because of "TypeError: alert is undefined"
Comment 6•10 years ago
|
||
Hey Marcus, maybe you could have a look ? This is a central functionality :/
Flags: needinfo?(m)
Updated•9 years ago
|
Flags: needinfo?(m)
Comment 7•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•