taplytics / Taplytics-Android-SDK

Taplytics Android SDK
http://taplytics.com
19 stars 9 forks source link

Taplytics Crashes app #12

Closed renclav closed 9 years ago

renclav commented 9 years ago

On app start, without any interaction, the app crashes after a few second with the following log: (This is as of today only)

09-01 14:04:52.874  23115-25511/fi.android.aprocessnane E/AndroidRuntime﹕ FATAL EXCEPTION: EventThread
    Process: fi.android.aprocessnane, PID: 23115
    java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
            at android.os.Handler.<init>(Handler.java:200)
            at android.os.Handler.<init>(Handler.java:114)
            at com.taplytics.sdk.network.toad.dog(SourceFile:372)
            at com.taplytics.sdk.network.toad.buffalo(SourceFile:31)
            at com.taplytics.sdk.network.dog.call(SourceFile:328)
            at com.github.nkzawa.emitter.Emitter.emit(Emitter.java:117)
            at com.github.nkzawa.socketio.client.Socket.access$601(Socket.java:18)
            at com.github.nkzawa.socketio.client.Socket$5.run(Socket.java:166)
            at com.github.nkzawa.thread.EventThread.exec(EventThread.java:50)
            at com.github.nkzawa.socketio.client.Socket.emit(Socket.java:162)
            at com.github.nkzawa.socketio.client.Socket.onclose(Socket.java:268)
            at com.github.nkzawa.socketio.client.Socket.access$200(Socket.java:18)
            at com.github.nkzawa.socketio.client.Socket$2$3.call(Socket.java:107)
            at com.github.nkzawa.emitter.Emitter.emit(Emitter.java:117)
            at com.github.nkzawa.socketio.client.Manager.onclose(Manager.java:479)
            at com.github.nkzawa.socketio.client.Manager.access$1400(Manager.java:21)
            at com.github.nkzawa.socketio.client.Manager$5.call(Manager.java:368)
            at com.github.nkzawa.emitter.Emitter.emit(Emitter.java:117)
            at com.github.nkzawa.engineio.client.Socket.onClose(Socket.java:815)
            at com.github.nkzawa.engineio.client.Socket.onError(Socket.java:767)
            at com.github.nkzawa.engineio.client.Socket.access$800(Socket.java:30)
            at com.github.nkzawa.engineio.client.Socket$4.call(Socket.java:305)
            at com.github.nkzawa.emitter.Emitter.emit(Emitter.java:117)
            at com.github.nkzawa.engineio.client.Transport.onError(Transport.java:66)
            at com.github.nkzawa.engineio.client.transports.WebSocket.access$500(WebSocket.java:26)
            at com.github.nkzawa.engineio.client.transports.WebSocket$1$5.run(WebSocket.java:130)
            at com.github.nkzawa.thread.EventThread$2.run(EventThread.java:75)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)

My Application onCreate ()

@Override
public void onCreate() {
super.onCreate();
Taplytics.startTaplytics(this, <my api number>); 
}

I have the supplied gradle setup with dependencies:

    //Taplytics
    compile("com.taplytics.sdk:taplytics:+@aar")

    //Dependencies for taplytics
    compile("com.mcxiaoke.volley:library:+")

    //Excluding org.json due to compiler warnings
    //socket.io connections only made on debug devices OR if making live changes to a release build.
    //No socket.io connection will be made on your release devices unless explicitly told to do so.
    compile("com.github.nkzawa:socket.io-client:+") {
        exclude group: 'org.json'
    }
    compile("com.github.nkzawa:engine.io-client:+") {
        exclude group: 'org.json'
    }

    //End Taplytics

and repo:

maven { url 'https://github.com/taplytics/Taplytics-Android-SDK/raw/master/AndroidStudio/' }
cdruxerman commented 9 years ago

Hi @renclav this issue has been resolved with the most recent version of the Android SDK v1.5.14. I'm terribly sorry about the issue, but once you upgrade all should be good. Please feel free to message me directly at cobi@taplytics.com if you need any further help.