Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2484] Ti.CloudPush Version 3.2.0 get Force Close when Unlock Phone on Android 4.4

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2014-01-10T17:28:53.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labels3.2.0, android, sdk, ti.cloudpush
ReporterAnh Nguyen
AssigneeJon Alter
Created2013-12-27T16:36:03.000+0000
Updated2016-03-08T07:41:32.000+0000

Description

Using: Ti.CloudPush Module Version 3.2.0 Last used: Ti.CloudPush Module Version 2.3.2 The App will be Force Closed when Lock then Unlock the phone. On the Console when I debug, looks like this: {quote} [ERROR] : TiApplication: (main) [33375,66355] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to instantiate receiver ti.cloudpush.MQTTReceiver: java.lang.ClassNotFoundException: Didn't find class "ti.cloudpush.MQTTReceiver" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.mycom.myapp.apk"],nativeLibraryDirectories=[/data/app-lib/com.mycom.myapp, /vendor/lib, /system/lib]]; Titanium 3.2.0,2013/12/20 10:57,d9182d6 [ERROR] : TiApplication: java.lang.RuntimeException: Unable to instantiate receiver ti.cloudpush.MQTTReceiver: java.lang.ClassNotFoundException: Didn't find class "ti.cloudpush.MQTTReceiver" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.mycom.myapp.apk"],nativeLibraryDirectories=[/data/app-lib/com.mycom.myapp, /vendor/lib, /system/lib]] [ERROR] : TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2400) [ERROR] : TiApplication: at android.app.ActivityThread.access$1700(ActivityThread.java:135) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:136) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5017) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:515) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) [ERROR] : TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "ti.cloudpush.MQTTReceiver" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.mycom.myapp.apk"],nativeLibraryDirectories=[/data/app-lib/com.app/com.mycom.myapp, /vendor/lib, /system/lib]] [ERROR] : TiApplication: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) [ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:497) [ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:457) [ERROR] : TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2395) [ERROR] : TiApplication: ... 10 more {quote} When I go back to older version (2.3.2) the app won't get force close any more

Comments

  1. Ritu Agrawal 2013-12-30

    As of Release 3.2.0, the CloudPush module only supports Google Cloud Messaging (GCM) for push notifications. MQTT support is deprecated and support was removed in Release 3.2.0. Upgrade your application to use the GCM protocol. MQTT protocol support deprecation was announced back in August and it has finally been removed. http://www.appcelerator.com/blog/2013/08/android-push-notification-deprecating-mqtt-in-favor-of-gcm/ Please update your application to use GCM protocol and let us know if you run into an issue.
  2. Anh Nguyen 2013-12-31

    I am using GCM not MQTT I have started build my app in TitaniumSDK 3.1 I am using payload and push the Payload to Device by TokenDevice
  3. Ritu Agrawal 2014-01-02

    Reopening this ticket based on the latest feedback from the reporter.
  4. Jon Alter 2014-01-07

    Hi [~anh.nguyen] - If you delete the app from your device and reinstall it, do you still get this error?
  5. Anh Nguyen 2014-01-07

    Yes, I still get that error. I am now rollback to version 2.3.2. and waiting for a proposal to fix this bug. I saw many new features in 3.2.0 and really want to use those features
  6. Jon Alter 2014-01-07

    Can you send me the contents of your "app/build/android/AndroidManifest.xml" file? Thank you.
  7. Jon Alter 2014-01-07

    [~anh.nguyen] - It seems that something is hanging around from the older version of the module. To ensure that is not the case, please try the following:

    Make sure that there is only one version of the module included in your tiapp.xml.

    Delete the application from your device.

    Do a clean build of your application. This means deleting the "build" folder and building your application.

    Let me know how it goes!
  8. Anh Nguyen 2014-01-07

    I have re-checked my Customized AndroidManifest.xml file and seen one property look like this: and this: I deleted them and now I do not get this error anymore. I don't know why they appear there but any way I fixed it and here is "app/build/android/AndroidManifest.xml" after deletion http://schemas.android.com/apk/res/android" package="com.mycom.myapp" android:versionCode="1" android:versionName="1"> Thank you so much JonAlter
  9. Anh Nguyen 2014-01-07

    Hi Jon Alter, after I deleted 2 attributes that correspond to MQTTReceiver I did not see Group notification any more. Now all Notifications show in multiple Notifications. Do you know what could be the reason? Appreciate your help.
  10. Jon Alter 2014-01-08

    Oh there we go. Remove your custom AndroidManifest from your app so that it can generate a new one. Build the app once and then use the new manifest in "build/android" as the basis for your custom manifest. Changes where made to what the module needs in the manifest and the custom manifest is over riding that. You're very welcome. Let me know how it goes.
  11. Anh Nguyen 2014-01-08

    Thank you, It works now

JSON Source