mixpanel / mixpanel-android

Official Android Tracking Library for Mixpanel Analytics
http://mixpanel.com/
Apache License 2.0
1.02k stars 365 forks source link

Cannot post message to https://api.mixpanel.com/track/?ip=1 #809

Closed Copatych closed 1 year ago

Copatych commented 1 year ago

Mixpanel version: 7.2.1

Device/Android Version: Samsung Galaxy A50, Huawei p40 lite

Events are logged (I see it in the android terminal by .setEnableLogging(true)), but when sending to the server, such an error occurs:

    java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:215)
        at java.net.SocketInputStream.read(SocketInputStream.java:144)
        at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:936)
        at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:900)
        at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:722)
        at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:238)
        at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:217)
        at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:1450)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:1399)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:1343)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:221)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:144)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:106)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:400)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:333)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
        at com.mixpanel.android.util.HttpService.performRequest(HttpService.java:127)
        at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.sendData(AnalyticsMessages.java:516)
        at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.sendAllData(AnalyticsMessages.java:488)
        at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.handleMessage(AnalyticsMessages.java:420)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:246)
        at android.os.HandlerThread.run(HandlerThread.java:67)
V/MixpanelAPI.Messages: Retrying this batch of events in 60000 ms (Thread 135303)

Tested for several users. Previously, events were logged. Events are coming from many other users.

linyaDev commented 1 year ago

We have same issue. And on ios too. Checked on 5.+ and 7.+ version.

zihejia commented 1 year ago

hi @linyaDev @Copatych are you still having the issue? This should not be an issue from the SDK but from the server side and you need to contact Mixpanel support. You can check the internet access from the device and also check the Mixpanel service status: https://www.mixpanelstatus.com/.