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

The session id value is not set #154

Open
KChernenko opened this issue Oct 23, 2023 · 7 comments
Open

The session id value is not set #154

KChernenko opened this issue Oct 23, 2023 · 7 comments
Labels
question Further information is requested

Comments

@KChernenko
Copy link

KChernenko commented Oct 23, 2023

Summary

Hi, I'm trying to migrate to this brand-new SDK. However, the Session ID property is always -1 despite the following configuration:

Configuration(
   apiKey = "the-key-value"
   optOut = true, // Disable data collection due to GDPR (will be enabled after user consent)
   context = application,
   locationListening = false,
   defaultTracking = DefaultTrackingOptions(
       appLifecycles = false,
       sessions = true,
       deepLinks = false,
       screenViews = false
      )
)

UPD: The event stream has two groups of events: green and blue. The blue ones have a value for the Session ID set correctly, but the green ones have a -1 value.
What am I doing wrong? Or maybe I am missing something?
Screenshot 2023-10-23 at 22 38 56

@KChernenko KChernenko added the question Further information is requested label Oct 23, 2023
@qingzhuozhen
Copy link
Contributor

Hi @KChernenko, thanks for reporting the issue. Would you mind sharing the link to the event you posted?

@KChernenko
Copy link
Author

@qingzhuozhen, can I do this via private DM?

@qingzhuozhen
Copy link
Contributor

Hi @KChernenko, it is fine to share the link here since it is behind authentication so others won't be able to access it. Or you can submit via our support if your org is a paying customer.

@KChernenko
Copy link
Author

KChernenko commented Oct 24, 2023

@qingzhuozhen
Copy link
Contributor

Hi @KChernenko, I found the issue. It is basically for during optOut, some logic from our lifecycle got skipped and then later optIn, the session value is not updated. This is an edge case and we are trying to figure out the best ways to solve it.

@KChernenko
Copy link
Author

@qingzhuozhen Hi! Do you have any updates on the issue?

@satyajitvure91
Copy link

satyajitvure91 commented Jun 10, 2024

Hello, I think this issue affects my application as well. My amplitude setup is similar to OP's with optOut set to true initially and set to false later after a successful login and some conditions are met.

Steps to Reproduce:

  1. a current session is in progress with optOut set to false
  2. App is backgrounded
  3. Tap push notification.
  4. Set a user property using amplitude.identify(identify.set(KEY, value))

Expected result:
User property can now be seen on the following events.

Actual Result:
User property is not attached to the events.

I can provide more information if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants