Getting 0 features returned and unknownFeature value for features that exist.
Closed this issue · 10 comments
I followed the docs to intialize the SDK, but am getting 0 features returned from the initialized object.
Could you please specify SDK version?
I am using:
1.0.3 as stated in the documentation.
val attrs = HashMap<String, Any>()
attrs["userEncodedUuid"] = userId ?: ""
gb = GBSDKBuilder(
// Fetch and cache feature definitions from GrowthBook API
// If self-hosting, we recommend using a CDN in production
apiKey = "-----",
hostURL = "https://cdn.growthbook.io",
attributes = attrs,
trackingCallback = { gbExperiment, gbExperimentResult ->
// track in your analytics system
Segment.analytics.track("User Viewed Experiment",
Properties()
.putValue("experimentId", gbExperiment.key)
.putValue("variant", gbExperimentResult.variationId.toString()))
}
).initialize()
I set --- as apiKey for security in the comment only.
Strangely it works fine on iOS SDK so I know the feature and experiment is configured properly. I have also tried using 1.1.34
Could you please try to use our latest SDK version (1.1.41)?
I just tried. It is still the same unfortunately. How is it possible that 0 features get returned? Is this an issue on the Android SDK or is it an issue with the features setup a certain way? It works for our iOS app so I am stuck now.
I just fetched my feature in my app successfully.
Maybe something is obfuscated in your app.
Do you have other communication channels where we can clarify your issue? Do you have GrowthBook slack (growthbookusers.slack.com)?
I am not a member there now. It seems I need invite.
Could you please provide me your email in order to invite you to the slack?
Solved with refreshCache() call.