optimizely/android-sdk

Unable to exclude users from experiment

josemifever opened this issue · 4 comments

Hi mates!

Im trying to exclude some user from an experiment in the following way:
We launch the experiment in the version 1.0.0 of the app -> encountered a bug -> stops the experiment and fix it -> launch again the experiment for all users but not for the old bad version, thats version != 1.0.0.
Im doing it through audiences and a custom property (app version) as the following capture shows:
image

The things is that the SDK is resolving true, I mean it is including those users in the experiment, and after diving in the sdk inside I found the following trace:
image

That is: the audience is ok, it's returning false for my variant BUT there is another check, getVariationForFeatureInRollout, that returns true for "Everyone Else" rule, whats that? why is it overriding my audience restriction?

After some search, I think I found the problem:
The line 157 of the DecisionService file its only taking on count the TRUE value, otherwise the function returns null variation that provokes the Every Thing else fallback. Shouldnt this function return the variation with false value to be taking into account?
image

Am I missing something? is there a workaround to avoid that? I'm begging for a solution. Thanks to you!

Android SDK 3.13.2

@josemifever SDK checks each rule in order and continue to next rules if audience not match. It looks like you have the last rule with the feature "enabled for all other users". You can adjust it for those with "1.0.0" version.
https://docs.developers.optimizely.com/full-stack/docs/use-feature-flags

@jaeopt Yes, you were right! My fault! thanks for your early reply.

Sorry for the reopen, Im still unable to exclude users. Now it is returning the following reason:
image
I searched for that trace and try to avoid it but it is always here, I tried all:
Reset the experiment, pause & run again, set the Optimizely to ignore user profile service:
image

But it still returning the last previous assigned variant in the user profile. Seems like that flag configuration option isnt. working.

@josemifever it looks like the old "wrong" decision for 1.0.0 has been saved in User Profile Service already, so returning it before evaluating your new rules. You can delete and re-install the app to clear it.