Closed Bug 1188947 Opened 5 years ago Closed 5 years ago

Add setting to control crash reporting in settings

Categories

(Firefox for iOS :: General, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: rnewman, Assigned: sleroux)

References

Details

Attachments

(1 file)

We can't upload crash reports without user opt-in. That means a checkbox somewhere (in Settings, presumably), and perhaps UI at point of crash (not possible?) or first run after crash.
Flags: needinfo?(randersen)
tracking-fxios: --- → ?
I suggest prompting at next launch after crash.
Yes, first run after crash. What is the sending method? Backend or email attachment?

S/would we be able to offer a choice?
[Send once][Always send][Cancel]
or simply
[Send Crash Report][Cancel]
Flags: needinfo?(randersen) → needinfo?(rnewman)
It's uploaded directly, not via email.

Yes, I think we can offer a choice. There'll be no significant context, and no user initiation, so presumably "Don't send" makes more sense than "Cancel"…?

If we offer Always Send, we'll need a toggle somewhere to allow for the user to change her mind, right?
Flags: needinfo?(rnewman)
It would be nice to offer the choice so it just happens in the background. Less complaints overall that way, too, since they are aware of the crash but don't have to do anything about it.

[Don't send] does make more sense. 

Yes, there would need to be a toggle in Settings.
OK, proposed strings:


    Oops! Firefox crashed

    Send a crash report so Mozilla can fix the problem?

    [ Send Report ]
    [ Always Send ]
    [ Don't Send  ]


then under Privacy


    Send Crash Reports             [  ()]


Tweak away, wordsmith.

Do we want a [ Never Send ]?

I worry that a silent shutdown crash will cause this popup every time, and a user will keep having to say no. (We could also count how many times they say no consecutively, and just stop asking after 3 or 4…)
Sure, [ Never Send ] would now work with a toggle, so they could option Always or Never, or each time with it enabled and [ Send ] chosen. 

The strings are fine with me.
Created a separate bug for adding a prompt after the app crashes for the first time https://bugzilla.mozilla.org/show_bug.cgi?id=1189411. Leaving this to be the bug that tracks adding the setting to the settings screen.
Assignee: nobody → sleroux
Summary: Add setting to control crash reporting → Add setting to control crash reporting in settings
First part: Adding the settings toggle
Attachment #8641231 - Flags: ui-review?(randersen)
Attachment #8641231 - Flags: review?(rnewman)
Comment on attachment 8641231 [details] [review]
PR https://github.com/mozilla/firefox-ios/pull/834

Naming tweak and making sure we catch in the right places.
Attachment #8641231 - Flags: review?(rnewman) → feedback+
Attachment #8641231 - Flags: ui-review?(randersen) → ui-review+
Alright - I've made some changes that make it a little more clear and reliable

1. Updated the prefs key to use crashreports.send.always in case we need to add additional keys later.
2. The lack of existence of this key will start the crash reporter but NOT upload anything. This state means the user has not been prompted yet to ask if they want to send their reports so we want to make sure we catch any crashes that could occur.
3. If the key is TRUE, we will start and turn on uploads
4. If the key is FALSE, the crash reporter is never started
5. I've added additional abstraction by adding a CrashReporter protocol that allows me to create a mock version for a unit test to check for the changes in state. 
6. The configureCrashReporter method now has a public and project scope variant that is global. The project scoped method uses the active crash reporter while the public version allows us to inject a mocked version into the method.
Status: NEW → ASSIGNED
Attachment #8641231 - Flags: feedback+ → review+
Blocks: 1189902
Merged.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.