amplitude / amplitude/experiment-ios-client

[iOS] Network Timeout during fetch(user: nil) results in fallback despite "[Experiment] Retry success" log

Aperta
#83 0 commenti 0 reazioni 1 assegnatario Rivendicata da @vaibhav-jain-exp Vedi su GitHub
Lingua principale
Swift
Stelle
5
Fork
17
Merge medio
1g 9h
PR unite (30g)
3

Descrizione

I am using Amplitude Experiment integrated with Amplitude Analytics via the ConnectorUserProvider mechanism

I encountered a scenario where the initial network request times out (Error -1001). The SDK logs indicate that a retry was attempted and succeeded ([Experiment] Retry success). However, the value received in the completion handler seems to remain the fallback value (Variant A), or the behavior is inconsistent regarding when the completion handler is actually called in this retry flow.
This raises a risk where the app might be stuck in a Fallback state despite a successful retry, or the logs are misleading regarding the actual variant applied.
**Observe the logs.**

```
Task <075AD00F-06B0-4C2B-B78B-FEC372C81232>.<8>
finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x300d1fbd0
{Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)"
UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}},
_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <075AD00F-06B0-4C2B-B78B-FEC372C81232>.<8>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <075AD00F-06B0-4C2B-B78B-FEC372C81232>.<8>"
), NSLocalizedDescription=The request timed out.,
NSErrorFailingURLStringKey=https://api.lab.amplitude.com/sdk/v2/vardata?v=0,
NSErrorFailingURLKey=https://api.lab.amplitude.com/sdk/v2/vardata?v=0, _kCFStreamErrorDomainKey=4}
Optional("a") - Optional("a") -- these are my test key and value
[Experiment] Retry success
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.