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

How to remove iOS platform from Capacitor Plugin?

$
0
0

I am developing a new Capacitor plugin for communication between Android and USB device. So I don’t need iOS implementation.
Is there any way to remove iOS from plugin?
Or should I throw unimplemented error for each plugin method, as described here?

1 post - 1 participant

Read full topic


Error - Azure Notification Hub w Push Notification Ionic 5

$
0
0

In the project, I’m trying to implement azure notification hub which use capacitor push notification which i following a Github Link suggest by the Azure

The below code is the service ts which the original code can be refer with the link below.
azure-notification-hubs.service.ts

Due to it uses the capacitor v2, i did my best to convert it to the v3 cause the push notification capacitor deprecated once i copy the code, After converting, I’m facing an issue where once I run the page in myapp (IOS), it does print AzureNotificationHubsService: Platform ready which i set the console log in the code below, after that it just went error in console log which state ERROR {“rejection”:{},“promise”…

ps. I did implement the push capability which i refer this link posted by the microsoft Using Azure Notification Hubs in Apache Cordova and Ionic Apps, I also did create a custom service events for this due to the events has been removed in Ionic 5

Sorry For Bad English…

 ⚡ [log] - HomePage constructor
⚡  [log] - AzureNotificationHubsService: Platform ready
⚡  [error] - ERROR {"rejection":{},"promise":{"_zone_symbolstate":0,"zone_symbol_value":"..."},"zone":{"_parent":{"_parent":null,"_name":"<root>","_properties":{},"_zoneDelegate":{"_taskCounts":{"microTask":0,"macroTask":0,"eventTask":0},"zone":"...","_parentDelegate":"...","_forkZS":"...","_forkDlgt":"...","_forkCurrZone":"...","_interceptZS":"...","_interceptDlgt":"...","_interceptCurrZone":"...","_invokeZS":"...","_invokeDlgt":"...","_invokeCurrZone":"...","_handleErrorZS":"...","_handleErrorDlgt":"...","_handleErrorCurrZone":"...","_scheduleTaskZS":"...","_scheduleTaskDlgt":"...","_scheduleTaskCurrZone":"...","_invokeTaskZS":"...","_invokeTaskDlgt":"...","_invokeTaskCurrZone":"...","_cancelTaskZS":"...","_cancelTaskDlgt":"...","_cancelTaskCurrZone":"...","_hasTaskZS":"...","_hasTaskDlgt":"...","_hasTaskDlgtOwner":"...","_hasTaskCurrZone":"..."}},"_name":"angular","_properties":{"isAngularZone":true},"_zoneDelegate":{"_taskCounts":{"microTask":0,"macroTask":0,"eventTask":20},"zone":"...","_parentDelegate":"...","_forkZS":"...","_forkDlgt":"...","_forkCurrZone":"...","_interceptZS":"...","_interceptDlgt":"...","_interceptCurrZone":"...","_invokeZS":{"name":"angular","properties":"..."},"_invokeDlgt":"...","_invokeCurrZone":"...","_handleErrorZS":"...","_handleErrorDlgt":"...","_handleErrorCurrZone":"...","_scheduleTaskZS":{"name":""},"_scheduleTaskDlgt":"...","_scheduleTaskCurrZone":"...","_invokeTaskZS":"...","_invokeTaskDlgt":"...","_invokeTaskCurrZone":"...","_cancelTaskZS":"...","_cancelTaskDlgt":"...","_cancelTaskCurrZone":"...","_hasTaskZS":"...","_hasTaskDlgt":"...","_hasTaskDlgtOwner":"...","_hasTaskCurrZone":"..."}},"task":{"type":"microTask","state":"notScheduled","source":"Promise.then","zone":"angular","runCount":0}}
import { AlertController, Platform } from '@ionic/angular';
import { Injectable } from '@angular/core';

// use lodash to clone data objects coming from the push service
import * as _ from 'lodash';

import { 
  PushNotifications, PushNotificationsPlugin,PushNotificationSchema, Token, ActionPerformed 
} from '@capacitor/push-notifications';



// Interface(s)
import { Registration, Notification, EventType } from '../interfaces/events';
// Azure Notification Hubs configuration (in an external file)
import { config } from '../../app/config';

//import events cause ionic 5 remove event from angular which need use observable
import { Events } from '../../services/events'

//import { Plugins } from '@capacitor/core';

// Create a local object that will represent our Cordova plugin
declare let PushNotificationSchema;

// Import the Capacitor Push Plugin (PushNotification vs. PushNotifications)


@Injectable({
  providedIn: 'root'
})
export class AzureNotificationHubsService {

  // make an empty array of registrations and notifications
  public pushEvents: (Registration | Notification)[] = [];

  constructor(
    private alertCtrl: AlertController,
    private events: Events,
    private platform: Platform
  ) {
    // Wait until the container's initialized before doing anything here
    this.platform.ready().then(() => {
      console.log('AzureNotificationHubsService: Platform ready');

      // make sure the config values are set in the config.ts file.
      if (config.hubName && config.hubConnectionString) {
       
        // Initialize the Push Service
        const push = PushNotificationSchema.init({
          
          // Initialize the ANH Cordova plugin, this is required to use ANH
          // Pass in our configuration values
          notificationHubPath: config.hubName,
          connectionString: config.hubConnectionString,
          // Set some other stuff the plugin wants
          android: { sound: true },
          ios: { alert: 'true', badge: true, sound: 'false' },
          windows: {}
        });

        push.on('registration', data => {
          
          // Registration event for the ANH Cordova plugin (Capacitor has its own)
          console.log('AzureNotificationHubsService: Registration');
          console.log(data.registrationId);
          // Copy the event data into a Registration object
          const registration: Registration = _.clone(data);
          // Populate the object type
          registration.type = EventType.registration;
          // Set the title (registrations won't have one)
          registration.title = 'Registration';
          // Set the created date
          registration.received = new Date(Date.now());
          // Add the event to the events array
          this.saveData(registration);
          this.events.publish('anh: data-change');

          // Tell the user
          this.alertCtrl.create({
            header: registration.title,
            message: 'Registration completed successfully',
            buttons: ['OK']
          }).then((alert) => alert.present());
        });

        PushNotifications.addListener('registration', (token: Token) => {
          // this alert should never fire because we're not using the Capacitor plugin's
          // registration method for anything, we're doing it through Notification Hubs
          this.alertCtrl.create({
            // @ts-ignore
            header: 'Registration (Capacitor)',
            message: `Push registration success (token: ${token.value})`,
            buttons: ['OK']
          }).then((alert) => alert.present());
        });

        PushNotifications.addListener('pushNotificationReceived', (pushNotification: PushNotificationSchema) => {
          console.log('AzureNotificationHubsService: pushNotificationReceived');
          console.dir(pushNotification);
          // Populate the object type
          // @ts-ignore
          pushnotification.type = EventType.notification;
          // Set the created date
          // @ts-ignore
          pushNotification.received = new Date(Date.now());
          // convert the notification's data object into a string
          pushNotification.data = JSON.stringify(pushNotification.data);
          // Add the event to the events array
          this.saveData(pushNotification as Notification);
          this.events.publish('anh: data-change');

          // Tell the user
          this.alertCtrl.create({
            // @ts-ignore
            header: 'Notification',
            message: pushNotification.data,
            buttons: ['OK']
          }).then((alert) => alert.present());
        });

      } else {
        // Tell the user this won't work until they fix the config.
        this.alertCtrl.create({
          header: 'Invalid Configuration',
          // tslint:disable-next-line:max-line-length
          message: 'Please populate the project\'s <strong>src/app/config.ts</strong> file with settings from your Azure Notification Hubs configuration.',
          buttons: ['OK, I\'m sorry!']
        }).then((alert) => alert.present());
      }

    });
  }

  // saveData(data: Registration | Notification) {
  saveData(data: Registration | Notification) {
    console.log('AzureNotificationHubsService: saveData()');
    this.pushEvents.push(data);
    console.dir(this.pushEvents);
  }

}

1 post - 1 participant

Read full topic

Ionic bluetoothSerial problem IOS

$
0
0

I’m using the bluetoothSerial plugin to connect and receive data from a bluetooth device. While i’m testing with Android everything works fine but when i try the same thing in IOS nothing works.

My method to connect to a device is this:

this.bluetoothSerial.isEnabled().then(async res => {
      //Bluetooth encendido
      if(res){
        if(connected){
          const alert = this.alertCtrl.create({
            message: 'Desconectar',
            buttons: [
              {
                role: 'Cancel',
                text:'Cancelar'
              },
              {
                text: 'Desconectar',
                handler: () => {
                  this.bluetoothSerial.disconnect().then(() => {
                    this.bluetooth_service.connected = false;
                  });
                }
              }
            ]
          });
          (await alert).present();
        }else{
          if(this.bluetooth_service.lastDevice !== undefined){
            const loading = await this.loadingCtrl.create({
              message: 'Conectando...'
            });
            loading.present();
            this.bluetoothSerial.connect(this.bluetooth_service.lastDevice).subscribe(success => {
              console.log(success);
              this.bluetooth_service.connected = true;
              this.changes.detectChanges();
              loading.dismiss();
            }, error => {
              loading.dismiss();
              //this.showDevices();
            });
          }else{
            this.showDevices();
          }
        }
      }
    }, async error => {
      //Bluetooth apagado
      const alert = this.alertCtrl.create({
        message: 'Encienda el bluetooth para conectar',
        buttons: [
          {
            role: 'Cancel',
            text:'Aceptar'
          }
        ]
      });
      (await alert).present();
    });

In Xcode the console shows options: with all the methods as if it came empty

Any solution? Thank you!

1 post - 1 participant

Read full topic

OneSignal Sent To Specific User(Push Notification) In Ionic 5

$
0
0

I’m new to OneSignal, How am i able to sent to specific users in ionic 5 using onesignal is there any way to receive their device token so that in the back end i able to choose those users that have press the subscribe button.
For example:

  1. User press the button (the device token will sent to one signal server)
  2. Admin able to see the user that press the button and sent them the push notification

Sorry for bad english

1 post - 1 participant

Read full topic

Eslint is linting node_modules only on Ionic Project

$
0
0

I am not entirely sure if it’s related to Ionic Vue but every time I am trying to build a project for production, I keep getting lingint errors for packages within the node_modules which fails the build. This seems to be happening if I use the latest eslint with the ionic vue project and only during build. The ionic serve command runs just fine.

Yet when I use the exact same packages with just vue and not ionic, it builds for production as well (I have included the package.json of that project as well). Here is my ionic info output:

Ionic:

   Ionic CLI       : 6.16.3 (/Users/nirpan/.nvm/versions/node/v15.11.0/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/vue 5.6.13

Capacitor:

   Capacitor CLI      : 3.1.2
   @capacitor/android : not installed
   @capacitor/core    : 3.1.2
   @capacitor/ios     : 3.1.2

Utility:

   cordova-res : not installed globally
   native-run  : 1.4.0

System:

   NodeJS : v15.11.0 (/Users/nirpan/.nvm/versions/node/v15.11.0/bin/node)
   npm    : 7.6.0
   OS     : macOS Big Sur

I have created a sample repo to reproduce the issue which is linked below:

Here is the verbose output of the ionic build.

» ionic capacitor build ios --verbose
  ionic:lib Terminal info: { ci: false, shell: '/usr/local/bin/fish', tty: true, windows: false } +0ms
  ionic:lib CLI global options: { _: [ 'capacitor', 'build', 'ios' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, '--': [] } +3ms
  ionic:lib:project Project type from config: @ionic/vue (vue) +0ms
  ionic:lib:project Project details: { context: 'app', type: 'vue', errors: [], configPath: '/Users/nirpan/code/sandbox/eslint/ionic.config.json' } +0ms
  ionic Context: { binPath: '/Users/nirpan/.nvm/versions/node/v15.11.0/lib/node_modules/@ionic/cli/bin/ionic', libPath: '/Users/nirpan/.nvm/versions/node/v15.11.0/lib/node_modules/@ionic/cli', execPath: '/Users/nirpan/code/sandbox/eslint', version: '6.16.3' } +0ms
  ionic:lib:integrations:capacitor Getting config with Capacitor CLI: [ 'config', '--json' ] +0ms
  ionic:lib:integrations:capacitor Loaded Capacitor config! +422ms
  ionic:lib:build build options: {
  ionic:lib:build   '--': [],
  ionic:lib:build   engine: 'capacitor',
  ionic:lib:build   platform: 'ios',
  ionic:lib:build   project: undefined,
  ionic:lib:build   verbose: true,
  ionic:lib:build   type: 'vue'
  ionic:lib:build } +0ms
  ionic:lib:telemetry Sending telemetry for command: 'ionic capacitor build' [ 'ios', '--verbose', '--interactive', '--color' ] +0ms
  ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
  ionic:lib:build Looking for ionic:build npm script. +5ms
> vue-cli-service build
  vue:plugins [
  vue:plugins   {
  vue:plugins     id: 'built-in:commands/serve',
  vue:plugins     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins   },
  vue:plugins   {
  vue:plugins     id: 'built-in:commands/build',
  vue:plugins     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins   },
  vue:plugins   {
  vue:plugins     id: 'built-in:commands/inspect',
  vue:plugins     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins   },
  vue:plugins   { id: 'built-in:commands/help', apply: [Function (anonymous)] },
  vue:plugins   { id: 'built-in:config/base', apply: [Function (anonymous)] },
  vue:plugins   { id: 'built-in:config/assets', apply: [Function (anonymous)] },
  vue:plugins   { id: 'built-in:config/css', apply: [Function (anonymous)] },
  vue:plugins   { id: 'built-in:config/prod', apply: [Function (anonymous)] },
  vue:plugins   { id: 'built-in:config/app', apply: [Function (anonymous)] },
  vue:plugins   { id: '@vue/cli-plugin-babel', apply: [Function (anonymous)] },
  vue:plugins   {
  vue:plugins     id: '@vue/cli-plugin-e2e-cypress',
  vue:plugins     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins   },
  vue:plugins   { id: '@vue/cli-plugin-eslint', apply: [Function (anonymous)] },
  vue:plugins   { id: '@vue/cli-plugin-router', apply: [Function (anonymous)] },
  vue:plugins   { id: '@vue/cli-plugin-typescript', apply: [Function (anonymous)] },
  vue:plugins   {
  vue:plugins     id: '@vue/cli-plugin-unit-jest',
  vue:plugins     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins   }
  vue:plugins ] +0ms
  vue:plugins-ordered [
  vue:plugins-ordered   {
  vue:plugins-ordered     id: 'built-in:commands/serve',
  vue:plugins-ordered     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins-ordered   },
  vue:plugins-ordered   {
  vue:plugins-ordered     id: 'built-in:commands/build',
  vue:plugins-ordered     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins-ordered   },
  vue:plugins-ordered   {
  vue:plugins-ordered     id: 'built-in:commands/inspect',
  vue:plugins-ordered     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins-ordered   },
  vue:plugins-ordered   { id: 'built-in:commands/help', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: 'built-in:config/base', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: 'built-in:config/assets', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: 'built-in:config/css', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: 'built-in:config/prod', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: 'built-in:config/app', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: '@vue/cli-plugin-babel', apply: [Function (anonymous)] },
  vue:plugins-ordered   {
  vue:plugins-ordered     id: '@vue/cli-plugin-e2e-cypress',
  vue:plugins-ordered     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins-ordered   },
  vue:plugins-ordered   { id: '@vue/cli-plugin-eslint', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: '@vue/cli-plugin-router', apply: [Function (anonymous)] },
  vue:plugins-ordered   { id: '@vue/cli-plugin-typescript', apply: [Function (anonymous)] },
  vue:plugins-ordered   {
  vue:plugins-ordered     id: '@vue/cli-plugin-unit-jest',
  vue:plugins-ordered     apply: [Function (anonymous)] { defaultModes: [Object] }
  vue:plugins-ordered   }
  vue:plugins-ordered ] +0ms
  vue:env /Users/nirpan/code/sandbox/eslint/.env.production.local {
  error: Error: ENOENT: no such file or directory, open '/Users/nirpan/code/sandbox/eslint/.env.production.local'
      at Object.openSync (node:fs:506:3)
      at Object.readFileSync (node:fs:402:35)
      at Object.config (/Users/nirpan/code/sandbox/eslint/node_modules/dotenv/lib/main.js:96:29)
      at load (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:111:28)
      at Service.loadEnv (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:122:5)
      at Service.init (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:70:12)
      at Service.run (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:245:16)
      at Object.<anonymous> (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
      at Module._compile (node:internal/modules/cjs/loader:1092:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10) {
    errno: -2,
    syscall: 'open',
    code: 'ENOENT',
    path: '/Users/nirpan/code/sandbox/eslint/.env.production.local'
  }
} +0ms
  vue:env /Users/nirpan/code/sandbox/eslint/.env.production {
  error: Error: ENOENT: no such file or directory, open '/Users/nirpan/code/sandbox/eslint/.env.production'
      at Object.openSync (node:fs:506:3)
      at Object.readFileSync (node:fs:402:35)
      at Object.config (/Users/nirpan/code/sandbox/eslint/node_modules/dotenv/lib/main.js:96:29)
      at load (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:111:28)
      at Service.loadEnv (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:123:5)
      at Service.init (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:70:12)
      at Service.run (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:245:16)
      at Object.<anonymous> (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
      at Module._compile (node:internal/modules/cjs/loader:1092:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10) {
    errno: -2,
    syscall: 'open',
    code: 'ENOENT',
    path: '/Users/nirpan/code/sandbox/eslint/.env.production'
  }
} +456ms
  vue:env /Users/nirpan/code/sandbox/eslint/.env.local {
  error: Error: ENOENT: no such file or directory, open '/Users/nirpan/code/sandbox/eslint/.env.local'
      at Object.openSync (node:fs:506:3)
      at Object.readFileSync (node:fs:402:35)
      at Object.config (/Users/nirpan/code/sandbox/eslint/node_modules/dotenv/lib/main.js:96:29)
      at load (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:111:28)
      at Service.loadEnv (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:122:5)
      at Service.init (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:73:10)
      at Service.run (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/Service.js:245:16)
      at Object.<anonymous> (/Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
      at Module._compile (node:internal/modules/cjs/loader:1092:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10) {
    errno: -2,
    syscall: 'open',
    code: 'ENOENT',
    path: '/Users/nirpan/code/sandbox/eslint/.env.local'
  }
} +0ms
[dotenv][DEBUG] did not match key and value when parsing line 1:
  vue:env /Users/nirpan/code/sandbox/eslint/.env { parsed: {} } +1ms
  vue:project-config {
  vue:project-config   lintOnSave: false,
  vue:project-config   publicPath: '/',
  vue:project-config   outputDir: 'dist',
  vue:project-config   assetsDir: '',
  vue:project-config   indexPath: 'index.html',
  vue:project-config   filenameHashing: true,
  vue:project-config   runtimeCompiler: false,
  vue:project-config   transpileDependencies: false,
  vue:project-config   productionSourceMap: true,
  vue:project-config   parallel: true,
  vue:project-config   pages: undefined,
  vue:project-config   crossorigin: undefined,
  vue:project-config   integrity: false,
  vue:project-config   css: {},
  vue:project-config   devServer: {}
  vue:project-config } +0ms
  babel:config:loading:files:configuration Found configuration '/Users/nirpan/code/sandbox/eslint/babel.config.js' from '/Users/nirpan/code/sandbox/eslint'. +0ms
  babel:config:loading:files:plugins Loaded preset '@vue/cli-plugin-babel/preset' from '/Users/nirpan/code/sandbox/eslint'. +0ms
All browser targets in the browserslist configuration have supported ES module.
Therefore we don't build two separate bundles for differential loading.


⠙  Building for production...2021-08-06T06:16:04.645Z babel:config:loading:files:configuration Found configuration '/Users/nirpan/code/sandbox/eslint/babel.config.js' from '/Users/nirpan/code/sandbox/eslint'.
2021-08-06T06:16:04.691Z babel:config:loading:files:plugins Loaded preset '@vue/cli-plugin-babel/preset' from '/Users/nirpan/code/sandbox/eslint'.
⠹  Building for production...2021-08-06T06:16:04.893Z babel:config:loading:files:configuration Found configuration '/Users/nirpan/code/sandbox/eslint/babel.config.js' from '/Users/nirpan/code/sandbox/eslint'.
2021-08-06T06:16:04.921Z babel:config:loading:files:plugins Loaded preset '@vue/cli-plugin-babel/preset' from '/Users/nirpan/code/sandbox/eslint'.
⠦  Building for production...

 ERROR  Failed to compile with 11 errors                                                                                                              07:16:12

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts

TS1160: Unterminated template literal.

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:63

TS1110: Type expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                               ^^^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:281

TS1005: '}' expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                         ^^^^^^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:305

TS1128: Declaration or statement expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                 ^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:311

TS1005: ';' expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                       ^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:312

TS1005: ';' expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                        ^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:333

TS1128: Declaration or statement expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                                             ^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:335

TS1005: ';' expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                                               ^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:370

TS1128: Declaration or statement expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                                                                                  ^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:372

TS1005: ';' expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                                                                                    ^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 error  in node_modules/@vue/test-utils/dist/constants/dom-events.d.ts:30:379

TS1005: ';' expected.
    28 | export declare type KeyName = keyof typeof keyCodesByKeyName;
    29 | export declare type Modifier = typeof systemKeyModifiers[number] | typeof mouseKeyModifiers[number];
  > 30 | export declare type DomEventNameWithModifier = DomEventName | `${DomEventName}.${typeof systemKeyModifiers[number]}` | `click.${typeof mouseKeyModifiers[number]}` | `click.${typeof systemKeyModifiers[number]}.${typeof mouseKeyModifiers[number]}` | `${'keydown' | 'keyup'}.${keyof typeof keyCodesByKeyName}` | `${'keydown' | 'keyup'}.${typeof systemKeyModifiers[number]}.${keyof typeof keyCodesByKeyName}`;
       |                                                                                                                                                                                                                                                                                                                                                                                           ^^^^^^
    31 | declare const domEvents: {
    32 |     readonly abort: {
    33 |         readonly eventInterface: "Event";

 ERROR  Error: Build failed with errors.
Error: Build failed with errors.
    at /Users/nirpan/code/sandbox/eslint/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23
    at /Users/nirpan/code/sandbox/eslint/node_modules/webpack/lib/webpack.js:141:8
    at /Users/nirpan/code/sandbox/eslint/node_modules/webpack/lib/HookWebpackError.js:68:3
    at Hook.eval [as callAsync] (eval at create (/Users/nirpan/code/sandbox/eslint/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/nirpan/code/sandbox/eslint/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at Cache.shutdown (/Users/nirpan/code/sandbox/eslint/node_modules/webpack/lib/Cache.js:150:23)
    at /Users/nirpan/code/sandbox/eslint/node_modules/webpack/lib/Compiler.js:1140:15
    at Hook.eval [as callAsync] (eval at create (/Users/nirpan/code/sandbox/eslint/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/nirpan/code/sandbox/eslint/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.close (/Users/nirpan/code/sandbox/eslint/node_modules/webpack/lib/Compiler.js:1133:23)
[ERROR] An error occurred while running subprocess vue-cli-service.

        vue-cli-service build exited with exit code 1.

        Re-running this command with the --verbose flag may provide more
        information.
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 1 functions +0ms
  ionic:utils-process processExit: exiting (exit code: 1) +37ms

When I was testing it outside of ionic/capacitor, here was the package.json which contains all the relevant packages in the ionic project as well:

{
  "name": "vue-hello-world",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "register-service-worker": "^1.7.1",
    "vue": "^3.0.0-0",
    "vue-router": "^4.0.0-0",
    "vue-class-component": "^7.2.3",
    "vue-property-decorator": "^9.1.2"
  },
  "devDependencies": {
    "@vue/cli-plugin-pwa": "5.0.0-beta.2",
    "@typescript-eslint/eslint-plugin": "^4.26.0",
    "@typescript-eslint/parser": "^4.26.0",
    "@vue/cli-plugin-babel": "5.0.0-beta.2",
    "@vue/cli-plugin-e2e-cypress": "5.0.0-beta.2",
    "@vue/cli-plugin-eslint": "5.0.0-beta.2",
    "@vue/cli-plugin-router": "5.0.0-beta.2",
    "@vue/cli-plugin-typescript": "5.0.0-beta.2",
    "@vue/cli-plugin-unit-jest": "5.0.0-beta.2",
    "@vue/cli-service": "5.0.0-beta.2",
    "@vue/eslint-config-typescript": "^7.0.0",
    "eslint": "^7.32.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-prettier": "^3.4.0",
    "eslint-plugin-vue": "^7.0.0-0",
    "prettier": "^2.2.1",
    "typescript": "~4.1.5",
    "vue-template-compiler": "^2.6.11"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended",
      "@vue/typescript/recommended",
      "prettier"
    ],
    "plugins": [
      "prettier"
    ],
    "parserOptions": {
      "ecmaVersion": 2020
    },
    "rules": {
      "vue/no-deprecated-slot-attribute": "off",
      "@typescript-eslint/no-explicit-any": "off"
    },
    "overrides": [
      {
        "files": [
          "**/__tests__/*.{j,t}s?(x)",
          "**/tests/unit/**/*.spec.{j,t}s?(x)"
        ],
        "env": {
          "jest": true
        }
      }
    ]
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

I have tried to apply some suggested solutions on similar issue but for some reason the build command still tries to lint the node_modules files. Would be good to know if this is some ionic specific issue or if I need to create an issue on the eslint or vue-cli repos. Thanks.

1 post - 1 participant

Read full topic

@capacitor/camera errors

$
0
0

I’m adding camera functionality to my Ionic-Vue app, adapting the “build your first app” tutorial. I’m getting terminal warnings returned by ionic serve:

warning  in ./node_modules/@capacitor/camera/dist/esm/web.js
export 'CapacitorException' was not found in '@capacitor/core'
warning  in ./node_modules/@capacitor/camera/dist/esm/index.js
"export 'registerPlugin' was not found in '@capacitor/core'

and in the browser console a lengthy pair of errors that start with:

TypeError: Object(...) is not a function

I’ve narrowed the cause down to

import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera';

But I don’t quite know where else to go from here: I’ve reinstalled the plugins, but to no avail.

Any hints gratefully received.

1 post - 1 participant

Read full topic

The video from gallery is not loaded on iOS ionic angular app

$
0
0

I am trying to choose a video from gallery. I can choose it and I can play it only on Android device not on iOS. And I don’t understand the error. It’s not loaded on iOS. It returns error: [object Object]

I am using Cordova File and Camera ionic plugins on ionic angular project

Here is my ts file.

import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
import { File, FileEntry } from '@ionic-native/file/ngx';

...

public files = [];

  public options_select_video: CameraOptions = {
    allowEdit: true,
    correctOrientation: false,
    destinationType: this.camera.DestinationType.FILE_URI,
    sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
    mediaType:this.camera.MediaType.VIDEO,    
  }



 ngOnInit() {
    if (this.hasCordova) {
      this.platform.ready().then(() => {
        let path = this.file.dataDirectory;
        this.file.checkDir(path, MEDIA_FOLDER_NAME).then(
            () => {
              this.loadFiles();
            },
            err => {
              this.file.createDir(path, MEDIA_FOLDER_NAME, false);
            }
        );
      });
    }
  }

loadGallery() {                 
        this.camera.getPicture(this.options_select_video).then(
          (data) => {
            console.log(data)
            let duration = data.duration();
         if (data.length > 0) {
           this.copyGalleryFileToLocalDir(data);
         }
       },
       (err: CaptureError) => console.error(err)
     );
     }


 copyGalleryFileToLocalDir(data) {
  console.log('CopyFileIsCalled', data )

  let myPath = data;
  // Make sure we copy from the right location
  if (data.indexOf('file://') < 0) {
    myPath = 'file://' + data;
  }

  const ext = myPath.split('.').pop();
  const d = Date.now();
  const newName = `${d}.${ext}`;

  const name = myPath.substr(myPath.lastIndexOf('/') + 1);
  const copyFrom = myPath.substr(0, myPath.lastIndexOf('/') + 1);
  const copyTo = this.file.dataDirectory + MEDIA_FOLDER_NAME;
  console.log('copyFrom, name, copyTo, newName', copyFrom, name, copyTo, newName)

  this.file.copyFile(copyFrom, name, copyTo, newName).then(
      success => {
        this.loadFiles();
      },
      error => {
        console.log('error: ', error);
      }
  );
}

 loadFiles() {
    console.log('LoadFIlesIsCalled')
    this.file.listDir(this.file.dataDirectory, MEDIA_FOLDER_NAME).then(
        res => {
          this.files = res;
        },
        err => {
          console.log('error loading files: ', err);
        }
    );
  }

html file:

<ion-item-sliding *ngFor="let f of files">
    <!-- <span (click)="sendTest(f)"> stuur </span> -->
    <ion-item>
      <ion-icon name="play-outline" slot="start" *ngIf="f.name.endsWith('MOV') || f.name.endsWith('mp4')" (click)="openFile(f)"></ion-icon>
      <ion-icon name="trash-outline" slot="end" (click)="showDeleteAlert()"></ion-icon>
      <ion-label class="ion-text-wrap">
        <p>{{ f.name }}</p>
        <!-- <p>{{ f.fullPath }}</p> -->
      </ion-label>
    </ion-item>

 <ion-button (click)="loadGallery()"></ion-button>

THE CONSOLE LOG:

copyFrom, name, copyTo, newName 
file:///private/var/mobile/Containers/Data/PluginKitPlugin/AB52B0D2-BAF4-40B3-94E8-D867B96EE4D5/tmp/ 
trim.2B60B823-213D-4383-BA3B-275D88DDB7D5.MOV file:///var/mobile/Containers/Data/Application/B7E63CD1-13A8-419D-87E3-D73622467899/Library/NoCloud/my_media 
1628244858483.MOV

It works fine on Android, it stops on iOS and returns error. On copyGalleryFileToLocalDir()

Would appreciate any tip or help! Thanks!

1 post - 1 participant

Read full topic

Shared web credentials not working with ios keychain


Common.js:267 Native: tried calling OneSignal.getIds, but the OneSignal plugin is not installed

$
0
0

I am getting OneSignal plugin errors, even after using the solution suggested(In Ionic tried calling OneSignal.startInit, but the OneSignal plugin is not installed - #17 by MatheusEli) from this thread, I am STILL getting the errors below in my console
Error: exec proxy not found for :: OneSignalPush :: getIds
Error: exec proxy not found for :: OneSignalPush :: setSubscription
Error: exec proxy not found for :: OneSignalPush :: setNotificationReceivedHandler
Error: exec proxy not found for :: OneSignalPush :: setNotificationOpenedHandler
Error: exec proxy not found for :: OneSignalPush :: setInAppMessageClickHandler
Error: exec proxy not found for :: OneSignalPush :: init

1 post - 1 participant

Read full topic

Error loading image from Capacitor Camera

$
0
0

When trying to grab a photo from my iOS simulator camera roll, I am getting this error:

Error: Uncaught (in promise): Error: Error loading image

This is my code to grab the photos:


//Import the plugins
import { Camera, CameraSource, CameraResultType } from '@capacitor/camera';

//Allow the user to select where the image will originate from
async selectImageSource(location: string) {
    const actionSheet = await this.actionSheetController.create({
      header: "Select Image Location",
      buttons: [
        {
          text: 'Load from Library',
          handler: () => {
            this.choosePicture(CameraSource.Photos, location);
          }
        },
        {
          text: 'Use Camera',
          handler: () => {
            this.choosePicture(CameraSource.Camera, location);
          }
        },
        {
          text: 'Cancel',
          role: 'cancel'
        }
      ]
    });
    await actionSheet.present();
  }

//Get the photo from the source location
async choosePicture(source: CameraSource, location: string) {
    // Take a photo
    const capturedPhoto = await Camera.getPhoto({
      resultType: CameraResultType.Uri,
      source: source,
      allowEditing: true,
      quality: 75
    });

    console.log(capturedPhoto); //Nothing is logged.
  }

Any thoughts on what may be cause the error? Additionally, with the capacitor plugin, are iOS users required to provide permission for each photo they would want to use from their Camera Roll?

EDIT:

Here are my apps dependecies:

"dependencies": {
    "@angular/common": "~12.0.1",
    "@angular/core": "~12.0.1",
    "@angular/forms": "~12.0.1",
    "@angular/platform-browser": "~12.0.1",
    "@angular/platform-browser-dynamic": "~12.0.1",
    "@angular/router": "~12.0.1",
    "@capacitor/app": "1.0.2",
    "@capacitor/camera": "^1.0.3",
    "@capacitor/core": "^3.1.2",
    "@capacitor/haptics": "1.0.2",
    "@capacitor/ios": "3.1.1",
    "@capacitor/keyboard": "1.0.2",
    "@capacitor/splash-screen": "^1.0.2",
    "@capacitor/status-bar": "^1.0.2",
    "@capacitor/storage": "^1.0.3",
    "@ionic-native/core": "^5.34.0",
    "@ionic-native/onesignal": "^5.34.0",
    "@ionic-native/social-sharing": "^5.34.0",
    "@ionic/angular": "^5.5.2",
    "cordova-plugin-x-socialsharing": "^6.0.3",
    "es6-promise-plugin": "^4.2.2",
    "onesignal-cordova-plugin": "^2.11.4",
    "rxjs": "~6.6.0",
    "tslib": "^2.0.0",
    "zone.js": "~0.11.4"
  },

1 post - 1 participant

Read full topic

Global loading components

$
0
0

What is the quickest way to globally load all the ionic components? I am trying to develop an app and as I go from screen-to-screen it’s so annoying to have to comment out imports and stuff. I just want to develop the screens and then go back and figure out which to import or not. This is slowing me down greatly!

1 post - 1 participant

Read full topic

Ionic cordova run android not working/failing

$
0
0

hi, i’m trying to run my app to android phone, running through an emulator on localhost is not a problem.
However when i run the ionic cordova run android - i got an error as per below… appreciate the help as I been stuck for days… Is it because of the gradle problem?

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Users\me\AppData\Local\Android\Sdk (recommended setting)
ANDROID_HOME=C:\Users\me\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Users\me\AppData\Local\Android\Sdk
Subproject Path: CordovaLib
Subproject Path: app
Picked up _JAVA_OPTIONS: -Xmx1024M
Downloading https://services.gradle.org/distributions/gradle-6.5-all.zip
Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:214)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1958)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1915)
        at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1898)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1419)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1396)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:83)
        at org.gradle.wrapper.Download.download(Download.java:66)
        at org.gradle.wrapper.Install$1.call(Install.java:68)
        at org.gradle.wrapper.Install$1.call(Install.java:48)
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
        at org.gradle.wrapper.Install.createDist(Install.java:48)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:90)
        at sun.security.validator.Validator.getInstance(Validator.java:179)
        at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312)
        at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1508)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:215)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1024)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:954)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1065)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1384)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1412)
        ... 14 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
        at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
        at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
        at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88)
        ... 26 more
Command failed with exit code 1: C:\Users\me\Desktop\React\proj\platforms\android\gradlew cdvBuildDebug -b C:\Users\me\Desktop\React\proj\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android --device exited with exit code 1.

Ionic info:

Ionic:

   Ionic CLI                     : 6.16.3 (C:\Users\me\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.6.12
   @angular-devkit/build-angular : 12.1.4
   @angular-devkit/schematics    : 12.1.4
   @angular/cli                  : 12.1.4
   @ionic/angular-toolkit        : 4.0.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : android 9.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)

Utility:

   cordova-res : not installed globally
   native-run  : 1.4.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\me\AppData\Local\Android\Sdk)
   NodeJS            : v14.17.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.14.13
   OS                : Windows 10

Gradle info:

C:\Users\me>gradle --version
Picked up _JAVA_OPTIONS: -Xmx1024M

------------------------------------------------------------
Gradle 6.5
------------------------------------------------------------

Build time:   2020-06-02 20:46:21 UTC
Revision:     a27f41e4ae5e8a41ab9b19f8dd6d86d7b384dad4

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_41 (Oracle Corporation 25.40-b25)
OS:           Windows 8.1 6.3 x86

1 post - 1 participant

Read full topic

Ionic UI issue in IOS

Upgrading to Capacitor 3 breaks cordova-plugin-ionic

$
0
0

When I upgrade to Capacitor 3 and try and run on my Android emulator, it gets to the splash screen and won’t go any further.

If I remove cordova-plugin-ionic from the devDependencies, it will work.

However, removing this breaks the @ionic/pro plugin.

Is there an updated package to @ionic/pro that I should be using that is more inline with Capacitor?

2 posts - 2 participants

Read full topic

What is the difference between capasitor plugins & ionic native pluginss

$
0
0

I want to use GoPro API to copy photos, videos from GoPro to my ionic app.

to connect GoPro to ionic app I need bluetooth (and while transferring files use WiFI maybe or just Bluetooth not sure yet)

capsitor plugins offer

ionic native plugins offer

  1. What is the difference between capasior plugins & ionic native?

  2. Another example when I should use

npm install @capacitor/camera
versus 
npm install @ionic-native/camera
  1. Lot of plugins at ionic native but not much at capasior plugins! Is it okay to mix? Use capasitor’s Bluetooth plugin (Web, iOS, Android) and ionic-native’s WiFi plugin (iOS, Android).

2 posts - 2 participants

Read full topic


Preload app.component.ts before services

Ionic v6 iOS list style

$
0
0

In the opening keynote at IonicConf 2021 we saw a demo of the iOS Reminders app. On the first screen there was a list resembling iOS native styles (light gray content background and inset list with rounded borders). By default Ionic 6 beta doesn’t enforce those styles, I could achieve that by tweaking the css variables etc. but I was wondering if there is a straightforward way to get those styles in Ionic 6 without messing with the css. Something like this :point_down:t2:.

1 post - 1 participant

Read full topic

Job guaranteed courses in bangalore

No console.log( on single page in chrome

$
0
0

Hi, I’ve a very strange behaviour here in my ionic 5 app:
My console.log( -Outputs are working completely fine in Firefox, but in Chrome there is one site where there is no logging. All other sites are also logging in Chrome. Have anyone an idea about this?

3 posts - 2 participants

Read full topic

Meilleur Aspirateur Robot

$
0
0

Bonjour à tous Bienvenue sur le MeilleurAspirateurRobot, ici nous vous aidons à acheter le meilleur robot aspirateur.Je suis Wood Dauglas, je vais vous guider pour acheter le meilleur robot aspirateur en comparant et en observant chaque robot nettoyeur dans les détails. Je mettrai à jour tous les détails afin que vous ayez une meilleure compréhension de vos produits d’achat.Alors, vérifiez tous les aspirateurs et choisissez le meilleur d’entre eux.
Meilleur ​Aspirateur ​Robot

1 post - 1 participant

Read full topic

Viewing all 70972 articles
Browse latest View live


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