Closed Bug 1154902 Opened 10 years ago Closed 10 years ago

TelemetryEnvironment::error while initializing: TypeError: this._currentEnvironment.profile is undefined (resource://gre/modules/TelemetryEnvironment.jsm:835:6)

Categories

(Toolkit :: Telemetry, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox38 --- unaffected
firefox39 --- fixed
firefox40 --- fixed

People

(Reporter: snorp, Assigned: Dexter)

References

Details

Attachments

(1 file, 1 obsolete file)

Saw the following in logcat today: I/Gecko (11680): ************************* I/Gecko (11680): A coding exception was thrown and uncaught in a Task. I/Gecko (11680): I/Gecko (11680): Full message: TypeError: this._currentEnvironment.profile is undefined I/Gecko (11680): Full stack: EnvironmentCache.prototype._updateProfile<@resource://gre/modules/TelemetryEnvironment.jsm:835:7 I/Gecko (11680): TaskImpl_run@resource://gre/modules/Task.jsm:314:40 I/Gecko (11680): Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:867:23 I/Gecko (11680): this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:746:7 I/Gecko (11680): this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:688:37 I/Gecko (11680): Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:688:5 I/Gecko (11680): this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:709:7 I/Gecko (11680): this.PromiseWalker.completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:671:7 I/Gecko (11680): onSuccess@resource://gre/modules/osfile/osfile_native.jsm:63:7 I/Gecko (11680): I/Gecko (11680): ************************* W/GeckoConsole(11680): [JavaScript Error: "1429130020022 Toolkit.Telemetry ERROR TelemetryEnvironment::error while initializing: TypeError: this._currentEnvironment.profile is undefined (resource://gre/modules/TelemetryEnvironment.jsm:835:6) JS Stack trace: EnvironmentCache.prototype._updateProfile<@TelemetryEnvironment.jsm:835:7 < TaskImpl_run@Task.jsm:314:40 < Handler.prototype.process@Promise-backend.js:867:23 < this.PromiseWalker.walkerLoop@Promise-backend.js:746:7 < this.PromiseWalker.scheduleWalkerLoop/<@Promise-backend.js:688:37 < Promise*this.PromiseWalker.scheduleWalkerLoop@Promise-backend.js:688:5 < this.PromiseWalker.schedulePromise@Promise-backend.js:709:7 < this.PromiseWalker.completePromise@Promise-backend.js:671:7 < onSuccess@osfile_native.jsm:63:7" {file: "resource://gre/modules/Log.jsm" line: 749}] D/GeckoHardwareUtils(11680): HardwareUtils already inited.
Blocks: 1120356
This happens because in [1] we don't guard the _updateProfile call with |#ifndef MOZ_WIDGET_ANDROID| as we did on line 656. [1] - https://hg.mozilla.org/mozilla-central/annotate/53ceefb0e1c8/toolkit/components/telemetry/TelemetryEnvironment.jsm#l664
Attached patch bug1154902.patch (obsolete) — Splinter Review
This prevents profile data updates in Telemetry on Android.
Attachment #8593838 - Flags: review?(gfritzsche)
Comment on attachment 8593838 [details] [diff] [review] bug1154902.patch Review of attachment 8593838 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/telemetry/TelemetryEnvironment.jsm @@ +663,5 @@ > > + this._initTask = Promise.all([this._addonBuilder.init(), > +#ifndef MOZ_WIDGET_ANDROID > + this._updateProfile(), > +#endif This is hard to read. Please use a temporary array and .push() to it for non-android builds.
Attachment #8593838 - Flags: review?(gfritzsche)
While we are here, can you fix this log call: "TelemetryEnvironment::error while initializing" This is missing the method name.
Attachment #8593838 - Attachment is obsolete: true
Attachment #8593850 - Flags: review?(gfritzsche)
Comment on attachment 8593850 [details] [diff] [review] bug1154902.patch - v2 Review of attachment 8593850 [details] [diff] [review]: ----------------------------------------------------------------- Are we missing test-coverage here?
Attachment #8593850 - Flags: review?(gfritzsche) → review+
Assignee: nobody → alessio.placitelli
Status: NEW → ASSIGNED
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Comment on attachment 8593850 [details] [diff] [review] bug1154902.patch - v2 Approved for Aurora. For approval request see bug 1139460 comment 42. For approval comments see bug 1139460 comment 43.
Attachment #8593850 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: