API call trackSessionStart is unsupported in the current state | Adobe Analytics

Environment

Question

While tracking core video playback, sometimes it encounters the following error in the browser console:

[ERROR] [MediaHeartbeat] API call trackSessionStart is unsupported in the current state.

What is the most common reason behind the error?

Answer

The most common root cause of the error is an issue in the Heartbeat implementation. If the implementation is creating a duplicate session (trackSessionStart API is called twice) or previous video session has not been closed properly (trackSessionEnd API not called for the previous session), the Heartbeat library does not trigger because of the error.

To resolve the error and rule out the most common mistake, check the following:

The trackSessionStart API is not called twice or there is no duplicate session existing.

The trackSessionEnd API has been called for the previous session before starting a new trackSessionStart API session.

If the trackSessionStart and the trackSessionEnd APIs are found to be in order, Adobe Customer Care can assist further in finding the issue.