Summary
We are seeing cases where setCustomerInfo() does not seem to be fully applied to the next chat open.
For some users, the chat opens with:
- an old
groupId
- stale customer fields
- mixed/partially outdated customer info
This started to be reported relatively recently, but our Android integration code for opening LiveChat was not changed.
SDK version
com.github.livechat:chat-window-android:3.0.3
Platform
Our integration
We set customer data immediately before opening the chat:
LiveChat.getInstance().setCustomerInfo(
groupId = groupId,
name = visitorName,
email = visitorEmail,
customParams = customParams
)
LiveChat.getInstance().show(context)
groupId and customer fields are recalculated on each open based on the current app state.
Expected behavior
The latest values passed to setCustomerInfo() should be used when the chat is opened with show().
Actual behavior
For some users, the next chat open may still use:
- a previous groupId
- previous customer name/email
- previous or partially stale customParams
Important context
From the documentation, we understand that:
- the chat view is kept in memory by default
- the session is stored in WebView cookies
- customer properties may require recreating the view after the chat has already loaded
However, the behavior we see is still unclear from an integration perspective:
- setCustomerInfo() is called right before show()
- but the resulting chat state may still reflect older data
So our main question is whether this is expected SDK/session lifecycle behavior or a bug/regression.
Reproduction scenario
A simplified scenario:
- Initialize SDK
- Call setCustomerInfo(A)
- Call show()
- Close chat
- Change app-side user context / language / group
- Call setCustomerInfo(B)
- Call show()
Expected:
Observed:
- for some users, chat may still behave as if A is active, especially for groupId and some customer fields
Possible process death scenario
We also suspect the issue may be related to Android process death after the app stays in background for some time.
A possible scenario:
- User opens chat with setCustomerInfo(A) and show()
- App goes to background
- Android kills the app process
- User returns to the app later
- App process is recreated
- We calculate fresh values and call setCustomerInfo(B) before show()
- Chat still appears to use old session/customer context
From our analysis, this may happen because:
- groupId / customerInfo are stored in the SDK singleton in memory
- after process death, that in-memory state is lost
- but WebView session data / cookies may still persist
- so the restored chat session may take precedence over the newly provided customer info
This makes the behavior unclear from the integration side:
- app-side we provide fresh customer data before each show()
- but persistent WebView session may still restore older state
Questions
Could you please clarify:
- Is this expected behavior of the SDK/session lifecycle, or could this be a bug/regression?
- Can restored WebView session/cookies override the latest setCustomerInfo() values?
- Is destroyLiveChatView() required every time customer data changes?
- Is signOutCustomer() required when changing user identity or groupId?
- What is the recommended way to guarantee that newly calculated groupId and customer properties are always applied after process recreation?
Additional note
We can implement a workaround on our side by explicitly calling:
- signOutCustomer()
- destroyLiveChatView()
But before enforcing that, we want to confirm whether this is the intended lifecycle or an issue in the SDK.
Summary
We are seeing cases where
setCustomerInfo()does not seem to be fully applied to the next chat open.For some users, the chat opens with:
groupIdThis started to be reported relatively recently, but our Android integration code for opening LiveChat was not changed.
SDK version
com.github.livechat:chat-window-android:3.0.3Platform
Our integration
We set customer data immediately before opening the chat:
groupId and customer fields are recalculated on each open based on the current app state.
Expected behavior
The latest values passed to setCustomerInfo() should be used when the chat is opened with show().
Actual behavior
For some users, the next chat open may still use:
Important context
From the documentation, we understand that:
However, the behavior we see is still unclear from an integration perspective:
So our main question is whether this is expected SDK/session lifecycle behavior or a bug/regression.
Reproduction scenario
A simplified scenario:
Expected:
Observed:
Possible process death scenario
We also suspect the issue may be related to Android process death after the app stays in background for some time.
A possible scenario:
From our analysis, this may happen because:
This makes the behavior unclear from the integration side:
Questions
Could you please clarify:
Additional note
We can implement a workaround on our side by explicitly calling:
But before enforcing that, we want to confirm whether this is the intended lifecycle or an issue in the SDK.