Hi, I need help. The problem is that in this examp...
# sdk-flutter
f
Hi, I need help. The problem is that in this example growthBookTrackingCallBack is never called. For debug purpose I tried to call growthbook.run() explicitly - then growthBookTrackingCallBack is called. Experiment setup is to use 100% of traffic with no filtering. Environment and project is the same for test, sdk and feature.
c
Hi @fierce-teacher-22952. Let us check that and we will write asap.
Hi @fierce-teacher-22952. We have investigated your issue and found two things that could help. First, in your code you’re using qaMode: kDebugMode. According to the docs: “If qaMode is true, random assignment is disabled and only explicitly forced variations are used.” This means that trackingCallback will not be triggered unless the variation was explicitly forced. Second, we had an issue where the hostURL must end with a slash. So you should use: hostURL: ‘https://cdn.growthbook.io/’ for now. We’re planning to fix this behavior soon.
f
I removed qaMode and changed hostURL, but result is the same. Tested on android, growthbook_sdk_flutter: ^3.9.10
c
Please let us recheck that.
Are you currently in the experiment, and do you have a feature in the experiment?
Because we are testing that with your code and it is calling trackingCallback.
And are you adding in a right way here ? We need to add there Experiment and ExperimentResult
f
I have different signature
I see that signature changed in package version 3. Which version should I use?
c
Yes, sorry. We have updated the version to yours and it is working too, but we tried on the iOS. We will try to run on the android too. And have you checked the experiment?
f
Yes, I did. Experiment is running, 100% traffic, no pre-condition, environment and project are the same for sdk, feature and experiment.
👍 1
c
Oh, got it.
f
changing to growthbook_sdk_flutter: 3.9.9 is not working too
c
We will try to investigate more what could be wrong. Because on our side it is calling that method.
f
I'm here if you need any assistance
🙌 1
Copy code
growthBook = await initGrowthbook();
    final experiment = GBExperiment(
      key: 'offer_card_show_only_first_image',
      variations: [false, true],
    );
    showOnlyFirstImage = growthBook!.run(experiment).value;
this way it works. At least it calls callback.
c
So maybe the problem was that the experiment was not pulled up somehow. For now it is working?
f
Looks like all is working now. Version 3.9.10. Looks like the problem was in qaMode only.
Thank you for helping me!
🙌 1
c
You are welcome and thank you for quick reply. Have a nice day!