Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23985] Windows: Failed to capture photo error thrown when taking a zoomed in photo

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNot Our Bug
Resolution Date2016-11-03T06:38:57.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.1.0
ComponentsWindows
Labelsqe-6.0.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2016-10-05T09:41:14.000+0000
Updated2017-02-03T21:29:47.000+0000

Description

Description

When taking a photo, if the user zooms in before taking the photo then when taking the photo an error will be thrown, "code":-1,"error":"Failed to capture photo","success":false. There is another error thrown while capturing the photo but it displays too quick to be read and is not logged to the console.
function showCamera() {
        Titanium.Media.showCamera({
            success : function(event) {
                // called when media returned from the camera
                Ti.API.debug('Photo taken successfully');
            },
            cancel : function() {
                // called when user cancels taking a picture
                Ti.API.debug('Photo cancelled.');
            },
            error : function(error) {
                Ti.API.debug('Photo errored.');
                // called when there's an error
                var a = Titanium.UI.createAlertDialog({
                    title : "Camera"
                });
                a.setMessage(JSON.stringify(error));
                a.show();
            },
            saveToPhotoGallery : true
        });
    }
if (Ti.Media.hasCameraPermissions()) {
    showCamera();
} else {
    Ti.Media.requestCameraPermissions(function(e) {
        if (e.success === true) {
            showCamera();
        } else {
            alert("Access denied, error: " + e.error);
        }
    });
}

Steps to reproduce

Add the above code to an existing app.js

Build to Windows appc run -p windows -T wp-device

Zoom in with the camera

Take a photo

Actual result

"code":-1,"error":"Failed to capture photo","success":false is thrown

Expected result

Photo should be taken

Attachments

FileDateSize
wp_ss_20161103_0001.png2016-11-03T06:34:24.000+0000375352

Comments

  1. Kota Iguchi 2016-10-20

    I was not able to reproduce this issue on my Windows 10 mobile device (Katana01 FTJ152E). [~eharris] Can you provide more info, such as spec or model name of your device?
  2. Ewan Harris 2016-10-21

    [~kota] I'm using Lumia 550 running 10.0.14393.321 [specs here](http://www.gsmarena.com/microsoft_lumia_550-7612.php) seem to be pretty close to what I can find for the Katana01 device you have. Unfortunately this is the only device I have access to (my Lumia 930 died) so I can't check any others
  3. Kota Iguchi 2016-11-03

    I would resolve this as "Not Our Bug", because I noticed it happens when I zoom the built-in "Camera" app which Microsoft provides. !wp_ss_20161103_0001.png|thumbnail! Interestingly this does not happen when I use camera from Titanium app. Because Titanium just uses the same camera component that Camera app uses, I would resolve this as bug of the built-in Camera component.
  4. Samir Mohammed 2017-02-03

    Closing ticket as it is marked as "Not Our Bug"

JSON Source