titanium-identity icon indicating copy to clipboard operation
titanium-identity copied to clipboard

Error: No virtual method getSystemService

Open SeanMaraj opened this issue 6 years ago • 2 comments

I am getting the following error when calling Identity.createKeychainItem(). The error occurs on Android 5.1 but not Android 9.0. What is the minimum supported Android version for this module?

[ERROR] TiExceptionHandler: (main) [332,2346] ti.identity/bootstrap.js:39 [ERROR] TiExceptionHandler: return new module"KeychainItem"; [ERROR] TiExceptionHandler: ^ [ERROR] TiExceptionHandler: Error: No virtual method getSystemService(Ljava/lang/Class;)Ljava/lang/Object; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar) [ERROR] TiExceptionHandler: at Identity.module.constructor.createKeychainItem (ti.identity/bootstrap.js:39:8) [ERROR] TiExceptionHandler: at ModuleWrapper.invoker [as createKeychainItem] (ti:/invoker.js:101:19) [ERROR] TiExceptionHandler: at /serverUtils.js:31:44 [ERROR] TiExceptionHandler: at Module._runScript (ti:/module.js:613:9) [ERROR] TiExceptionHandler: at Module.load (ti:/module.js:105:7) [ERROR] TiExceptionHandler: at Module.loadJavascriptText (ti:/module.js:457:9) [ERROR] TiExceptionHandler: at Module.loadAsFile (ti:/module.js:512:15) [ERROR] TiExceptionHandler: at Module.loadAsFileOrDirectory (ti:/module.js:429:20) [ERROR] TiExceptionHandler: at Module.require (ti:/module.js:296:17) [ERROR] TiExceptionHandler: at require (ti:/module.js:570:15) [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: ti.identity.KeychainItemProxy.(KeychainItemProxy.java:114) [ERROR] TiExceptionHandler: java.lang.reflect.Constructor.newInstance(Native Method) [ERROR] TiExceptionHandler: java.lang.Class.newInstance(Class.java:1606) [ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollProxy.createProxy(KrollProxy.java:138) [ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) [ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:183) [ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:325) [ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:135) [ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:117) [ERROR] V8Exception: Exception occurred at ti.identity/bootstrap.js:39: Uncaught Error: No virtual method getSystemService(Ljava/lang/Class;)Ljava/lang/Object; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar)

SeanMaraj avatar Dec 19 '18 23:12 SeanMaraj

@Topener can you move this? Seems to be related to this post. I still watch too many appc-repos, need to fix that :).

hansemannn avatar Dec 20 '18 05:12 hansemannn

We've written this up as a bug here... https://jira.appcelerator.org/browse/MOD-2485

jquick-axway avatar Dec 22 '18 00:12 jquick-axway