Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 71016 articles
Browse latest View live

[ERROR] An error occurred while running subprocess cordova

$
0
0

@PritisD wrote:

while running build command ionic cordova build android --verbose I am getting an error for Cordova due to I am not able to build apk of android

No scripts found for hook "after_compile".
No scripts found for hook "after_build".
[ERROR] An error occurred while running subprocess cordova.

        cordova build android --verbose exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
  ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
  ionic:cli-framework:utils:process onBeforeExit handler: running 2 queued functions +1ms
  ionic:cli-framework:utils:process error while killing process tree for 25976: { Error: Command failed: taskkill /pid 25976 /T /F
  ionic:cli-framework:utils:process ERROR: The process "25976" not found.
  ionic:cli-framework:utils:process
  ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:275:12)
  ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
  ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
  ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:925:16)
  ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  ionic:cli-framework:utils:process   killed: false,
  ionic:cli-framework:utils:process   code: 128,
  ionic:cli-framework:utils:process   signal: null,
  ionic:cli-framework:utils:process   cmd: 'taskkill /pid 25976 /T /F' } +200ms
  ionic:cli-framework:utils:process Error from function 0 in exit queue: { Error: Command failed: taskkill /pid 25976 /T /F
  ionic:cli-framework:utils:process ERROR: The process "25976" not found.
  ionic:cli-framework:utils:process
  ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:275:12)
  ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
  ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
  ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:925:16)
  ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  ionic:cli-framework:utils:process   killed: false,
  ionic:cli-framework:utils:process   code: 128,
  ionic:cli-framework:utils:process   signal: null,
  ionic:cli-framework:utils:process   cmd: 'taskkill /pid 25976 /T /F' } +9ms
  ionic:cli-framework:utils:process error while killing process tree for 26156: { Error: Command failed: taskkill /pid 26156 /T /F
  ionic:cli-framework:utils:process ERROR: The process "26156" not found.
  ionic:cli-framework:utils:process
  ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:275:12)
  ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
  ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
  ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:925:16)
  ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  ionic:cli-framework:utils:process   killed: false,
  ionic:cli-framework:utils:process   code: 128,
  ionic:cli-framework:utils:process   signal: null,
  ionic:cli-framework:utils:process   cmd: 'taskkill /pid 26156 /T /F' } +165ms
  ionic:cli-framework:utils:process Error from function 1 in exit queue: { Error: Command failed: taskkill /pid 26156 /T /F
  ionic:cli-framework:utils:process ERROR: The process "26156" not found.
  ionic:cli-framework:utils:process
  ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:275:12)
  ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
  ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
  ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:925:16)
  ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  ionic:cli-framework:utils:process   killed: false,
  ionic:cli-framework:utils:process   code: 128,
  ionic:cli-framework:utils:process   signal: null,
  ionic:cli-framework:utils:process   cmd: 'taskkill /pid 26156 /T /F' } +5ms
  ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +6ms

Details
ionic -v : 4.1.2
cordova -version : 7.1.0

Posts: 1

Participants: 1

Read full topic


didRangeBeaconsInRegion returns a empty beacons array

$
0
0

@asimo35 wrote:

Hello there,I’m using ionic ibeacon library to detect beacons.My app is working on couple devices I have tested but it doesnt find beacons in one device .It has location permission like as the other devices.But it always return an empty beacons array. ( device is asus zenphone 3 laser ,android 7.1.1 and bluetooth is working )

import { Injectable } from ‘@angular/core’;
import { Platform, Events } from ‘ionic-angular’;
import { IBeacon } from “@ionic-native/ibeacon”;

@Injectable()
export class BeaconProvider {
delegate: any;
region: any;
constructor(
public platform: Platform,
public events: Events,
private iBeacon: IBeacon
) { this.initialise(); }

initialise(): any {
let promise = new Promise((resolve, reject) => {
if (this.platform.is(“cordova”)) {
// Request permission to use location on iOS
this.iBeacon.requestAlwaysAuthorization();
// create a new delegate and register it with the native layer
this.delegate = this.iBeacon.Delegate();
// this.iBeacon.locationManager.setDelegate(delegate);
// Subscribe to some of the delegate’s event handlers
this.delegate.didRangeBeaconsInRegion().subscribe(
data => {
this.events.publish(“didRangeBeaconsInRegion”, data);
console.log(“didRangebeacons__” + JSON.stringify(data)); // empty beacons array
},
error => console.error()
);
// setup a beacon region 8ce8e4a6-5fb0-4cd3-ba1a-214adac9f6da
this.region = this.iBeacon.BeaconRegion(“deskBeacon”, “e2c56db5-dffb-48d2-b060-d0f5a71096e0”);
// start ranging
this.iBeacon
.startRangingBeaconsInRegion(this.region)
.then(
() => {
resolve(true);
},
error => {
console.error("Failed to begin monitoring: ", error);
resolve(false);
}
);
} else {
resolve(false);
}
});

return promise;

}
}

Posts: 1

Participants: 1

Read full topic

I frame problum

[Ionic 4] How to apply Ion-title text-wrap and ion-tabs icon size?

$
0
0

@suyogN wrote:

I am using ionic 4 and I am facing some issues:

  1. My ion-header > ion-title is too long then, I need to do text-wrap for two line header.
  2. I am trying to change icon size but I could not change it because of, shadow-root

Please give me the solution if any.

Posts: 1

Participants: 1

Read full topic

Autocomplete on Ionic 3 PWA doesn't work

$
0
0

@kwanite wrote:

I have a login form built with Ionic 3. When I upload it on Firebase as a PWA, I wish users to be able to save their passwords and sign in using saved passwords but autosaved passwords work neither on Safari nor on Chrome although I turned autocomplete=on in ion-input fields.

Below is my HTML code:

<ion-content>
    <div style="margin-top: 20px; margin-bottom: 20px">
        <ion-grid>
            <ion-row align-items-center>
                <ion-col align-self-center>
                    <div class="centering">
                        <img class="iconSmall" src="assets/imgs/iconSmall.png">
                        <p class="title">Log into your account</p>
                    </div>
                    <form [formGroup]="user" (ngSubmit)="loginUser(user)">
                        <ion-list>

                            <ion-item>
                                <ion-label floating>Email</ion-label>
                                <ion-input type="text" formControlName="email" autocomplete="on"></ion-input>
                            </ion-item>
                            <ion-item *ngIf="!user.controls.email.valid && user.controls.email.dirty" no-lines>
                                <p>Please enter a valid email address.</p>
                            </ion-item>
                            <ion-item>
                                <ion-label floating>Password</ion-label>
                                <ion-input type="password" formControlName="password" autocomplete="on"></ion-input>
                            </ion-item>
                            <ion-item *ngIf="!user.controls.password.valid && user.controls.password.dirty" no-lines>
                                <p>Password must have at least 6 characters.</p>
                            </ion-item>
                        </ion-list>
                        <div style="text-align: center;">
                            <button ion-button type="submit" [disabled]="user.invalid" color="primary" style="width: 90%;  font-weight: bold;">log in</button>
                        </div>
                    </form>
                    <div class="forgotButton" (click)="goToResetPassword()">
                        <p>Forgot your password?</p>
                    </div>

                </ion-col>
            </ion-row>
        </ion-grid>
    </div>


</ion-content>

And on the .ts file of the form I use the following relevant code:

import { Component } from '@angular/core';
import { IonicPage, NavController, Loading, LoadingController, Alert, AlertController } from 'ionic-angular';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { EmailValidator } from './../../validators/email';


@IonicPage()
@Component({
  selector: 'page-member-login',
  templateUrl: 'member-login.html',
})
export class MemberLoginPage {
  user : FormGroup;   //define the variable to contain form group
  public loading: Loading; 

  constructor(public navCtrl: NavController, 
              private fb: FormBuilder,
              public loadingCtrl:LoadingController,
              public alertCtrl: AlertController,
              public authProvider:AuthProvider) {

    this.user = this.fb.group ({
       email: ['', EmailValidator.isValid],
      password: ['', [Validators.minLength(6), Validators.required]],
    })
  };


loginUser(): void {
  // login code goes here
};




goToResetPassword():void{
  this.navCtrl.push('ResetPasswordPage');
};

}

export interface User {
  email: string;
  password: string;
}

What can I change in the code to make sure autosaved passwords appear and are usable when users come in the second time? Here is the complete error:

  1. The browser asks if I want to save password. I say “yes”.
  2. Next time I sign in, the username and password appears in the bar on the keyboard.
  3. When I click on the username, it doesn’t fill in the form fields.

