Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSInvalidArgumentException on ios #212

Closed
vcomperq opened this issue Dec 5, 2019 · 15 comments
Closed

NSInvalidArgumentException on ios #212

vcomperq opened this issue Dec 5, 2019 · 15 comments

Comments

@vcomperq
Copy link

vcomperq commented Dec 5, 2019

Hi,

i'm testing your plugin in my ios device.
Here is the error that i get :

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Non-empty localizedReason must be provided.

this error happens when i call the "show" method

My app is written with the ionic 4 framework and the plugin version is 3.0.0

Thanks

@vcomperq
Copy link
Author

vcomperq commented Dec 5, 2019

please see : danielsogl/awesome-cordova-plugins#3239

@NiklasMerz
Copy link
Owner

Please see the documentation of this plugin and danielsogl/awesome-cordova-plugins#3227 for the latest changes.

@vcomperq
Copy link
Author

vcomperq commented Dec 7, 2019

the ionic documentation says :

`import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';

constructor(private faio: FingerprintAIO) { }

...

this.faio.show({
clientId: 'Fingerprint-Demo', //Android: Used for encryption. iOS: used for dialogue if no localizedReason is given.
clientSecret: 'o7aoOMYUbyxaD23oFAnJ' //Necessary for Android encrpytion of keys. Use random secret key.
disableBackup:true, //Only for Android(optional)
localizedFallbackTitle: 'Use Pin', //Only for iOS
localizedReason: 'Please authenticate' //Only for iOS
})
.then((result: any) => console.log(result))
.catch((error: any) => console.log(error));`

why do i have an error about the localizedReason while this params does nos exist anymore

@greaterking
Copy link
Collaborator

greaterking commented Dec 7, 2019

Looks like you updated the plug-in without updating to the latest ionic wrapper? In your project try running:

npm install @ionic-native/fingerprint-aio

Also looks like this is a closed issue… However if you're experiencing something new I suggest creating a new issue

@vcomperq
Copy link
Author

vcomperq commented Dec 7, 2019

i updated nothing, i just did :

ionic cordova plugin add cordova-plugin-fingerprint-aio
npm install @ionic-native/fingerprint-aio

for the following results in my package.json :

"@ionic-native/fingerprint-aio": "^5.17.1",
"cordova-plugin-fingerprint-aio": "^3.0.0",

and this issue has been closed 3 hours ago but the problem is still there...

@greaterking
Copy link
Collaborator

Thats so weird..from your project when you navigate to /node_modules/@ionic-native/fingerprint-aio/ngx/index.d.ts do you see a property called "fallbackButtonTitle" in that file?

@NiklasMerz NiklasMerz reopened this Dec 7, 2019
@vcomperq
Copy link
Author

vcomperq commented Dec 7, 2019

yes i do

@NiklasMerz
Copy link
Owner

Did you provide that paramter for show? Please try deleting the ios platform and create it again

@vcomperq
Copy link
Author

vcomperq commented Dec 8, 2019

i add this params and it's working now.

Very strange because, i removed it, and it's still ok
i tried with an other blank app, without any params, it's also working...

so it's ok, yes, but i don't understand why...

Anyway, thanks for your help !

@NiklasMerz
Copy link
Owner

That' strange. But as it not reproducible I don't think we have a bug here.

@vyelamanchi
Copy link

Hi,

Recently upgraded the ionic version to 5.0.0 & all the native plugins.

"@ionic-native/fingerprint-aio": "^5.21.5"
"cordova-plugin-fingerprint-aio": "3.0.1",

Receiving the same "Non-empty localizedReason must be provided" error when trying to "show" the auth dialog on IOS .

@vyelamanchi
Copy link

"localizedReason: 'Please authenticate' //Only for iOS"
This option only exists for the old version for the plugin.

@vyelamanchi
Copy link

Swift version 5

@NiklasMerz NiklasMerz reopened this Feb 18, 2020
@vyelamanchi
Copy link

Found & fixed the issue. I was setting the “description” attribute in fingerprintoptions to empty quotes.

@NiklasMerz
Copy link
Owner

Great thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants