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

🙏 [NEXTJS] Unable to use RUM without error #3068

Open
paul-roman opened this issue Oct 10, 2024 · 1 comment
Open

🙏 [NEXTJS] Unable to use RUM without error #3068

paul-roman opened this issue Oct 10, 2024 · 1 comment

Comments

@paul-roman
Copy link

paul-roman commented Oct 10, 2024

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:
Image

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? 🙏

@amortemousque
Copy link
Contributor

Hello @paul-roman,
Sry for the delay. I can't reproduce the issue locally.
Can you provide a minimal reproductible example?

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

No branches or pull requests

2 participants