brief-honey-45610
09/21/2023, 4:04 AMhundreds-thailand-97888
09/29/2023, 2:19 PMFields [name, passthrough] are required for type with serial name 'com.sdk.growthbook.Utils.GBVariationMeta', but they were missing at path: $.features['my-feature'].rules[0].meta[0]
Is there some configuration I could be missing, or could this be a problem within the SDK? I am using version 1.1.38few-cartoon-95517
11/14/2023, 5:00 PMbrief-honey-45610
01/10/2024, 4:48 PMancient-car-96302
01/10/2024, 6:57 PMimportant-zebra-55422
01/10/2024, 7:46 PMname
etc. @nice-book-34304 our android developer is here. Kenji, thanks for coming in and if you could clarify what we see, that'd be great.ancient-car-96302
01/10/2024, 7:49 PMfast-cpu-81722
01/17/2024, 8:54 PMgrowthBookSDK._feature()_
returns null. If I kill the app and start again, I'm getting the correct value. I'm guessing that I'm trying to get the feature before Growthbook fetches it from the server.gentle-glass-72054
02/22/2024, 8:48 AMLong
? I tried using the number
type in the GB dashboard, but it sends the value back as an Int
instead.brief-honey-45610
03/14/2024, 3:35 PMbrief-honey-45610
03/18/2024, 7:42 PMfast-cpu-81722
03/20/2024, 4:34 PMtrackingCallback
to logs experiment view. Looking at our logs we are seeing event being logged when the application is in background and at random hours. I was not able to reproduce and from the testing i have done, the trackingCallback
is only triggered the first time we get a feature. Any idea what would cause this issue?plain-pharmacist-9564
05/31/2024, 3:08 PMtrackingCallback
(in initialize https://docs.growthbook.io/lib/kotlin) is called every first time a feature flag is “requested” from the sdk, killing the app and restarting will trigger a new callback call and send a new assignment event to our data warehouse.
I assume we can later on just run a min(timestamp)
on the assignment events, but I would like to double check that this is expected 😊dazzling-answer-34446
07/02/2024, 4:55 PMtrackingCallback
- I notice it always comes back as null
.
Am I correct is expecting this to be the name we set for the experiment on the portal? 🤔flaky-noon-11399
10/08/2024, 11:47 AMflaky-noon-11399
10/11/2024, 8:18 AMflaky-noon-11399
10/31/2024, 12:52 PMgrowthBookSDK.setForcedFeatures(mapOf("my_feature" to true))
I also tried setting QAMode
to true, but I think that controls forcedExperiments
and not forcedFeatures
?" Is there anything missing from their config to override the value?brief-honey-45610
11/25/2024, 8:02 PMThere was a recent change to the kotlin SDK where they made some attributes inprivate. We depended on that to log GrowthBook failures, so I'm hoping it can be made public again. I left a comment in the PR here: https://github.com/growthbook/growthbook-kotlin/pull/149/files#r1857236623.GBError
orange-book-30667
12/17/2024, 9:54 AMAny?
. Please help me understandorange-book-30667
01/28/2025, 1:30 PMGBFeature.defaultValue
to internal
in your recent alpha?ancient-car-96302
02/04/2025, 10:31 AMfresh-guitar-29838
02/05/2025, 1:02 AMancient-car-96302
02/26/2025, 10:03 AMfresh-guitar-29838
03/19/2025, 11:19 PMforcedFeatures
broke in the latest version of the kotlin SDK.
forcedFeatures
recently changed from Map<String, Any>
to Map<String, GBValue>
. The problem is that GBFeatureEvaluator
wasn't updated, and it's still using Any here. That means than when actually evaluating a forced feature, it's expecting a JsonElement instead of a GBValue over here. Instead of returning the forced value, it instead returns GBValue.Unknown
.
Further, there is another bug where GBValue.Unknown
is parsed as isOn=true
, instead of false. That is happening over here. The default should be false
, not true
, so this logic is incorrect.
You can see where I printed out the `GBFeatureResult`:
GBFeatureResult(gbValue=Unknown, on=true, off=false, source=override, experiment=null, experimentResult=null)
Thank you!orange-book-30667
03/27/2025, 11:21 AMtrackingCallback
is called every time a feature is evaluated, even if there seems to be some code that's meant to prevent it (com.sdk.growthbook.evaluators.GBExperimentHelper).
If I'm not mistaken seems like the object or the context is created at every evaluation making the function pointless.
Can somebody take a look at it?
I'm still running version 2.0.0 but 3.1.0 seems to be affected the same.flaky-noon-11399
05/12/2025, 10:55 AMbrave-controller-43565
05/22/2025, 10:18 AM/* visible for test */ var forcedFeatures: Map<String, GBValue> = emptyMap()
Then i checked inside de sdk , that in the evaluateFeature
function it is happening that
/**
* Global override
*/
if (forcedFeature.containsKey(featureKey)) {
if (evaluationContext.loggingEnabled) {
println("Global override for forced feature with key: $featureKey and value ${forcedFeature[featureKey]}")
}
return prepareResult(
featureKey = featureKey,
gbValue = forcedFeature[featureKey]?.let(GBValue::from),
source = GBFeatureSource.override,
)
}
and the most important thing.
gbValue = forcedFeature[featureKey]?.let(GBValue::from),
This is getting me an unexpected result becasue de function from
makes that
internal fun from(anyObj: Any): GBValue =
when(anyObj) {
is Boolean -> GBBoolean(anyObj)
is String -> GBString(anyObj)
is Number -> GBNumber(anyObj)
else -> Unknown
}
But my forcedFeature map never gonna be fine, because is Map<String, GBValue>
and always is gonna go dor the else case.
Is this a bug or what im doing bad at time of force an experiment result.
Also you can tell me how works setForcedVariation, because i putted the experiment key or feature key and 0 or 1 but is not workingbrave-controller-43565
05/22/2025, 10:55 AMrun(experiment: GBExperiment)
but usually in my project we use feature(id: String)
Ok , i faced that its running evalExperiment also, forget that :Dflaky-noon-11399
07/18/2025, 2:29 PMgrowthbook_id
, is being assigned to different variations by the two SDKs.
After initializing both SDKs, I set up the same attributes and captured the ExperimentResult
logs. Here’s a representative comparison:
Android SDK (current implementation):
Experiment ab-app-multiple__double-points result: {"id":"doublePoints","enabled":true,"configuration":{...}}
hashAttribute: growthbook_id -> 7662e35d-57a9-49bd-a0b6-db2268ad0439
bucket: -> null
variationId: -> 1
J*ava SDK (our new integration):*
Experiment ab-app-multiple__double-points result: {id=doublePoints, enabled=false}
hashAttribute: growthbook_id -> 7662e35d-57a9-49bd-a0b6-db2268ad0439
bucket: -> 0.4606
variationId: -> 0
Both SDKs correctly pick up the same growthbook_id
, but produce different bucketing outcomes:
• The Android SDK consistently returns null
for the bucket but assigns the user to variation 1
(variant).
• The Java SDK returns a valid bucket (0.4606
) and assigns the user to variation 0
(control).
These tests were performed on the same device, without using any proxy or intermediate layer—just a direct call to GrowthBook apiHost with the same apiKey. This suggests a potential inconsistency in how the SDKs compute the hash/bucket based on the provided attribute.
To further investigate, I tested other growthbook_id
values and observed inconsistent results:
• `7662e35d-57a9-49bd-a0b6-db2268ad0439`: Android SDK → variant, Java SDK → control
• `1a2f94b5-667e-4a7d-9823-8d4bf611085c`: Android SDK → control, Java SDK → variant
• `23aa8888-97fe-4c57-9a57-f3517fa1f89c`: Android SDK → variant, Java SDK → control
• `3145ff6a-2148-48cb-b032-7f1892380a17`: Android SDK → variant, Java SDK → control
• `07b18ce4-6311-42ae-9bd9-68cd5e2623fc`: Android SDK → variant, Java SDK → variant
Given that the same inputs yield different results, this seems like something internal to how each SDK handles hashing and bucketing. Do you happen to know if there’s a known difference in hashing logic between the Java and Android SDKs? Or is there a recommended way to ensure parity?
Any insights or suggestions on how to approach this would be greatly appreciated!