Closed Bug 1402609 Opened 7 years ago Closed 7 years ago

Empty fields on about:support probably because of invalid header in experiments.json file

Categories

(Toolkit :: Telemetry, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- ?
firefox58 --- fixed

People

(Reporter: marco, Assigned: gfritzsche)

Details

Attachments

(2 files)

When I open about:support, the structure of the page is there, but all the fields are empty.

There's the following exception in the browser console:
> Error: uncaught exception: Invalid header (no magic number) - Data: C\Users\Marco\AppData\Roaming\Mozilla\Profiles\fv9zh0no.default-1387804988712\experiments.json
Component: Untriaged → General
Does this still happen for you Marco? It WFM on Mac and Win10.
Flags: needinfo?(mcastelluccio)
Yes, I can still reproduce (not in a new profile, only in my used profile).
Flags: needinfo?(mcastelluccio)
Interesting, thanks. Georg, have you ever seen any error like in Comment #0?
Flags: needinfo?(gfritzsche)
I can reproduce an equivalent error using: echo "foo" > $PROFDIR/experiments.json
I think this is unlikely to be a regression. That file could be in a bad state for multiple reasons (disk/fs issues, crash while writing it, ...).

From looking at the code that fills out about:support:
https://dxr.mozilla.org/mozilla-central/rev/19b32a138d08f73961df878a29de6f0aad441683/toolkit/modules/Troubleshoot.jsm#143
... turns out, if any of the providers there doesn't invoke the "done" callback, about:support won't render anything.
If `Experiments.getExperiments()` fails/rejects, about:support will never render:
https://dxr.mozilla.org/mozilla-central/rev/19b32a138d08f73961df878a29de6f0aad441683/toolkit/modules/Troubleshoot.jsm#320

Moving on to Experiments.jsm... when loading of experiments.json fails, we only recover gracefully if it was because the file didn't exist:
https://dxr.mozilla.org/mozilla-central/rev/19b32a138d08f73961df878a29de6f0aad441683/browser/experiments/Experiments.jsm#1043
The proper solution there seems to be to always recover gracefully as we can't fix broken experiments.json files.
Assignee: nobody → gfritzsche
Component: General → Telemetry
Flags: needinfo?(gfritzsche)
Priority: -- → P1
Product: Firefox → Toolkit
Felipe, can you review this part? I see you in the log as a past reviewer.
Attachment #8915951 - Flags: review?(felipc)
This fixes the Experiments.jsm part, to make it recover gracefully when we are unable to load the cache file.
Attachment #8915952 - Flags: review?(alessio.placitelli)
Attachment #8915952 - Flags: review?(alessio.placitelli) → review+
Attachment #8915951 - Flags: review?(felipc) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ea78aa38c05
Part 1: Fix missing rejection handling in Troubleshoot.jsm. r=felipe
https://hg.mozilla.org/integration/mozilla-inbound/rev/934f0c1076f5
Part 2: Make Experiments.jsm recover from unloadable manifest cache. r=Dexter
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: