Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"identify" completion handler not called when using SDK with .streaming streaming mode #211

Closed
mmiedlarz opened this issue Mar 27, 2020 · 1 comment

Comments

@mmiedlarz
Copy link

mmiedlarz commented Mar 27, 2020

Hey!

I'm integrating the latest version of the SDK (4.5.0) to our project (Xcode 11.4), and I spot one huge problem with the following setup:

// Called somewhere when app started
let key = "MY_MOBILE_KEY" 
var config = LDConfig(mobileKey: key)
config.streamingMode = .streaming
LDClient.shared.startCompleteWhenFlagsReceived(config: config) {
    Log.debug("[ThirdParty] LaunchDarkly initialized")
}

// ... and after user logs in (or polling current user session)
let user = LDUser(key: user.userId,
                                email: user.email)
LDClient.shared.identify(user: user) {
   Log.debug("[LaunchDarkly] User updated")
 }

So, when I set streamingMode to .streaming completion closure from identify method is never called. Also I can't check any features/variations - they all return fallback immediately.

It works fine when I switch streamingMode to .polling.

@mmiedlarz mmiedlarz changed the title identify completion handler not called when using SDK with .streaming streaming mode "identify" completion handler not called when using SDK with .streaming streaming mode Mar 27, 2020
@bwoskow-ld
Copy link
Member

Hi @mmiedlarz ,

Thanks for reaching out. We'd like to request that you reach out to our support team at [email protected] for further assistance on this issue. We believe that this issue is more likely to be due to a configuration issue rather than a bug in the SDK.

Some further areas of investigation on your support ticket might include:

  1. Did this issue happen in prior SDK versions before updating to 4.5.0 today?
  2. Does this issue happen when you don't set config.streamingMode at all (and use the default value which is also streaming?
  3. Does this issue happen when you pass user in as the second parameter to `startCompleteWhenFlagsReceived?

We recommend providing as much of that information as possible when filing the support request.

keelerm84 added a commit that referenced this issue Dec 7, 2022
* Adding a new Circle CI test case for the newer Xcode 13.3.1 (#205)

* Add the new build and see what happens
* Use the available simulator

* Add tombstone support (#209)

Prior to this commit, when a flag was deleted, it was actually removed
from memory. This allows for the (admittedly unlikely) situation where
an older version of a flag update would be received after this deletion,
causing the flag to become "undeleted".

By managing a light-weight placeholder, the tombstone ensures we do not
allow dead flags to resurrect unless directed to by a later version of
the flag.

* Fix missing merge issues

Co-authored-by: Louis Chan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants