Hello! So we are experiencing an odd issue where d...
# ask-questions
s
Hello! So we are experiencing an odd issue where disabling Growthbook features in the console is not reflecting in the app. When we debugged the code, we saw that even though the calls to GB were showing that features had changed, the
GrowthBookBuilder
refreshHandler
was still saying
refereshed = false
. We were wondering if there was some level of cache happening that was preventing the GB SDK from getting the latest state. We gave it over 30 min but the SDK is still not getting the correct refreshed state. Can you help us figure out what might be happening?
r
Hi Sean 👋 Do you mean that disabling a feature in the GrowthBook dashboard does not disable the feature in your application? Or are you talking about ­disabling a feature using the GrowthBook CLI tool?
Which SDK are you using. by the way?
b
we are using the swift sdk
r
Thanks for confirming the SDK. Please clarify my understanding by answering my question above about the GrowthBook UI / CLI so I can assist further.
b
using the UI specifically
@square-match-9058 do you want to add august to our debug session?
s
Hi August, sorry we are still continuing to debug. We are using the GB Dashboard for disabling features.
We are using SDK version 1.0.56
for iOS
So @brief-honey-45610 for a little more detail. We appear to be experiencing an environment issue although we cannot explain it at all. When we test the same scenarios in our Dev and Stage environment, we get different behavior from the GB SDK. There are no code changes happening when we are testing the two environments. Here is how we are testing: Development Environment: • We started with the feature off in the GB dashboard. We used postman to verify the calls to our Dev GB were returning that the feature was off. We then installed and debugged the app and verified that we were not receiving any features from the SDK. • We then enabled a feature, used postman to verify the feature showed in the GB call and then debugged the app and saw the feature was now showing in the SDK. • Lastly we disabled the feature, used postman to verify no features in the call and then debugged the app and saw no feature being returned by the SDK. This is exactly what we would expect to see from GB. Stage Environment:We started with the feature off in the GB dashboard. We used postman to verify the calls to our Stage GB were returning that the feature was off. We then installed and debugged the app and verified that we were not receiving any features from the SDK.We then enabled a feature in GB dashboard, then used postman to verify that the feature was showing in the GB call but this time the SDK would not show the feature enabled. We waited well over 30 mins for any caches to clear but the SDK never showed the feature enabled. • We then tried it in reverse, where we started with the feature on, verified the feature showed on in postman, installed the app, debugged and verified in the SDK that the feature was on. Then disabled the feature in the GB dashboard and even though we could see the feature disabled in the GB calls, the GB SDK never updated and continued to show the feature as enabled. Again we waited well over 30 min for caches but it never updated. We cannot explain this discrepancy between environments. We triple checked in the app and Postman that we were using the correct keys to point to the correct environments. I know this was lengthy but any help you can provide us would be appreciated.
@brief-honey-45610 One of our devs figured out the missing piece. Apparently if no features are sent then the SDK does not recognize that a change has occurred so the feature array never gets updated. Its probably something that needs to be fixed in the SDK but we can work around it for now by always sending one enabled feature. Thanks!
r
Hi Sean, thanks for the update and props to you for isolating the cause of the odd behavior! We will make a GitHub issue for this on the Swift SDK repo and post a link to it here once it's live.
b
thank you so much!
😀 1