Appboy / appboy-android-sdk

Public repo for the Braze Android SDK
https://www.braze.com
Other
153 stars 102 forks source link

[Bug]: Failed to connect to sdk.iad-01.braze.com #253

Closed javieritis closed 1 year ago

javieritis commented 1 year ago

Braze Android SDK Version

23.3.0

Steps To Reproduce

Randomly, in the logs appears the next errors when app is opened and the Braze SDK is initialiced. Not all time is reproducible, I'm not yet, if the problem is of the Braze side or my self, but previously I had the version 14.0.1 and works fine.

Expected Behavior

.

Actual Incorrect Behavior

.

Verbose Logs

2022-12-22 13:55:26.424 18833-19049/com.myapp E/Braze v23.3.0 .s: Experienced network communication exception processing API response. Sending network error event. Failed request to [https://sdk.iad-01.braze.com/api/v3/data], with message: [failed to connect to sdk.iad-01.braze.com/151.101.133.208 (port 443) from /10.0.2.16 (port 44962) after 15000ms]
    bo.app.r3: Failed request to [https://sdk.iad-01.braze.com/api/v3/data], with message: [failed to connect to sdk.iad-01.braze.com/151.101.133.208 (port 443) from /10.0.2.16 (port 44962) after 15000ms]
        at bo.app.t1.a(SourceFile:31)
        at bo.app.m3.a(SourceFile:56)
        at bo.app.s.b(SourceFile:8)
        at bo.app.s.c(SourceFile:2)
        at bo.app.r4.a(SourceFile:26)
        at bo.app.r4.a(SourceFile:1)
        at bo.app.r4$b.invokeSuspend(SourceFile:1)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
     Caused by: java.net.SocketTimeoutException: failed to connect to sdk.iad-01.braze.com/151.101.133.208 (port 443) from /10.0.2.16 (port 44962) after 15000ms
        at libcore.io.IoBridge.connectErrno(IoBridge.java:235)
        at libcore.io.IoBridge.connect(IoBridge.java:179)
        at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
        at java.net.Socket.connect(Socket.java:646)
        at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
        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 bo.app.t1.a(SourceFile:46)
        at bo.app.t1.a(SourceFile:4)
        at bo.app.m3.a(SourceFile:56) 
        at bo.app.s.b(SourceFile:8) 
        at bo.app.s.c(SourceFile:2) 
        at bo.app.r4.a(SourceFile:26) 
        at bo.app.r4.a(SourceFile:1) 
        at bo.app.r4$b.invokeSuspend(SourceFile:1) 
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) 
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 

2022-12-22 13:55:26.432 18833-19049/com.myapp E/Braze v23.3.0 .s: Experienced exception processing API response. Failing task.
    bo.app.r3: Failed request to [https://sdk.iad-01.braze.com/api/v3/data], with message: [failed to connect to sdk.iad-01.braze.com/151.101.133.208 (port 443) from /10.0.2.16 (port 44962) after 15000ms]
        at bo.app.t1.a(SourceFile:31)
        at bo.app.m3.a(SourceFile:56)
        at bo.app.s.b(SourceFile:8)
        at bo.app.s.c(SourceFile:2)
        at bo.app.r4.a(SourceFile:26)
        at bo.app.r4.a(SourceFile:1)
        at bo.app.r4$b.invokeSuspend(SourceFile:1)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
     Caused by: java.net.SocketTimeoutException: failed to connect to sdk.iad-01.braze.com/151.101.133.208 (port 443) from /10.0.2.16 (port 44962) after 15000ms
        at libcore.io.IoBridge.connectErrno(IoBridge.java:235)
        at libcore.io.IoBridge.connect(IoBridge.java:179)
        at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
        at java.net.Socket.connect(Socket.java:646)
        at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
        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 bo.app.t1.a(SourceFile:46)
        at bo.app.t1.a(SourceFile:4)
        at bo.app.m3.a(SourceFile:56) 
        at bo.app.s.b(SourceFile:8) 
        at bo.app.s.c(SourceFile:2) 
        at bo.app.r4.a(SourceFile:26) 
        at bo.app.r4.a(SourceFile:1) 
        at bo.app.r4$b.invokeSuspend(SourceFile:1) 
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) 
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 

Additional Information

No response

bryanlogan commented 1 year ago
  1. Do you have '' in your AndroidManifest.xml?
  2. Are there logs when Braze is starting up? (Providing the full logs from the moment the app begins can help us see root issues)
  3. Has this worked before with other versions of the SDK or is this new development?
javieritis commented 1 year ago

@bryanlogan

  1. In the manifest, I have the next configuration:
    
    <activity
    android:name="com.braze.ui.BrazeWebViewActivity"
    android:theme="own theme"/>
    <activity 

<receiver android:name="com.braze.BrazeBootReceiver" android:exported="true">

    </receiver>

<service android:name="com.braze.push.BrazeFirebaseMessagingService" android:exported="true">

    </service>

<receiver android:name="myapp.braze.BrazeNotificationReceiver" android:exported="true">

    </receiver>


2. The logs appear randomly when the main Application class starts and Braze SDK starts.

3. Previously, I had the version 14.0.1, and works fine.
bryanlogan commented 1 year ago

GitHub modified my previous comment. I'm assuming you have the INTERNER permission.

Is there any software (VPN, or installed on the corporate network) that could be blocking access to those IP addresses?

radixdev commented 1 year ago

Hey @javieritis ,

I'm closing this issue for now. Please let me know if you continue to have issues and we'll debug further.