PostHog / posthog-js-lite

Reimplementation of posthog-js to be as light and modular as possible.
https://posthog.com/docs/libraries
MIT License
69 stars 36 forks source link

PostHog Android Simulator #280

Closed andrewchester1 closed 1 month ago

andrewchester1 commented 1 month ago

Android Simulator PostHog

Currently I am using posthog-react-native with my android simulator(Dev Builds), but none of my events are going to PostHog. If I use expo go on my real device, I am able to get everything working. Does posthog-react-native not work with android simulators? I have gotten this to work with iOS simulators before, but this is my first time trying android simulators.

How to reproduce

  1. npx expo prebuild
  2. npx expo run:android
  3. Check if any events show up in PostHog Dashboard

Related sub-libraries

Additional context

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

marandaneto commented 1 month ago

Hello @andrewchester1 No issues that I am aware of, I just tested everything, and its working just fine. Have you enabled the debug mode and checked the logs? It could be that your emulator isn't setting up the network correctly but it's an emulator issue and not a PostHog issue.

andrewchester1 commented 1 month ago

Hi @marandaneto By debug mode are you referring to the "open debugger" built into expo, which opens a chrome debugger? Or are you referring to something else? I do agree this could be something with my emulator network setup.

marandaneto commented 1 month ago

Hi @marandaneto By debug mode are you referring to the "open debugger" built into expo, which opens a chrome debugger? Or are you referring to something else? I do agree this could be something with my emulator network setup.

PostHog debugging property, for example, you can do: posthog.debug(true) before capturing an event and check the LogCat logs on Android

andrewchester1 commented 1 month ago

@marandaneto It seems that our tech team has some internal issues relating to this. Thank you for all your help though!

marandaneto commented 1 month ago

Cool, let us know if you need any assistance.