-
Notifications
You must be signed in to change notification settings - Fork 13
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
Variant Return nil If user is nil when Flag has more than one variant #45
Comments
Hi @areejSad Thanks for reporting this issue. What version of the SDK are you using? And can you link the flag/experiment in amplitude? Thanks! |
the version '1.13.0', sorry what do you exactly need? if you mean the space it's a private account for company |
Is the deployment used to initialize the SDK added to the flag, and is the flag activated? A link to the flag/experiment in Amplitude would be sufficient for me to check. |
I can show you a photo, and yes it's added to the deployment environment, I also checked amplitudeExperimentAPIKey |
Thanks, and sorry for the delay.
This most likely means that the user information (user_id and device_id) are not being sent in the fetch request. Can you turn on the Also, could you share how the Experiment SDK is initialized? Thanks! |
Not quite. When there is some form of randomization (e.g. 3 variants evenly distributed) then we need some input value to get a consistent output. Without a user ID or device ID we dont have an input for the hash function used to determine which variant the user should be assigned, so the result is empty. Passing a nil user is generally if you are using the |
I faced an issue, that the whole variant from experiment.variant(key.rawValue) return nil.
This happens when I don't want to give a User since it's optional.
This is the flag with multiple variants:
The text was updated successfully, but these errors were encountered: