fix(05-03): parse session response before passing to updateSessionInfo

CRITICAL BUG:
- refreshCurrentSessionRest passed raw Response object to updateSessionInfo
- Should parse with response.json() first
- Caused two major issues:

ISSUE 1: Redux Serialization Error
- Response object dispatched to Redux (non-serializable)
- Error: "A non-serializable value was detected in an action"

ISSUE 2: Backing Tracks Never Extracted
- updateSessionInfo received Response instead of parsed data
- response.participants was undefined (Response has no participants property)
- Backing track extraction code never ran
- mixerHelper.backingTracks stayed empty

SOLUTION:
Parse response before passing to updateSessionInfo:
  const response = await getSession(currentSessionIdRef.current);
  const data = await response.json();  // ← ADDED
  updateSessionInfo(data, callback, force);

Now data.participants exists and backing tracks are extracted correctly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Nuwan 2026-01-16 13:13:50 +05:30
parent 3c2930092b
commit 56573c6db7
1 changed files with 2 additions and 1 deletions

View File

@ -734,7 +734,8 @@ export default function useSessionModel(app, server, sessionScreen) {
try {
const response = await getSession(currentSessionIdRef.current);
updateSessionInfo(response, callback, force);
const data = await response.json();
updateSessionInfo(data, callback, force);
} catch (jqXHR) {
if (jqXHR.status !== 404) {
app.notifyServerError(jqXHR, "Unable to refresh session data");