Closed
Bug 1111984
Opened 10 years ago
Closed 7 years ago
[Camera][Gaia][v2.0][v2.1] Camera app doesn't report startRecording() failures properly
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Tracking
(b2g-v2.0 affected, b2g-v2.1 affected, b2g-v2.2 unaffected)
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
b2g-v2.0 | --- | affected |
b2g-v2.1 | --- | affected |
b2g-v2.2 | --- | unaffected |
People
(Reporter: mikeh, Unassigned)
References
Details
I came across this while backporting the fix in bug 1104055 to v2.0 and v2.1.
The onRecordingError handler in v2.0[1] looks for an error message of "FAILURE", and upon seeing it, maps it to the i10n key "error-recording-title" and "-text". This API hasn't returned "FAILURE" since April -- bug 985496 made the error reporting more expressive.
It looks like v2.1 has the same problem[2].
Master has the same code[3] but it's is effectively dead code, since the rejection of the Promise (new to master) returned by startRecording() always invokes the handler with a default error[4].
1. https://github.com/mozilla-b2g/gaia/blob/v2.0/apps/camera/js/lib/camera/camera.js#L1073
2. https://github.com/mozilla-b2g/gaia/blob/v2.1/apps/camera/js/lib/camera/camera.js#L1091
3. https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/lib/camera/camera.js#L1130
4. https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/lib/camera/camera.js#L977
With the patches in bug 985496 and bug 1104055, startRecording() can report the following errors (all string values):
- InvalidArgument
- NotAvailable
- NotImplemented
- HardwareClosed
- OutOfMemory
- GeneralFailure
At this point it's (very probably) too late to provide support for better error reporting in v2.0 and (maybe) v2.1. I've tagged this bug as 'minor' since the Camera app doesn't tend to hit recording errors these days; but a simple fix is to map thes above values to 'error-recording-*' to report the generic failure message.
Comment 1•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•