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

Error: CryptoObject cannot be null #301

Open
jordanbisato opened this issue Jul 14, 2022 · 5 comments · May be fixed by #309
Open

Error: CryptoObject cannot be null #301

jordanbisato opened this issue Jul 14, 2022 · 5 comments · May be fixed by #309

Comments

@jordanbisato
Copy link

jordanbisato commented Jul 14, 2022

Hi,

i get many crash logs like this in Firebase Crashlytics, but can't reproduce while debugging.

The most affected manufacturer is Samsung Galaxy.

Someone else get this error?

Non-fatal Exception: java.lang.Throwable at /alloy/controllers/login.js.Uncaught Error: CryptoObject cannot be null.(TiIdentity.authenticate({:553) at androidx.biometric.BiometricPrompt.authenticate(BiometricPrompt.java:939) at ti.identity.FingerPrintHelper.startListening(FingerPrintHelper.java:153) at ti.identity.TitaniumIdentityModule.authenticate(TitaniumIdentityModule.java:165) at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63) at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:985) at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1219) at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:260) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:246) at at Label.autenticar (login.js:553) at at Label.value (kroll.js:1604) at at Label.value (kroll.js:1656)

My code:

  var TiIdentity = require('ti.identity');
  var keychainItem = TiIdentity.createKeychainItem({
	identifier: '******',
	cancelTitle: "Cancelar",
	fallbackTitle: "Utilizar Senha",
});

  TiIdentity.authenticate({
	reason: 'Use sua impressão digital para logar',
	fallbackTitle: 'Usar senha',
	cancelTitle: 'Cancelar', 
	callback: function (e) {
		Ti.API.info('authenticate e: ' + JSON.stringify(e));
		if (e.success) {
			keychainItem.read();
		} else {
			TiIdentity.invalidate();
		}
	}
});
@yuranevmer
Copy link

The same. Did you find a solution?

@jordanbisato
Copy link
Author

@yuranevmer Probably happened in this line, but i don't know how to solve it.

biometricPrompt.authenticate(promptInfo);

@m1ga m1ga linked a pull request Oct 7, 2022 that will close this issue
@m1ga
Copy link
Contributor

m1ga commented Oct 7, 2022

can you check #309

Shouldn't crash at that place now.

@yuranevmer
Copy link

yuranevmer commented Oct 7, 2022

thanks! I could not reproduce in single device.
but I will check firebase crashlytics results with fixed version

@jordanbisato
Copy link
Author

#309 fix this error

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

Successfully merging a pull request may close this issue.

3 participants