Date of slack thread: 8/2/24
Anonymous: Hey folks! At the hair pulling phase here. I have an active flag set to 100% pass for everybody, and it always evaluates false. I’ve tried logging a test event from the client and that works. I really need a way to do basic troubleshooting, like print all of the available flags from the client. Is that possible? Also, if there’s some well known reason why a seemingly active flag would not actually be active, please let me know. Lost a few hours here.
Anonymous: Hi Shawn, sorry to hear that. We have some general debugging advice documented here: https://docs.statsig.com/sdk/debugging. Could you elaborate on which sdk you are using? How are you initializing and checking the gate?
Anonymous: I can, but just to be clear, these two things should be mutually exclusive:
Anonymous: On the right you see allow all is set, and it says no rules below (including fallback) will be assessed
Anonymous: But then in the logs it says no conditions were met?
Anonymous: Setup aside, the default rule should not be a possibility here, right?
Anonymous: The “Reason” provided for the fail in my client is “NoValues” - that reason is not represented in the debugging guide.
Anonymous: My setup is with expo, I’ve checked to ensure userInfo is populated:
const userInfo = {
userID: user._id,
email: user.email,
}
const myStatsigClient = new StatsigClient(
STATSIG_CLIENT_KEY,
userInfo,
// { environment: { tier: NODE_ENV } },
)
const warming = warmCachingFromAsyncStorage(myStatsigClient)
return (
<StatsigProviderExpo client={myStatsigClient} cacheWarming={warming}>
{children}
</StatsigProviderExpo>
)
Anonymous: Yeah no values happens when you dont initialize from the network. In this case, it looks like you are loading values from async storage but never fetching the most up to date values from the network - so your cache will always be empty. Sadly it looks like our react native docs were incomplete here - you need to add an initialize async call like the react sdk: https://docs.statsig.com/client/javascript-sdk/react#asynchronous-initialization-network
Anonymous: The warming feature doesn’t handle this?
Anonymous: Ah that’s just async cache
Anonymous: Yeah. Unfortunately it looks like both the react native and react native expo docs missed the actual network initialization step. Im adding that now
Anonymous: Awesome, thanks so much for the help