This is for PWA. I use:

ionic build – --prod

And upload the www files to firebase using

firebase deploy

Posts: 1

Participants: 1

Read full topic

ISSUE with Leaflet Map - Dragging

$
0
0

@jorgster wrote:

Hello dear Ionic Community,
Thanks for all the help recently - it’s been amazing.

I’ve got a new issue. I’ve implemented the Leaflet map and it works great, EXCEPT when I try to pan the map by dragging it, on mobile, it stutters and pans just a little bit - if it even pans.

Anyone else experiencing this?
My initiation of the map.

  ionViewDidEnter() {
    //Below is where I initiate the map.
    this.map = L.map('mapId2', {
      center: this.location,
      zoom: 14,
      zoomAnimation: false,
      fadeAnimation: false,
      easeLinearity: 0.5,
      tap: true,
      touchZoom: false,
      dragging: true,
      renderer: L.canvas()
    });

Tried to follow this, but cannot seem to know what animate option to implement or what option I should use.

Need your help dear community!

Posts: 1

Participants: 1

Read full topic

Disable a button on condition

$
0
0

@uddyvky wrote:

Hi all I’m stuck in a situation and need help.
What I’m trying to do is I want to disable the button if the application status is approved or rejected and enable if the status is pending, but unable to do so…
Ant help is appreciated.

<ion-content>
 <ion-card *ngFor="let obj of responseObj;">
   <ion-list>
     <ion-item>
        User: {{obj.uid}}
     </ion-item>
     <ion-item>
        Status: {{obj.Status}}
     </ion-item>
     <ion-item>
        Approved/Rejected By: {{obj.ApprovedBy}}
     </ion-item>
     <div style="text-align: center">
        <button ion-button [disabled]="!isenabled" (click)="appRej(obj.id, obj.uid, obj.type, obj.SataDate, obj.EndDate, obj.reason, obj.Status)">Approve/Reject</button>
     </div>
    

   </ion-list>
 </ion-card>
</ion-content>

ts:

ionViewDidLoad() {
    this.http.get("http://api.leave_dtls.php").subscribe(data => {
      console.log("Got Leave List");
      this.data = data.json();
      var response = JSON.parse(data["_body"]);
      this.responseObj = response.response_data;
      console.log(this.responseObj.itemStatus);
      
      for (var i = 0; i < this.responseObj.length; i++) {
        console.log(this.responseObj[i].Status);
      if(this.responseObj[i].Status == 'PENDING'){
        this.isenabled = true;
      }
      else{
        this.isenabled = false;
      }
    }
    });
  }

Posts: 1

Participants: 1

Read full topic

Ionic 4 Browser Support?

$
0
0

@Munn wrote:

Hi I would like to start giving Ionic4 a trial however (forgive me if im being blind) I cant find anywhere which lists the supported browsers for WebApps, Mainly Internet Explorer 10 / 11 or is only edge / chrome / ff / safari supported?

Obviously angular applications can run on IE10 and above with the appropriate pollyfills.

Posts: 1

Participants: 1

Read full topic


This page can't load google maps correctly error

$
0
0

@sahanpasindu wrote:

Hello…!

I am getting error like “This page can’t load google maps correctly” in my once page in my project. 1st of all i show my console details,
I have activated my project on console and i have correctly copy past my code from the console

I past script code to my index.html file like this

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="UTF-8">
  <title>Ionic App</title>
  <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">

  <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
  <link rel="manifest" href="manifest.json">
  <meta name="theme-color" content="#4e8ef7">

  <!-- add to homescreen for ios -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">

  <!-- cordova.js required for cordova apps (remove if not needed) -->
  <script src="cordova.js"></script>

  <!-- un-comment this code to enable service worker
  <script>
    if ('serviceWorker' in navigator) {
      navigator.serviceWorker.register('service-worker.js')
        .then(() => console.log('service worker installed'))
        .catch(err => console.error('Error', err));
    }
  </script>-->

  <link href="build/main.css" rel="stylesheet">

</head>
<body>

  <!-- Ionic's root component and where the app will load -->
  <ion-app></ion-app>

  <!-- The polyfills js is generated during the build process -->
  <script src="build/polyfills.js"></script>

  <!-- The vendor js is generated during the build process
       It contains all of the dependencies in node_modules -->
  <script src="build/vendor.js"></script>

  <!-- The main bundle js is generated during the build process -->
  <script src="build/main.js"></script>
    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBa6gYiA16ORJpAm3Q-eXt6######"></script> <!-- hide my last few codes :D -->
</body>
</html>

And this is my control ts file.

import {Component, ViewChild} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';

/**
 * Generated class for the ContactPage page.
 */

@IonicPage()
@Component({
    selector: 'page-contact',
    templateUrl: 'contact.html',
})
export class ContactPage {
    @ViewChild("map") mapElement;
    map : any;

    constructor(public navCtrl: NavController, public navParams: NavParams) {
    }
    ngOnInit() {
        console.log('ionViewDidLoad ContactPage');
        this.initMap();
    }
    initMap(){
        let cords = new google.maps.LatLng(6.123166174,81.120666184);
        let mapOpt : google.maps.MapOptions = {
            center : cords,
            zoom : 12,
            mapTypeId : google.maps.MapTypeId.ROADMAP
        };

        this.map = new google.maps.Map(this.mapElement.nativeElement,mapOpt);
       let marker : google.maps.Marker = new google.maps.Marker({
            map: this.map, position: cords})
    }

}

Those are the my target lang and lat coordinates 6.123166174 81.120666184

And this is my view html codes

<!--
  Generated template for the ContactPage page.
-->
<ion-header>
    <ion-navbar>
        <ion-title>Contact Us</ion-title>
    </ion-navbar>
</ion-header>

<ion-content padding>
    <div #map id="map" class="google-map"></div>
</ion-content>

Terminal show me those error

[app-scripts] ‘marker’ is declared but its value is never read.
[app-scripts] L31: this.map = new google.maps.Map(this.mapElement.nativeElement,mapOpt);
[app-scripts] L32: let marker : google.maps.Marker = new google.maps.Marker({
[app-scripts] L33: map: this.map, position: cords})

Browser console show me this error

You have exceeded your request quota for this API. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors
_.Yb @ js?key=AIzaSyBa6gYiA16ORJpAm3Q-eXt6iq#######:40

Please somebody help me solve this issue :neutral_face:

Posts: 1

Participants: 1

Read full topic

Ionic Slides - 2 slide on per view

Braintree payment gateway

Date Picker upon fab pressing

$
0
0

@wrafie wrote:

I want a date picker pop up to come out when a button is pressed. That pop up will be a tabbed page with: from and to, these two tab. Each tab will represent a calendar date picker. When the date is selected. ok button is clicked and the tabbed page closes. But the main page that contains the button remains in the background always. how can I do this in ionic?
Here is what I’m trying to do:

Posts: 1

Participants: 1

Read full topic

Fetching data map error!

$
0
0

@endpuppet wrote:

Hi!

I am trying to fetch data from github api as written in a tutorial, but I am running into an error:

TypeError: Cannot read property ‘map’ of undefined

I don’t know why but for a few times it worked, but then it stopped and when built it does not render the page at all.

Here is the code:

import { Component, State } from '@stencil/core';

@Component({
  tag: 'app-coin-list',
  styleUrl: 'app-coin-list.css'
})
export class AppCoinList {

@State() users : Array<any>;

componentWillLoad() {
  let url = 'https://api.github.com/users';
  fetch(url).then(response => {
    response.json().then(json => {
      this.users = json;
      console.log(this.users)
    });
  });
}

  render() {
    return [
      <ion-header>
        <ion-toolbar color="primary">
          <ion-buttons slot="start">
            <ion-back-button defaultHref="/" />
          </ion-buttons>
          <ion-title>CoinList</ion-title>
        </ion-toolbar>
      </ion-header>,

      <ion-content padding color="primary">


        <ion-list lines="full">
          {this.users.map(user =>
            <ion-item color="secondary">
              <ion-label>{user.login}</ion-label>
            </ion-item>
          )}
        </ion-list>

      </ion-content>
    ];
  }
}

Also… this does not work when using for example coinmarketcap api which returns nested array. How would I go about using that?

Thank you
leon

Posts: 1

Participants: 1

Read full topic

Http request - connection lost while waiting for response

$
0
0

@Vartex05 wrote:

Hi, i am working on App, that works as some kind of mobile cash desk - cashier just selects items from the list and these items are added to customers account, or customer pays with cash.
App is sending data to ASP.NET SOAP API, which saves transaction in database. When the transaction is saved, it responds OK, so that apps now, that everything was processed correctly.
The problem is, that the request sometimes takes 2-3s before the response comes back. How can i handle cases, when there is problem with internet connection? What if i for example lost connection when the request was already received, but the response never comes because of bad internet/wifi connection?
I need to be sure, if transaction was processed and saved to database or not.
Any ideas how to solve this problem?

Posts: 1

Participants: 1

Read full topic

Ionic Pro Build Fails without error message

$
0
0

@ISG wrote:

We’re having trouble building our app on Ionic Pro. We had a version that built in the past but now the build fails without an actual error log. The text below is the entire log from Ionic Pro when it tries to build the app. The app builds on my local machine without any problems but it won’t get past here on Ionic Pro. Please could I get some advice on where to look for the problem, or how to log out more information. Thanks.

Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
  on ip-10-2-78-129 (c9648220)
Using Shell executor...
Running on ip-10-2-78-129...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/c9648220/0/project-0'...

Posts: 1

Participants: 1

Read full topic


No provider for NavParams!

$
0
0

@karthikcp wrote:

Hi, I created a basic tabbed application using :
ionic start myApp tabs --type=angular

My home.page.ts has :

import { Component } from '@angular/core';
import { TestPage } from '../test/test.page';
import { NavController, NavParams  } from '@ionic/angular';
@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss']
})
export class HomePage {
  constructor(public navCtrl: NavController, public navParams: NavParams) {}
  hello(){
    //this.presentAlert();
    //console.log("sdsadsadasdasdsadasdsad");
      this.navCtrl.navigateForward('/test');
  }
}

But i am getting the error as :

Uncaught (in promise): Error: StaticInjectorError(AppModule)[HomePage -> NavParams]: StaticInjectorError(Platform: core)[HomePage -> NavParams]: NullInjectorError: No provider for NavParams!

How to fix this:

my Ionic version is 4.0.0 beta 7

Posts: 1

Participants: 1

Read full topic

How to get geolocation of app users?

How to run the DECRYPT method using the Android Fingerprint Auth plugin

$
0
0

@estacho999 wrote:

Hello everybody, good morning everyone Does anyone know how to work with this plugin? How to get a decrypt of key stored after authentication made by biometrics in android?

Currently using the encrypt method, until I can capture the key, however I need to get the PASSWORD property, which I read in the documentation is possible only by the decrypt method.

The problem is, I run the decrypt function, as it says in the documentation, and it just does not open the dialog, could someone give me an attention, if possible with a certain URGENCY?

MEU TS :

fazerPonto(){
this.androidFingerprintAuth.isAvailable()
.then((result)=> {
if(result.isAvailable){
this.androidFingerprintAuth.decrypt({ clientId: ‘myAppName’, username: ‘currentUser’, password: ‘base64encodedUserCredentials’ })
.then(result => {
if (result.withFingerprint) {
console.log(‘Successfully encrypted credentials.’);
if (result.password){
console.log("password: " + result.password);
}
} else if (result.withBackup) {
console.log(‘Successfully authenticated with backup password!’);
} else console.log(‘Didn’t authenticate!’);
})

  .catch(error => {
     if (error === this.androidFingerprintAuth.ERRORS.FINGERPRINT_CANCELLED) {
       console.log('Fingerprint authentication cancelled');
     } else console.error(error)
  });

} else {
// fingerprint auth isn’t available
}
})
.catch(error => console.error(error));

Posts: 1

Participants: 1

Read full topic

Unable to run app after instalation cordova-plugin-ionic for live updates

$
0
0

@mcihak wrote:

Hi there,
I just got this error when I run the app: Unhandled Promise rejection: Cannot read property 'getServerBasePath' of undefined.

I only installed cordova-plugin-ionic.

Thanks for any help.

Posts: 1

Participants: 1

Read full topic

How to Create Video Player app

Viewing all 71016 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>