Device Accounts plugin not returning anything

#1

Hi, when I try to use any method of this plugin I don’t get any result or anything printed in console with the following:

this.deviceAccounts.get().then(accounts => console.log("ddd " + accounts)).catch(error => console.error("dddss " + error));

Why is this? I have accounts on my device.

#2

How and where are you testing?
What is your ionic info output?

#3

I am testing with ionic cordova run android

My Ionic Info:

cli packages: (C:\Users\Zel\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.11
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.11.3
    npm               : 5.6.0
    OS                : Windows 10
#4

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update

#5

I got cordova 8. Isn’t that one of the latest if not the most?

#6

Cordova CLI 8.0.0 is the most recent, but the Cordova-Android you have installed is not current. Read the article I linked to.

#7

Sadly I need to use that version bec some other plugins won’t work if not. I’ll try tho to see if that’s the issue, we’ll update in a moment

#8

Just tried, it’s not working. Also 6.3.0 is not so far from 7