https://www.growthbook.io/ logo
#announcements
Title
# announcements
d

damp-motorcycle-90184

03/21/2023, 7:11 AM
Hi GrowthBook team, I’m having an issue where sometimes the condition rule doesn’t work. I’m talking about Android SDK btw. My condition rule looks like this
Copy code
"test-feature": {
      "defaultValue": false,
      "rules": [
        {
          "condition": {
            "app_version": {
              "$gte": "2.655.6"
            }
          },
          "force": true
        }
      ]
    },
The weirdest part is sometimes it works, sometimes it doesn’t. Even when the
app_version
attribute is the same. FYI I’ve checked
source
of
GBFeatureResult
, when the condition rule doesn’t work,
source
will be
defaultValue
Any thoughts on this?
A force rule without condition works more consistently tho.
f

fresh-football-47124

03/21/2023, 7:32 AM
Is it a race condition for setting the user attributes?
d

damp-motorcycle-90184

03/21/2023, 7:41 AM
Maybe, there’s some part in our code that set the new attribute set (adding additional attribute into existing attributes). But the
app_version
is included in both the attributes we use to call
GBSDKBuilderApp
and the updated attribute set. So it should be available to GrowthBook SDK all the time, no? Or could this problem happen because the gap when we are setting the new attributes?
f

fresh-football-47124

03/21/2023, 8:14 AM
It could be - would you like some support from our Kotlin dev?
d

damp-motorcycle-90184

03/21/2023, 8:15 AM
Let me check for the race condition our code first. If I need help, I’ll reach out to you gain. Thanks tho!
10 Views