Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

features all always empty #15

Closed
engmsaleh opened this issue Jun 21, 2022 · 9 comments
Closed

features all always empty #15

engmsaleh opened this issue Jun 21, 2022 · 9 comments

Comments

@engmsaleh
Copy link

I'm getting always the features map empty, Any advice?

This is how I have implemented it

User? user = await getUser();
  var attributes = {
    'user_id': user?.id ?? '',
    'user_name': user?.name ?? '',
    'user_email': user?.email ?? '',
    'user_phone': user?.phone ?? '',
  };
  gb = GBSDKBuilderApp(
    apiKey: AppConstants.GROWTHBOOK_API_KEY,
    attributes: attributes,
    growthBookTrackingCallBack: (gbExperiment, gbExperimentResult) {},
    hostURL: AppConstants.GROWTHBOOK_HOST_URL,
  ).initialize();
  logDebug('GrowthBook initialized');
@DK070202
Copy link
Contributor

DK070202 commented Jun 23, 2022

Hey, @engmsaleh we have resolved it recently, can you try this?

replace your SDK dependency from

  growthbook_sdk_flutter: ^1.0.0

to

  growthbook_sdk_flutter: 
    git:
      url: https://github.com/alippo-com/GrowthBook-SDK-Flutter.git
      ref: master

@engmsaleh
Copy link
Author

@DK070202 I have tried, but still the same always empty

@DK070202
Copy link
Contributor

DK070202 commented Jun 23, 2022

Hey, @engmsaleh do you have any features on your dashboard? and make sure the value is on.

@engmsaleh
Copy link
Author

I have already three freatures
Screen Shot 2022-06-23 at 7 54 39 PM

@DK070202
Copy link
Contributor

DK070202 commented Jun 23, 2022

@engmsaleh can u show me logs from the terminal while initializing SDK?

@engmsaleh
Copy link
Author

Screen Shot 2022-06-23 at 9 47 47 PM

@engmsaleh
Copy link
Author

@DK070202 I have already joined the Slack group, What you want me to do?

@Chaitanyabsprip
Copy link

@DK070202 any updates?

@engmsaleh
Copy link
Author

@Chaitanyabsprip Yes, It was a problem with the racing condition and as @DK070202 suggested to make a refresh() before trying to access the features and it would work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants