Announcement

Collapse
No announcement yet.

GCM 3.20.1 broke Android SDK companion apps

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • GCM 3.20.1 broke Android SDK companion apps

    Recent GCM update broke communication channel of companion apps:
    when I use
    Code:
    connectIQ.registerForDeviceEvents(device, new IQDeviceEventListener() {
        @Override public void onDeviceStatusChanged(IQDevice device, IQDeviceStatus newStatus) {
            // Handle new status
        } });
    or
    Code:
    connectIQ.registerForAppEvents(device, app, new IQApplicationEventListener() {
        @Override public void onMessageReceived(IQDevice device, IQApp app, List<Object> messageData, IQMessageStatus status) {
            // First inspect the status to make sure this
            // was a SUCCESS. If not then the status will indicate why there
            // was an issue receiving the message from the Connect IQ application.
            if (status == IQMessageStatus.SUCCESS) {
                // Handle the message.
            }
        } });
    app crashes when device status is changed or message is received with the following message:
    Code:
    Class not found when unmarshalling: com.garmin.android.connectiq.c
    java.lang.ClassNotFoundException: com.garmin.android.connectiq.c
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:324)
        at android.os.Parcel.readParcelableCreator(Parcel.java:2435)
        at android.os.Parcel.readParcelable(Parcel.java:2389)
        at android.os.Parcel.readValue(Parcel.java:2295)
        at android.os.Parcel.readArrayMapInternal(Parcel.java:2645)
        at android.os.BaseBundle.unparcel(BaseBundle.java:221)
        at android.os.Bundle.getParcelable(Bundle.java:786)
        at android.content.Intent.getParcelableExtra(Intent.java:5391)
        at com.garmin.android.connectiq.IQMessageReceiver.onReceive(IQMessageReceiver.java:64)
        at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:885)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:234)
        at android.app.ActivityThread.main(ActivityThread.java:5526)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.garmin.android.connectiq.c" on path: DexPathList[[zip file "/data/app/com.trinketworkshop.calllogwidget-1/base.apk"],nativeLibraryDirectories=[/data/app/com.trinketworkshop.calllogwidget-1/lib/arm, /vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:324)
        at android.os.Parcel.readParcelableCreator(Parcel.java:2435)
        at android.os.Parcel.readParcelable(Parcel.java:2389)
        at android.os.Parcel.readValue(Parcel.java:2295)
        at android.os.Parcel.readArrayMapInternal(Parcel.java:2645)
        at android.os.BaseBundle.unparcel(BaseBundle.java:221)
        at android.os.Bundle.getParcelable(Bundle.java:786)
        at android.content.Intent.getParcelableExtra(Intent.java:5391)
        at com.garmin.android.connectiq.IQMessageReceiver.onReceive(IQMessageReceiver.java:64)
        at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:885)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:234)
        at android.app.ActivityThread.main(ActivityThread.java:5526)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
        Suppressed: java.lang.ClassNotFoundException: com.garmin.android.connectiq.c
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                ... 19 more
     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
    I have updated my companion apps with the latest connectiq-mobile-sdk-android-1.4/connectiq.jar but this didn't help.
    Line number for IQMessageReceiver.onReceive is either 64 when message is received or 93 if status is changed.
    Basically, current GCM killed most of the companion apps once again...

    P.S. Tried GCM 3.18 and companion app doesn't crash on status change or message received, but I instantly started to get infamous "FAILURE_DURING_TRANSFER" when sending message to watch. Seems like GCM team didn't learn from their previous mistakes or Garmin just doesn't care about Android developers at all, which is a pity.
    P.P.S. Basically, there is a workaround if I register my own receiver for the relevant status change broadcast and I was able to listen to that, but there's now workaround for the application messages as the payload is coded and hashed, according to IntelliJ-parsed classes from connectiq.jar, this requires unparceled application instance iterator, which is not available due to the unmarshalling problems.

    This problem can easily be reproduces using the standard Comm example by sending data from watch to mobile companion.
    Last edited by easuvorov; 07-24-2017, 04:52 AM.

  • #2
    Hey,

    I've got a ticket to figure out what is going on. We definitely care about our android developers.

    Thanks,
    -Coleman

    Comment


    • #3
      hi,
      great, I thought I was going crazy. Spent a couple of hours messing with my proguard configuration, but it seems it should be garmin figuring out theirs!


      See attachments for comparing garmin connect mobile 3.19 vs 3.20.1 .. com.garmin.android.connectiq.IQApp* & IQMessage is now a,b,c

      3.19


      vs

      3.20.1


      Any Idea when this is going to get fixed?

      thanks,
      ​​​​​​​ Herbert
      ​​​​​
      Attached Files
      Last edited by hpoul; 07-26-2017, 02:09 AM.

      Comment


      • #4
        Thank you guys for this thread. We are flooded with support requests at the moment since users experience a crash everytime they try to connect to the watch, which amounts to a few hundred emails every day :/
        Please let us know when this could be fixed, it is obviously just an obfuscation issue which could be solved in no time by the GCM team...

        Comment


        • #5
          Hey all,

          I wanted to give you an update. It looks like we are closing on a fix. We are pushing to get a hotfix update pushed as soon as we can. I'll let you all know when a the fix is pushed.

          Thanks,
          -Coleman

          Comment


          • #6
            I hate to nag, but is there any schedule to this? I also wrote to the GCM team about this and got no response.

            Comment


            • #7
              Hey,

              You are absolutely fine. We are working on verifying the fix right now. Hopefully it will be pushed soon. I will let you know when the fix is in place.

              Thanks,
              -Coleman

              Comment


              • #8
                I just wanted to report that Android GCM 3.20.3 resolved my original problems, although I've already noticed another GCM related topic. I do not transfer integers from watch to mobile so I cannot verify this, but today I tried my scenario in which I send strings in both directions and this worked fine.

                So, thanks for the fix, it came out much faster than the one previous year 8)) it seems we're (almost?) good for now, but I'll stage this apk version for my personal use just in case something bad happens once again.

                Comment


                • #9
                  Hey,

                  I'm glad it resolved your issue. After further examination the other thread you referenced was an error on the developers part that was likely exposed by the fix. They have adjusted their code accordingly and things are working correctly all around! Thanks so much!

                  -Coleman

                  Comment

                  Working...
                  X