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

featureFlagManager.flag throwing error on Android. #540

Closed
idrakimuhamad opened this issue Jan 5, 2024 · 3 comments · Fixed by #542
Closed

featureFlagManager.flag throwing error on Android. #540

idrakimuhamad opened this issue Jan 5, 2024 · 3 comments · Fixed by #542

Comments

@idrakimuhamad
Copy link
Contributor

I'm trying to do some exploration on Feature Flag using the RN SDK. Our account has been enabled for this.

The API are working on iOS. However, on Android its throwing error.

Airship.featureFlagManager.flag(flag).then((feature) => {
      console.log(`feature-flag: ${flag}`, feature)
      return feature
})

// TypeError: undefined is not a function

This is thrown at .flag as it appears this.module.featureFlagManagerFlag inside the AirshipFeatureFlagManager seems to be undefined. I looked at the source, it seems to be there.

SDK version 17.1.0

@idrakimuhamad
Copy link
Contributor Author

Further checking on the source code, it appear that the native method are not annotated with @ReactMethod. Both featureFlagManagerFlag and featureFlagManagerTrackInteraction miss this out. Adding this solve the issue.

@rlepinski
Copy link
Contributor

@idrakimuhamad Thanks for the report, will try to get it resolved today

@idrakimuhamad
Copy link
Contributor Author

I've actually created a PR here

#542

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

Successfully merging a pull request may close this issue.

2 participants