[TIMOB-25488] Error with Ti.Cloudpush Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-11-08T20:54:09.000+0000 |
Affected Version/s | Release 6.2.2 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | eric harms |
Assignee | Gary Mathews |
Created | 2017-11-07T23:12:24.000+0000 |
Updated | 2018-08-06T17:36:59.000+0000 |
Description
Hello,
I am trying to get the Android deviceId using Ti.cloudpush, but my app is crashing. This just started happening recently. My QA team believes this is the first time they are seeing the issue.
Run a simple app with the following code. App will crash with error message below.
var CloudPush = require('ti.cloudpush');
// Initialize the module
CloudPush.retrieveDeviceToken({
success : deviceTokenSuccess,
error : deviceTokenError
});
seems to be crashing on retrieveDeviceToken -- if you comment out the callbacks it will still crash.
ERROR:
[ERROR] : TiApplication: (main) [5,230] Sending event: exception on thread: main msg:java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil;; Titanium 6.2.2,2017/09/19 16:01,undefined
[ERROR] : TiApplication: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil;
[ERROR] : TiApplication: at com.appcelerator.aps.CCPushService.getPushType(CCPushService.java:63)
[ERROR] : TiApplication: at com.appcelerator.aps.CCPushService.ifEnabled(CCPushService.java:250)
[ERROR] : TiApplication: at com.appcelerator.aps.PushBroadcastReceiver.onReceive(PushBroadcastReceiver.java:59)
[ERROR] : TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3043)
[ERROR] : TiApplication: at android.app.ActivityThread.-wrap18(ActivityThread.java)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6131)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
[ERROR] : TiApplication: Caused by: java.lang.ClassNotFoundException: com.google.android.gms.common.GooglePlayServicesUtil
[ERROR] : TiApplication: at java.lang.VMClassLoader.findLoadedClass(Native Method)
[ERROR] : TiApplication: at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] : TiApplication: ... 12 more
[ERROR] : TiApplication: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/zzg;
[ERROR] : TiApplication: ... 12 more
[ERROR] : TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.zzg" on path: DexPathList[[zip file "/data/app/com.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.test-1/lib/arm, /data/app/com.test-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
[ERROR] : TiApplication: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] : TiApplication: ... 12 more
Hello [~eric.harms@gmail.com], Thanks for sharing with us. Can you please test in latest SDK and let us know how it goes. Best
This will be fixed by
4.0.4
with the use ofti.playservices
Thanks Gary -- is that available in SDK 6.3.0, or is it scheduled for the next release?
[~eric.harms@gmail.com] next release
Closing as invalid. If incorrect, please reopen.