Hi team! We have a quick question, how do we go ab...
# ask-questions
b
Hi team! We have a quick question, how do we go about implementing a version check for feature override rules? We would like to be able to target specific versions of our application to modify behaviors but our current implementation (second screenshot) doesn't seem to work, it leads to a crash when we load our React Native app. Dows GB support this or are we on the right path?
Bump for help.
s
That does look right. Are you using version targeting as shown here? https://docs.growthbook.io/features/targeting#semantic-version-targeting
b
We are yes, but it just crashes when we launch app and do our GB check:
s
Is it only when this attribute check is in place? Or in general?
b
Only when the attribute is checked, and that specific version check. Our platform check works perfectly. @strong-mouse-55694
s
Thanks. I'll see if I can debug this, and I'll also pass it on to the team.
r
Hey John, I tried to repro this issue on our latest versions of SDK and GrowthBook but I was not able to. Can you confirm for me which version of GB are you using (if self-hosted) otherwise can you confirm you are on cloud? And also what's the version of the Growthbook React SDK installed?
Additionally, I do see that your attribute is defined as
version
in GB but when setting the attribute on the app you are using
appVersion
. Is this intentional? And how are they different from one another?
b
Hey @rich-waiter-91074 sorry for the delayed response, was OOO yesterday. Our React version is: 0.19.0 Our GB is Self Hosted on: Build: c64dbbe (2023-07-26) I do not know the answer on the appVersion difference. Do those attributes need to be 1:1 named?
r
I do not know the answer on the appVersion difference. Do those attributes need to be 1:1 named?
Yes, you are setting the attributes values based on the name, which you then compare in the Growthbook to take appropriate actions. But this should not be crashing the app.
Unfortunately that's a very old version so it'll be hard for me to provide support for -- I would recommend upgrading both SDK version and GB self-hosted version to the latest and see if the problem still occurs.
b
Thanks for the feedback, we will update the attribute name and verify if that resolves. Else we will plan to upgrade the packages and revisit, appreciate the help.