What are you trying to achieve and what is your issue? Please describe.
I used the official doc to install RUM on my Next.js application, and it's working like a charm on a dev environment.
However, whenever the code goes to staging/production I run into an error: datadogRum.init seems to be working just fine, as well as setUser, however when I turn debug on using ._setDebug(true), I get an error whenever I load a page or whenever I try to .startView manually:

This error seems to come from this line in the RUM source code (browser-sdk/packages/core/src/domain/session/sessionManager.ts) :
function buildSessionContext() {
return {
id: sessionStore.getSession().id!, // <------ HERE
trackingType: sessionStore.getSession()[productKey] as TrackingType,
isReplayForced: !!sessionStore.getSession().forcedReplay,
}
}
I use the 5.28.0 version.
Does anyone has any clue about this? 馃檹
What are you trying to achieve and what is your issue? Please describe.

I used the official doc to install RUM on my Next.js application, and it's working like a charm on a dev environment.
However, whenever the code goes to staging/production I run into an error:
datadogRum.initseems to be working just fine, as well assetUser, however when I turn debug on using._setDebug(true), I get an error whenever I load a page or whenever I try to.startViewmanually:This error seems to come from this line in the RUM source code (
browser-sdk/packages/core/src/domain/session/sessionManager.ts) :I use the 5.28.0 version.
Does anyone has any clue about this? 馃檹