[AC-6479] Android: Using Play Services 16.x crashes latest SDK 9 build (9.x regression)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2020-02-06T02:34:48.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Abir Mukherjee |
Created | 2020-02-04T05:47:36.000+0000 |
Updated | 2020-02-06T02:34:48.000+0000 |
Description
This only happens since a few master revisions.
Example:
var PlayServices = require('ti.playservices');
PlayServices.makeGooglePlayServicesAvailable(event => {
// ...
});
Full error:
[ERROR] AssetCryptImpl: (main) [11,347] Unable to load asset data.
[ERROR] AssetCryptImpl: java.lang.NoSuchMethodException: org.appcelerator.titanium.TiVerify.filterDataInRange [class [B, int, int]
[ERROR] AssetCryptImpl: at java.lang.Class.getMethod(Class.java:2072)
[ERROR] AssetCryptImpl: at java.lang.Class.getMethod(Class.java:1693)
[ERROR] AssetCryptImpl: at ti.playservices.AssetCryptImpl.filterDataInRange(AssetCryptImpl.java:99)
[ERROR] AssetCryptImpl: at ti.playservices.AssetCryptImpl.fetchFilteredAssetBytes(AssetCryptImpl.java:92)
[ERROR] AssetCryptImpl: at ti.playservices.AssetCryptImpl.readAsset(AssetCryptImpl.java:61)
[ERROR] AssetCryptImpl: at ti.playservices.CommonJsSourceProvider.getSourceCode(CommonJsSourceProvider.java:27)
[ERROR] AssetCryptImpl: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[ERROR] AssetCryptImpl: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:168)
[ERROR] AssetCryptImpl: at org.appcelerator.titanium.TiApplication.launch(TiApplication.java:803)
[ERROR] AssetCryptImpl: at org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:98)
[ERROR] AssetCryptImpl: at org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:480)
[ERROR] AssetCryptImpl: at org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:179)
[ERROR] AssetCryptImpl: at org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:499)
[ERROR] AssetCryptImpl: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)
[ERROR] AssetCryptImpl: at android.app.Activity.performResume(Activity.java:7939)
[ERROR] AssetCryptImpl: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
[ERROR] AssetCryptImpl: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
[ERROR] AssetCryptImpl: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
[ERROR] AssetCryptImpl: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
[ERROR] AssetCryptImpl: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
[ERROR] AssetCryptImpl: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
[ERROR] AssetCryptImpl: at android.os.Handler.dispatchMessage(Handler.java:107)
[ERROR] AssetCryptImpl: at android.os.Looper.loop(Looper.java:214)
[ERROR] AssetCryptImpl: at android.app.ActivityThread.main(ActivityThread.java:7356)
[ERROR] AssetCryptImpl: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] AssetCryptImpl: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
[ERROR] AssetCryptImpl: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
[ERROR] TiAssetHelper: Error while reading asset "Resourcesti.playservices.commonjs":
[ERROR] TiAssetHelper: java.io.FileNotFoundException: Resourcesti.playservices.commonjs
[ERROR] TiAssetHelper: at android.content.res.AssetManager.nativeOpenAsset(Native Method)
[ERROR] TiAssetHelper: at android.content.res.AssetManager.open(AssetManager.java:824)
[ERROR] TiAssetHelper: at android.content.res.AssetManager.open(AssetManager.java:801)
[ERROR] TiAssetHelper: at org.appcelerator.kroll.util.KrollAssetHelper.readAssetBytes(KrollAssetHelper.java:182)
[ERROR] TiAssetHelper: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[ERROR] TiAssetHelper: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:168)
[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiApplication.launch(TiApplication.java:803)
[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:98)
[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:480)
[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:179)
[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:499)
[ERROR] TiAssetHelper: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)
[ERROR] TiAssetHelper: at android.app.Activity.performResume(Activity.java:7939)
[ERROR] TiAssetHelper: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
[ERROR] TiAssetHelper: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
[ERROR] TiAssetHelper: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
[ERROR] TiAssetHelper: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
[ERROR] TiAssetHelper: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
[ERROR] TiAssetHelper: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
[ERROR] TiAssetHelper: at android.os.Handler.dispatchMessage(Handler.java:107)
[ERROR] TiAssetHelper: at android.os.Looper.loop(Looper.java:214)
[ERROR] TiAssetHelper: at android.app.ActivityThread.main(ActivityThread.java:7356)
[ERROR] TiAssetHelper: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiAssetHelper: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
[ERROR] TiAssetHelper: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
[DEBUG] Module: Extending native module 'ti.playservices' with the CommonJS module that was packaged with it.
[ERROR] TiExceptionHandler: (main) [14,361] /myapp.bootstrap.js:37
[ERROR] TiExceptionHandler: PlayServices.makeGooglePlayServicesAvailable(event => {
[ERROR] TiExceptionHandler: ^
[ERROR] TiExceptionHandler: TypeError: PlayServices.makeGooglePlayServicesAvailable is not a function
[ERROR] TiExceptionHandler: at /myapp.bootstrap.js:37:16
[ERROR] TiExceptionHandler: at Module._runScript (ti:/module.js:587:9)
[ERROR] TiExceptionHandler: at Module.load (ti:/module.js:106:7)
[ERROR] TiExceptionHandler: at Module.loadJavascriptText (ti:/module.js:436:9)
[ERROR] TiExceptionHandler: at Module.loadAsFile (ti:/module.js:488:15)
[ERROR] TiExceptionHandler: at Module.loadAsFileOrDirectory (ti:/module.js:410:20)
[ERROR] TiExceptionHandler: at Module.require (ti:/module.js:290:17)
[ERROR] TiExceptionHandler: at Module.global.Module.require (<embedded>:19311:34)
[ERROR] TiExceptionHandler: at require (ti:/module.js:550:15)
[ERROR] TiExceptionHandler: at global.require (<embedded>:19295:10)
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:168)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiApplication.launch(TiApplication.java:803)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:98)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:480)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:179)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:499)
[ERROR] TiExceptionHandler: android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)
[ERROR] TiExceptionHandler: android.app.Activity.performResume(Activity.java:7939)
[ERROR] TiExceptionHandler: android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
[ERROR] V8Exception: Exception occurred at /myapp.bootstrap.js:37: Uncaught TypeError: PlayServices.makeGooglePlayServicesAvailable is not a function
The workaround is to remove the play-sevices check.
Resolved by [TIMOB-27747]. The fix has already been merged into Titanium 9.0.0 "master" branch. Thanks for reporting this issue Hans.