Skip to content

onFeatureFlags isnt triggered on some mobile web devices #530

@sirpy

Description

@sirpy

Bug description

We are using posthog-react-native package also on web.
We have encountered an edge case where on some mobile devices with chrome browser the feature flags do not seem to be loaded.

  1. posthog.onFeatureFlags callback isnt called
  2. using useFeatureFlag* hooks return undefined

Observations:

  • When calling posthog.reloadFeatureFlags() it then works
  • In network tab we can see that all feature flags are prefetched correctly before calling posthog.reloadFeatureFlags

How to reproduce

  1. android chrome 137.0.7151.72
  2. call posthog.onFeatureFlags -> nothing happens
  3. call posthog.reloadFeatureFlags -> callback triggered

Related sub-libraries

  • All of them
  • posthog-web
  • posthog-node
  • posthog-ai
  • posthog-react-native

Additional context

Thank you for your bug report – we love squashing them!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requestedreact-nativeweb

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions