braze-inc / braze-swift-sdk

Braze SDK for the Apple ecosystem, including: iOS, macOS, iPadOS, visionOS, tvOS
https://www.braze.com
Other
52 stars 19 forks source link

[Bug]: Content Cards sync network error #14

Closed yDvash closed 2 years ago

yDvash commented 2 years ago

Platform

iOS

Platform Version

15.0

Braze SDK Version

5.4.0

Xcode Version

13.4.1

Computer Processor

Apple (M1)

Repro Rate

100%

Steps To Reproduce

Example:

  1. Send braze.contentCards?.subscribeToUpdates()
  2. [braze] [http] request POST sdk.iad-06.braze.com/api/v3/content_cards/sync:
  3. Failure

Expected Behavior

Getting updates about content cards

Actual Incorrect Behavior

Network request canceled

Verbose Logs

2022-09-14 14:23:43.734842+0300 _[17400:689605] Task <B76B66E3-9F9D-4E24-B387-D7060BF06E6F>.<13> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=53, NSUnderlyingError=0x283983120 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <B76B66E3-9F9D-4E24-B387-D7060BF06E6F>.<13>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <B76B66E3-9F9D-4E24-B387-D7060BF06E6F>.<13>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://sdk.iad-06.braze.com/api/v3/content_cards/sync, NSErrorFailingURLKey=https://sdk.iad-06.braze.com/api/v3/content_cards/sync, _kCFStreamErrorDomainKey=1}
2022-09-14 14:23:43.735862+0300 _[17400:689530] [braze] Http url error:
- error: URLError(_nsError: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=53, NSUnderlyingError=0x283983120 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <B76B66E3-9F9D-4E24-B387-D7060BF06E6F>.<13>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <B76B66E3-9F9D-4E24-B387-D7060BF06E6F>.<13>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://sdk.iad-06.braze.com/api/v3/content_cards/sync, NSErrorFailingURLKey=https://sdk.iad-06.braze.com/api/v3/content_cards/sync, _kCFStreamErrorDomainKey=1})

Additional Information

It seems the network request for: https://sdk.iad-06.braze.com/api/v3/content_cards/sync is getting cancelled immediately after the SDK sent it.

We are not blocking or canceling anything on our own...

azilbershtein commented 2 years ago

Any updates about this issue?

lowip commented 2 years ago

Hi @YardenDvash, @azilbershtein

Sorry for the delayed response, are you still experiencing the issue? At first sight, it looks like a server / connection error, not really an SDK error. Is there any more context you could provide to reproduce the issue?

lowip commented 2 years ago

@YardenDvash, @azilbershtein

I'm closing this ticket due to inactivity, feel free to re-open if you still experience the issue.

Thanks,