Archived

This forum has been archived. Please start a new discussion on GitHub.

Problem with Android 8

Good morning,

My name is Alex González. I work as a developer in Zennio, a company that has some agreements with ZeroC.

We integrated Ice (3.5.1 version) time ago in our mobile app called Z41 Remote, used to allow remote control over homes/hotels automations.

We're having complaints of users with Android 8 installed in their mobiles. Specifically, we are observing an exception (see screenshot) thrown when the ice_ping operation is being called, on LAN connection process. There isn't any problem with that on previous Android versions.

We can't easily update to a higher Ice version because all our sold hardware (panels integrated on the walls, etc.) use that fixed version too (3.5.1), so, we would like to confirm if that exception could be due to a possible non-support of Android 8 by Ice 3.5.1, in order to evaluate that update. We also would like to know if Android 8 is currently supported by the last version of Ice.

We need to give an answer to our customers soon, so we will appreciate any answer.

Thanks in advance, and best regards.

Comments

  • bernard
    bernard Jupiter, FL

    Hello Alex,

    I confirm we support and test Android 8 with the latest version of Ice, Ice 3.7.

    However this ice_ping failure looks more like a bug in your application than an incompatibility of Ice 3.5.1 with Android 8.

    Ice.ObjectNotExistException means the target object adapter could not find a servant with the given identity (a UUID here).

    This could be expected (perhaps you get a new UUID each time you restart a panel); in this case your app should handle this situation more gracefully. Or if it's unexpected - because each panel gets a UUID that never changes - you should figure out what happened on the panel.

    All the best,
    Bernard

  • Alex_Gonzalez
    edited November 2017

    Thanks a lot for answering so quickly Bernard, we appreciate it.

    We've tried to read carefully the answer, but if the problem is in the panels, or in the UDID handling by the mobile app, then, when we run the same app in Android 7 or lower version against the same panels, it would also crash we think... We haven't changed our panels behaviour either...

    Could it be possible that maybe Ice 3.5.1 code uses some Android method which can be deprecated now in Android 8 or something like that?...

    Thanks again for your help Bernard.

  • bernard
    bernard Jupiter, FL

    Hello Alex,

    Could you describe the lifecycle of the object named 2E43... in your panel?

    It could be for example:
    (a) a persistent object, that should be always available. In this case 2E43... probably corresponds to some unique persistent ID of your panel.
    (b) a transient per-panel object, created each time the panel boots up
    (c) a transient "session" object that represents an App - Panel session

    With (a), ObjectNotExistException is the least expected. It could occur if a new panel (with a new ID) is now listening on the IP address (or host name) and port previously used by panel 2E43....

    With (b), the app would get ObjectNotExistException if you restart the panel while the app is running.

    With (c), the app would get ObjectNotExistException if for some reason this session expired. In this case the way you implement the session maintenance in your app (calls through a separate thread?) might be affected by the change of Android version. Note at as of Ice 3.6 we provide an improved connection management mechanism that greatly simplifies the implementation of session management - see https://doc.zeroc.com/display/Ice37/Active+Connection+Management and the Ice/session demo in https://github.com/zeroc-ice/ice-demos/.

    Best regards,
    Bernard

  • dakotadelnorte
    edited December 2017

    Hi,

    The problem is that our "input" proxy at mobile app doesn't work in Android 8 (Panel receives this proxy). The application can send data to panel, but not receive data from panel. The application source code is the same, and the creation of proxy is like following:

    objectAdapter =  MyCommunicator.createObjectAdapterWithEndpoints("XXXX.YYY", "ssl -t 2000"); 
    Identity identity = new Identity(myUUID,"XXXX.YYY");
    myPrx = MyClassPrxHelper.uncheckedCast(objectAdapter.add(this, identity));
    objectAdapter.activate();
    

    Have you test over Android 8 to confirm (officially) that Ice 3.5.x works fine on this version?

    We can get the error in different methods, not only in "ice_ping" as Alex said previously, those was our first impression, the error can be through in any moment and in any method, because the problem appear to be that panel cannot connect with the mobile app by itself. Is his proxy not valid?

    Thank you in advance.

    Best regards,

    Note: All this problem happens in LAN context, and the communication is direct without glacier.

  • bernard
    bernard Jupiter, FL

    Hi Roberto,

    Regarding Android 8 support: we support Ice 3.7.0 with Android 8 and tested Ice 3.7.0 with Android 8. We expect earlier version of Ice work on Android 8, however we haven't tested them with Android 8.

    If you are concerned about some incompatibility between Ice 3.5.1 and Android 8, you can upgrade your Android app to Ice 3.7.0 without upgrading Ice on your panels. We fully support communications between different versions of Ice, including Ice 3.5.1 and Ice 3.7.0.

    Then, my understanding, based on this earlier question, is that your panels run C++ code on Linux, while the apps are Java code on Android. Please confirm.

    The stack trace shown by Alex in his initial post is a Java stack trace, so unless you have Java code running on your panels, this stack trace does not correspond to a panel sending a request to an object in your Java app. The identity in your Java code excerpt also includes a category, while the identity in Alex stack trace doesn't.

    Can you clarify your setup - in particular when/where you get this ObjectNotExistException and the lifecycle of the target object?

    Best regards,
    Bernard

  • MatthewZennio
    edited February 2018

    Hi Bernard,

    I've been looking at this issue and it looks as though Android 8 is rejecting the SSL connection. The device that has a problem communicating with Android 8 is using a very old versión of openssl with no support for TLS v1.2. I have updated this library and this appears to have fixed the issue.

    Thanks for your support,

    Best regards,

    Matthew