Skip to content

hCaptcha fails on client navigation with cacheComponents in Next.js #366

@feenko

Description

@feenko

Overview

When using Next.js with cacheComponents enabled in next.config.ts - hCaptcha throws unknown error.

const nextConfig: NextConfig = {
  /* config options here */
  reactCompiler: true,
+ cacheComponents: true
};

Steps to reproduce

  1. Run feenko/hcaptcha-next-cache-components
  2. Visit index page and once hCaptcha container finishes loading click "Go to secondary page"
  3. Once on secondary page wait for hCaptcha container to finish loading again and click "Go to primary page"
  4. You should see following error:
Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions