Skip to content

Amplitude sessions abnormally long on Android #1055

Open
@jetaix

Description

@jetaix

We’ve noticed an issue with our session length on Android, which looks significantly high (around 25 minutes) compared to iOS and web, which is around 2 minutes.

Plugins @segment/analytics-react-native-plugin-amplitude-session

On Amplitude we use the default "Session definition"

Is anyone else experiencing this?

Amplitude chart:
Image

User Session exemple:

Image

We’re starting an investigation on our end.

Regarding the code, the issue could be related to the setTimeout (on Android), which may pause when the app is sent to the background and resume when it returns to the foreground and never reseted. This behavior could cause an abnormally long session duration

We use

    "react-native": "0.76.7",
    "@segment/analytics-react-native": "^2.20.3",
    "@segment/analytics-react-native-plugin-amplitude-session": "^0.4.0",
    "@segment/sovran-react-native": "^1.1.3",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions