Nativescript-camera crashes



Background: I have been working on an app to take a picture and save it to publishing this on a server

Issue: At the beginning, I used Playground, but although I could take the picture, the system never gave me the option to save or use it (only return to the app after taking the picture). After some research and testing, I thought: “Maybe it is because the app is running on the Playground/Preview app”. So I decided to create the app in Sidekick, build in the cloud and run it on the device. Nevertheless, the behavior is the same. :frowning:

Version & details:
Sidekick: 1.9.1-v.2018.4.23.1 (latest)
TNS CLI: 4.0.0
Plugin nativescript-camera: 4.0.2 (latest)
Permissions: android.permission.CAMERA
Hardware acceleration: Enabled
Device: Sony Model D2306
Android version: 5.1.1


<Page class="page"

    <ActionBar class="action-bar">
        <Label class="action-bar-title" text="Home"></Label>

    <Button text="Take picture" tap="tapAction" />

JS (main file)

var camera = require("nativescript-camera");

var imageModule = require("ui/image");

exports.tapAction = function () {
    console.log ("click on button take...");
                .then(function (imageAsset) {
                    console.log("Result is an image asset instance");
                    var image = new imageModule.Image();
                    image.src = imageAsset;
                }).catch(function (err) {
                    console.log("Error -> " + err.message);
    ).catch(function (errP) {
        console.log("Error Permissions -> " + err.message);

const HomeViewModel = require("./home-view-model");

function onNavigatingTo(args) {
    const page = args.object;
    page.bindingContext = new HomeViewModel();

exports.onNavigatingTo = onNavigatingTo;


click on button take…
home-page.js:20 Error -> cancelled

I am stuck!
Can someone see an error in the code or versions? or Can someone can let me know how can I catch the issue to fix it?

Any help is welcome.
Thanks in advanced