hyperlab / TiMixpanel

Mixpanel integration for Titanium Mobile
22 stars 12 forks source link

Android; app crash from MixPanel in Lollipop/21 with Ti SDK 3.5.1.GA #24

Closed tbjers closed 9 years ago

tbjers commented 9 years ago

With Titanium SDK 3.5.1.GA our application is crashing on devices running Lollipop/21. We have tried to reproduce this error in an emulator (Genymotion Google Nexus 4 - 5.0.0 - API 21) without running into this crash...

Here's the specific errors we see from the device:

[ERROR] :  art: dlopen("/data/app/com.qcrazy.dist-2/lib/arm/libse.hyperlab.mixpanel.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "__exidx_end" referenced by "libse.hyperlab.mixpanel.so"...
[ERROR] :  TiApplication: (KrollRuntimeThread) [32,153] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__exidx_end" referenced by "libse.hyperlab.mixpanel.so"...; Titanium 3.5.1,2015/03/05 10:08,96875c9
[ERROR] :  TiApplication: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__exidx_end" referenced by "libse.hyperlab.mixpanel.so"...
[ERROR] :  TiApplication:
[ERROR] :  TiApplication:   at java.lang.System.loadLibrary(System.java:989)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:132)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:99)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:185)
[ERROR] :  TiApplication:
[ERROR] :  AndroidRuntime: FATAL EXCEPTION: KrollRuntimeThread
[ERROR] :  AndroidRuntime: Process: com.qcrazy.dist, PID: 3757
[ERROR] :  AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__exidx_end" referenced by "libse.hyperlab.mixpanel.so"...
[ERROR] :  AndroidRuntime:  at java.lang.Runtime.loadLibrary(Runtime.java:371)
[ERROR] :  AndroidRuntime:  at java.lang.System.loadLibrary(System.java:989)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:132)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:99)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:185)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)

When downgrading to use Ti SDK 3.5.0.GA the following warnings occur instead:

[WARN] :   W/MixpanelAPI.ConfigurationChecker: Google Play Services aren't included in your build- push notifications won't work on Lollipop/API 21 or greater
[INFO] :   I/MixpanelAPI.ConfigurationChecker: You can fix this by adding com.google.android.gms:play-services as a dependency of your gradle or maven project
[WARN] :   MixpanelAPI: Google play services were not part of this build, push notifications cannot be registered or delivered

Could it be that the crash above could have something to do with changes to Google Play Services in Lollipop?

jonatansberg commented 9 years ago

Have you tried rebuilding the Android module against the Lollipop/21 and/or Ti 3.5.1?

You could also try adding the Google Play Services to the build. I think adding it to the classpath should be enough.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
  <classpathentry kind="src" path="android/src"/>
  <classpathentry kind="src" path="android/build/.apt_generated"/>
  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  <classpathentry kind="lib" path="<HOME>/Library/Application Support/Titanium/mobilesdk/osx/3.4.1.GA/android/titanium.jar"/>
  <classpathentry kind="lib" path="<HOME>/Library/Application Support/Titanium/mobilesdk/osx/3.4.1.GA/android/kroll-common.jar"/>
  <classpathentry kind="lib" path="<HOME>/Library/Application Support/Titanium/mobilesdk/osx/3.4.1.GA/android/kroll-apt.jar"/>
  <classpathentry kind="lib" path="<HOME>/Library/Application Support/Titanium/mobilesdk/osx/3.4.1.GA/android/kroll-apt.jar"/>
  <classpathentry kind="lib" path="<ANDROID-SDK>/platforms/android-14/android.jar"/>
  <classpathentry kind="lib" path="<ANDROID-SDK>/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar"/>
  <classpathentry kind="output" path="bin"/>
</classpath>