Adobe Connect User Community
Menu

#1 2015-09-30 09:55:55

MikeMok

Strange issue with Mobile Connect since around 9/25

Hello

We have an app that recieves a URI for a Adobe Live Chat in the following format:

connectpro://http://<redacted connect server name>/r4kh4q7dqrn/?session=<somesessionid>

Then on the mobile device, clicking that uri opened the chat in the Adobe Mobile Connect app.

Now, with no other change, on both iOS and android, this URI just hangs when opening in the Adobe Connect Mobile app, after upgrading the app this weekend.

We do see the following:

When I was looking through the Android log on my device, I noticed this crash:

09-28 11:13:25.378 28196-28196/? W/System.err: java.lang.StringIndexOutOfBoundsException: length=1024; regionStart=994; regionLength=-995
09-28 11:13:25.387 28196-28196/? W/System.err:     at java.lang.String.startEndAndLength(String.java:504)
09-28 11:13:25.387 28196-28196/? W/System.err:     at java.lang.String.substring(String.java:1333)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.adobe.air.utils.DeviceInfo.getHardwareInfo(DeviceInfo.java:29)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.adobe.air.Entrypoints.EntryMainWrapper(Native Method)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.adobe.air.Entrypoints.EntryMain(Entrypoints.java:139)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.adobe.air.AndroidActivityWrapper.LaunchApplication(AndroidActivityWrapper.java:998)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.adobe.air.AndroidActivityWrapper.onSurfaceInitialized(AndroidActivityWrapper.java:1197)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.adobe.air.AIRWindowSurfaceView.surfaceChanged(AIRWindowSurfaceView.java:746)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.SurfaceView.updateWindow(SurfaceView.java:591)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:176)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1970)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.Choreographer.doCallbacks(Choreographer.java:580)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.Choreographer.doFrame(Choreographer.java:550)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.os.Handler.handleCallback(Handler.java:739)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.os.Looper.loop(Looper.java:135)
09-28 11:13:25.387 28196-28196/? W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5257)
09-28 11:13:25.387 28196-28196/? W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
09-28 11:13:25.387 28196-28196/? W/System.err:     at java.lang.reflect.Method.invoke(Method.java:372)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
09-28 11:13:25.387 28196-28196/? W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Since this was showing actual code and line numbers, I assumed that the app had not had ProGuard run against it, so I reversed compiled the APK and tried to see what’s going on in that method.

This is what the reverse compiler is showing me:

  static String getHardwareInfo()
  {
    try
    {
      ProcessBuilder localProcessBuilder = new ProcessBuilder(new String[] { "/system/bin/cat", "/proc/cpuinfo" });
      byte[] arrayOfByte = new byte['?'];
      InputStream localInputStream = localProcessBuilder.start().getInputStream();
      int i = localInputStream.read(arrayOfByte, 0, 1024);
      if (i >= 0)
      {
        String str = new String(arrayOfByte, 0, i);
        int j = str.indexOf("Hardware");
        if (j >= 0)
        {
          int k = str.indexOf(':', j);
          if (k >= 0) {
            return str.substring(k + 1, str.indexOf('\n', k + 1)).trim();
          }
        }
      }
      localInputStream.close();
    }
    catch (IOException localIOException)
    {
      for (;;) {}
    }
    return new String("");
  }

Obviously this isn’t the exact representation of what was originally written, but from the best that I can gather, the Adobe Connect app is trying to determine hardware characteristics of the device by running shell commands on the device (“/system/bin/cat /proc/cpinfo”).

When I run that on my Nexus 6, it gives me the following:

processor       : 0
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 38.40
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x51
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0x06f
CPU revision    : 1

processor       : 1
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 38.40
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x51
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0x06f
CPU revision    : 1

processor       : 2
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 38.40
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x51
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0x06f
CPU revision    : 1

processor       : 3
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 38.40
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x51
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0x06f
CPU revision    : 1

Hardware        : Qualcomm APQ 8084 (Flattened Device Tree)
Revision        : 83a0
Serial          : 3a44120111000000
Device          : shamu
Radio           : 6
MSM Hardware    : APQ8084 ES1.1

I think it’s trying to read this line:

Hardware        : Qualcomm APQ 8084 (Flattened Device Tree)

Using this code:

return str.substring(k + 1, str.indexOf('\n', k + 1)).trim();

And for some reason the index is out of bounds in this substring call because the length value is -995. Since the exception handler doesn’t handle StringOutOfBoundsExceptions, it’s getting bubbled up to a higher level and, I’m assuming, the exception is swallowed, which is what is leading to the app just sitting there and hanging.

I have no guarantee that this is the exact problem, but it’s the only one that I can see happening without having access to Adobe’s source code for Connect Pro.

If we have a contact at Adobe, that would be our best option to figuring out how they might be able to resolve this. Otherwise, there doesn’t appear to be anything we can do within our app to fix this.

Any chance you can provide any guidance on this issue?

Offline

#2 2019-10-02 05:39:03

reekjohns

Re: Strange issue with Mobile Connect since around 9/25

MikeMok wrote:

09-28 11:13:25.378 28196-28196/? W/System.err: java.lang.StringIndexOutOfBoundsException: length=1024; regionStart=994; regionLength=-995

StringIndexOutOfBoundsException error is realted to Java substring and it means you are attempting to access a character which would come after the end of the string. If a String is only 4 characters long, attempting to get the substring from index 0 - 8, will throw this exception. substring(beginIndex, endInded) throws IndexOutOfBoundsException if the beginIndex is negative, or endIndex is larger than the length of this String object, or beginIndex is larger than endIndex.

Offline

Board footer