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

Crash reports coming from hasFeature() #84

Closed
marcshilling opened this issue Sep 3, 2021 · 5 comments
Closed

Crash reports coming from hasFeature() #84

marcshilling opened this issue Sep 3, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@marcshilling
Copy link

We are using "react-native-flagsmith": "1.6.2" in our production iOS/Android apps and we are seeing occasional crash reports coming from within your library on lines where we call flagsmith.hasFeature().

On Android devices it comes through as:
image

On iOS:
image

@dabeeeenster
Copy link
Contributor

Hi @marcshilling - thanks for raising this. Are you able to provide some more info:

  • Are you able to reproduce these errors locally?
  • Is there any additional info in the full stack trace?
  • Are you able to provide the get flags curl or JSON response you get from the API that generates this error?
  • Is it repeatable or does it only happen from time to time?

@dabeeeenster dabeeeenster added the bug Something isn't working label Sep 6, 2021
@marcshilling
Copy link
Author

Hey there @dabeeeenster.

  • No, I've never gotten this locally...only seeing via Sentry crash reports from our production apps.
  • The rest of the stack trace isn't really valuable...it's just our app's code tracing back from the line where we call hasFeature()...if you're curious: {flagsmith.hasFeature('ads_enabled') && <Advertisment />} to conditionally render an ad.
  • I'm not sure about the API response because like I said I can't reproduce this and it's happening in react-native-flagsmith's code.
  • We're only seeing this from a very small percentage of our users. In the last 14 days it's occurred 21 times for 4 iOS users and 106 times for 97 Android users when we have likely had over a half million users in that timeframe. The iOS users have different devices but all are on iOS 14.7.1. On Android it's a variety of devices on Android 9, 10, and 11.

For the time being we've wrapped our hasFeature() calls in a try/catch which hopefully resolve our app-side issues, but the error reports are still coming in from your module. Also, if it matters, we are on a self-hosted Flagsmith instance.

@dabeeeenster
Copy link
Contributor

Are you able to log the response from the API that is causing the failures via the SDK somehow? @kyle-ssg are there any hooks for this? Ideally logging the JSON payload from the API?

@kyle-ssg
Copy link
Member

This is fixed as of 1.6.7 of react-native-flagsmith and flagsmith. Basically this was a super slim usecase whereby the previous analytics events hadnt been read from local storage at the point when tracking new events.

@kyle-ssg
Copy link
Member

@marcshilling Feel free to re-open this if you spot the issue after updating to this version 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants