Closed Bug 1191461 Opened 9 years ago Closed 9 years ago

TelemetryReportingPolicy::get dataSubmissionPolicyNotifiedDate - Invalid date stored

Categories

(Toolkit :: Telemetry, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Iteration:
43.1 - Aug 24
Tracking Status
firefox40 --- unaffected
firefox41 --- wontfix
firefox42 --- fixed
firefox43 --- fixed

People

(Reporter: sebastian, Assigned: gfritzsche)

References

Details

(Whiteboard: [unifiedTelemetry] [uplift5])

Attachments

(2 files)

Every now and then I'm seeing this error in my log on a Nexus 9 (Android 5.1.1):

08-03 12:23:58.464    2738-2783/org.mozilla.fennec_sebastian E/GeckoConsole﹕ [JavaScript Error: "1438597438463	Toolkit.Telemetry	ERROR	TelemetryReportingPolicy::get dataSubmissionPolicyNotifiedDate - Invalid date stored." {file: "resource://gre/modules/Log.jsm" line: 749}]

The clock of the device seems to be correct and is set to update automatically from the network.
This is a logcat dump that contains the error.
It looks like this could have been from bug 1137355. Georg, what do you think?
Flags: needinfo?(gfritzsche)
Yes, that would be from bug 1137355.

From the code, this might come up if the data choices bar was not accepted yet for that profile:
https://dxr.mozilla.org/mozilla-central/rev/0876695d1abdeb363a780bda8b6cc84f20ba51c9/toolkit/components/telemetry/TelemetryReportingPolicy.jsm#186

Previously, this would just fall back to returning a default date (from Date(0)):
https://dxr.mozilla.org/mozilla-central/rev/0876695d1abdeb363a780bda8b6cc84f20ba51c9/services/datareporting/policy.jsm?offset=0#346

From a quick look, making TelemetryReportingPolicy default to that too should work out fine.
Flags: needinfo?(gfritzsche)
Blocks: 1122482
Lets just trivially handle when the pref is not set yet. Margaret, do you mind reviewing?
Attachment #8648738 - Flags: review?(margaret.leibovic)
Assignee: nobody → gfritzsche
Status: NEW → ASSIGNED
Iteration: --- → 43.1 - Aug 24
Component: General → Telemetry
Product: Firefox for Android → Toolkit
Whiteboard: [unifiedTelemetry]
Comment on attachment 8648738 [details] [diff] [review]
Don't report an error if the dataSubmissionPolicyNotifiedTime pref was not set yet

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

LGTM.
Attachment #8648738 - Flags: review?(margaret.leibovic) → review+
https://hg.mozilla.org/mozilla-central/rev/73cc12636227
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Comment on attachment 8648738 [details] [diff] [review]
Don't report an error if the dataSubmissionPolicyNotifiedTime pref was not set yet

Approval Request Comment
[Feature/regressing bug #]:
Unified Telemetry
[User impact if declined]:
Simple fix that gets rid of a logged error where we shouldnt log any.
This potentially impacts engineering and QA.
[Describe test coverage new/current, TreeHerder]:
Automation coverage.
[Risks and why]:
Low-risk, trivial change and fine on Nightly.
[String/UUID change made/needed]:
None.
Attachment #8648738 - Flags: approval-mozilla-aurora?
Whiteboard: [unifiedTelemetry] → [unifiedTelemetry] [uplift5]
Comment on attachment 8648738 [details] [diff] [review]
Don't report an error if the dataSubmissionPolicyNotifiedTime pref was not set yet

Sure, let's take it.
Attachment #8648738 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 1205833
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: