Closed Bug 1208478 Opened 9 years ago Closed 9 years ago

JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}

Categories

(Firefox OS Graveyard :: Gaia::System::Status bar, Utility tray, Notification, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gerard-majax, Assigned: zbraniecki)

References

Details

(Keywords: regression)

Attachments

(1 file)

Reproduced after I have updated my dogfooding build:

> 09-25 15:50:17.058   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:50:17.058   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:50:17.058   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:50:17.058   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:50:17.058   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:50:17.058   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:50:42.008   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:52:34.328   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]
> 09-25 15:52:34.328   321   321 E GeckoConsole: [JavaScript Error: "TypeError: timestamps[i] is undefined" {file: "app://system.gaiamobile.org/js/notification_screen.js" line: 377}]

I don't know the consequences. Seems to be coming from bug 1203348.
Flags: needinfo?(gandalf)
Ugh, seems like my fault. Sorry!

Taking!
Assignee: nobody → gandalf
:gerard-majax - do you have any STRs, or does it happen instantly?
Comment on attachment 8666042 [details] [review]
[gaia] zbraniecki:1208478-spelling-in-timestamp-formatting > mozilla-b2g:master

Tim, can you give ma a quick review of that?

I made a mistake in my update timestamp formatting code and the `i` variable was not pointing to the correct timestamp in an array.

This code switches that away from live array and properly uses forEach and fat arrow functions instead.
Flags: needinfo?(gandalf)
Attachment #8666042 - Flags: review?(timdream)
Comment on attachment 8666042 [details] [review]
[gaia] zbraniecki:1208478-spelling-in-timestamp-formatting > mozilla-b2g:master

Trying  different reviewer to offload Tim a bit :)
Attachment #8666042 - Flags: review?(timdream) → review?(apastor)
Comment on attachment 8666042 [details] [review]
[gaia] zbraniecki:1208478-spelling-in-timestamp-formatting > mozilla-b2g:master

r=me with the console.log removed and a unit test verifying this change. Thanks!
Attachment #8666042 - Flags: review?(apastor) → review+
Commit: https://github.com/mozilla-b2g/gaia/commit/83133b63021fe53d43c415b0eb2e791bc26509bf
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: