Hi GrowthBook Team, I got the growthbook pro for s...
# ask-questions
w
Hi GrowthBook Team, I got the growthbook pro for scoping sticky bucketing for a flutter app, followed the documentation and tried the example code which you've provided with the flutters growthbook-sdk, In the experiment result getting the sticky bucketing not used. I have turned on sticky bucketing in the general settings. also added a debugger in the sticky bucketing service it was always saving the
saveAssignment
and
getAssignment
was never called, even if i try to fetch the feature flag repeatedly in single app life cycle. am i missing something here? the init code:
Copy code
void initializeSDK() async {
    gb =
        await GBSDKBuilderApp(
          hostURL: 'myHostUrl',
          apiKey: "myApiKey",
          attributes: userAttr,
          growthBookTrackingCallBack: (trackData) {},
          gbFeatures: {'some-feature': GBFeature(defaultValue: true)},
          stickyBucketService: LocalStorageStickyBucketService(),
          backgroundSync: true,
        ).initialize();
    setState(() {});
  }
feature eval code:
gbValue = gb?._feature_('some-feature').value._toString_() ?? '';
@freezing-postman-69602 ^
a
@strong-mouse-55694
f
Checking... Did you notice any errors or warnings in the logs related to sticky bucketing?
w
not really.
as i mentioned the save assignment log was getting printed. no log related to get assignment tho. went through more of the sdk's implementations, added related observations here: https://github.com/growthbook/growthbook-flutter/issues/81#issuecomment-3069210617
a
anything we are doing wrong @freezing-postman-69602
w
logs for ref:
Copy code
I/flutter (24616): ✅ Features refreshed
I/flutter (24616): ✅ GrowthBook SDK initialized
[log] Content saved successfully to: featureCache
[log] Content saved successfully to: featureCache
I/flutter (24616): saved sticky assignment: id||foo_bar && [123, 34, 97, 115, 115, 105, 103, 110, 109, 101, 110, 116, 115, 34, 58, 123, 34, 101, 120, 112, 95, 49, 95, 101, 103, 95, 95, 52, 34, 58, 34, 48, 34, 125, 44, 34, 97, 116, 116, 114, 105, 98, 117, 116, 101, 78, 97, 109, 101, 34, 58, 34, 105, 100, 34, 44, 34, 97, 116, 116, 114, 105, 98, 117, 116, 101, 86, 97, 108, 117, 101, 34, 58, 34, 102, 111, 111, 95, 98, 97, 114, 34, 125]
I/flutter (24616): Tracking: exp_1_eg, value: Control
I/flutter (24616): Feature 'some-feature' evaluated: value=Control, on=true
[log] Content saved successfully to: gbStickyBuckets__id||foo_bar
f
yes, I see why! there's refresh method using stale attributes, due to which the
getAssignment
call is never being triggered. thanks for reporting it. we're working on it and let you know when it is ready for testing.
1