Skip to content

[BUG] Getting maxCachedSessions error after deploying #603

Open
@Ryan-Adami

Description

@Ryan-Adami

Describe the bug

When accessing the website after deployment, the following error is thrown:

TypeError: Cannot read properties of undefined (reading 'maxCachedSessions')

The application uses KV for incremental cache. This error does not appear in development, only after deployment.

Steps to reproduce

  1. Deploy the app

  2. Visit the website.

  3. Observe the error in the logs or the browser.

Note: Using KV for incremental caching. The error appears to originate from a node module or underlying HTTP/HTTPS agent config.

Expected behavior

The website should load normally without throwing a TypeError. The KV-based cache should function as expected.

@opennextjs/cloudflare version

~1.0.0-beta.0 || ^1.0.0

Wrangler version

4.12.1

next info output

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.17.0
  npm: 10.8.2
  Yarn: 1.22.19
  pnpm: 8.10.0
Relevant Packages:
  next: 15.3.1 // Latest available version is detected (15.3.1).
  eslint-config-next: 15.3.1
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions