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

[RN][Android] First track() call after reopening app takes long time and freeze UI #669

Closed
sbongiz opened this issue Feb 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sbongiz
Copy link

sbongiz commented Feb 24, 2024

Expected Behavior

When reopening the application, the track() method should not block the UI.

Current Behavior

On fresh installation everything works fine, when reopening the application, the first (and only first) call to the track() method take more than 10 seconds and freeze the UI.

From the DEBUG Log:

Amplitude Logger [Debug]: {
  "type": "invoke public method",
  "name": "track",
  "args": [
    "user_click_tp",
    {
     SOME_PROPERTIES
    }
  ],
  "stacktrace": [
    SOME_STACK
  ],
  "time": {
    "start": "2024-02-24T16:18:40.800Z",
    "end": "2024-02-24T16:18:52.814Z"
  },
  "states": {
    "before": {
      "config.apiKey": "SOME_API_KEY",
      "timeline.queue.length": 0
    },
    "after": {
      "config.apiKey": "SOME_API_KEY",
      "timeline.queue.length": 0
    }
  }
}

Possible Solution

When this problem emerges, in Android Studio log I can find this two lines that usually don't show up:

W/Amplitude: Google Play Services not available for advertising id
W/Amplitude: Google Play Services SDK not found for app set id!

Note that if I trigger the same event immediately afterwards, it works without problems and I use Google Play Services for other things in the application that works even after the reopening.

Environment

  • SDK Version: "@amplitude/analytics-react-native": "1.4.7",
  • Installation Method: NPM
  • RN Version: 0.70.6
@sbongiz sbongiz added the bug Something isn't working label Feb 24, 2024
@izaaz
Copy link
Contributor

izaaz commented May 21, 2024

This issue was fixed in this PR:
#692

@izaaz izaaz closed this as completed May 21, 2024
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

2 participants