#4204·openreplay

Next.js CSS assets are incorrectly proxied in self-hosted OpenReplay

Author: Valar353Created Jan 19, 2026Updated Sep 16, 2026
Labelsbugtracker

Describe the issue When using self-hosted OpenReplay with a Next.js application, session replays are recorded without correct CSS styles.

The issue does not occur with a regular React or Nuxt.js application using the same OpenReplay instance.

It looks like OpenReplay generates invalid proxied asset URLs for Next.js CSS files.

Steps to reproduce the issue

  1. Create a clean Next.js application(npx create-next-app@latest next)
  2. Expose the application using ngrok
  3. Deploy self-hosted OpenReplay on an Ubuntu machine(https://docs.openreplay.com/en/deployment/deploy-ubuntu/)
  4. Install and configure the OpenReplay SDK for Next.js (https://docs.openreplay.com/en/sdk/using-or/next/#app-router-v14---use-client)
  5. Expose the admin panel using ngrok
  6. Open the application via the ngrok URL, interact with the page, and record a session

Observed result

  1. The Next.js application renders with correct styles when accessed directly via the ngrok URL.
  2. During replay:
  • CSS styles are missing
  • CSS assets are rewritten into invalid URLs like /sessions-assets/https%213A%212F%212F<ngrok-domain>%212F_next%212Fstatic%212Fchunks%212F...

OpenReplay Environment

  • Frontend stack: Next.js
  • OpenReplay version: 1.24.0
  • Tracker version: 17.1.5
  • Tunnel: ngrok