diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/client-component/page.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/client-component/page.tsx
deleted file mode 100644
index b1d7f708cfae..000000000000
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/client-component/page.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-export default function Page() {
- return (
-
-
Press to throw:
-
-
- );
-}
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx
deleted file mode 100644
index f3ef34cd8b91..000000000000
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-export default function RootLayout({ children }: { children: React.ReactNode }) {
- return (
-
- {children}
-
- );
-}
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/page.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/page.tsx
deleted file mode 100644
index 1caf96ed7786..000000000000
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/page.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import * as Sentry from '@sentry/nextjs';
-import Link from 'next/link';
-
-export default function Home() {
- return (
-
- {
- Sentry.captureException(new Error('I am a click error!'));
- }}
- />
-
- navigate
-
-
- );
-}
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/user/[id]/page.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/user/[id]/page.tsx
deleted file mode 100644
index bdb52ea5547a..000000000000
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/user/[id]/page.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-export default async function Home() {
- const dynamid = await (await fetch('http://example.com', { cache: 'no-store' })).text(); // do a fetch request so that this server component is always rendered when requested
- return I am a blank page :) {dynamid}
;
-}
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore b/packages/e2e-tests/test-applications/nextjs-app-dir/.gitignore
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore
rename to packages/e2e-tests/test-applications/nextjs-app-dir/.gitignore
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.npmrc b/packages/e2e-tests/test-applications/nextjs-app-dir/.npmrc
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/.npmrc
rename to packages/e2e-tests/test-applications/nextjs-app-dir/.npmrc
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx
new file mode 100644
index 000000000000..c1e3874f7ea8
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+export default function Error({ error, reset }: { error: Error; reset: () => void }) {
+ return (
+
+
Error (/client-component)
+
+ Error: {error.toString()}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx
new file mode 100644
index 000000000000..7b447d23cbf8
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx
@@ -0,0 +1,10 @@
+'use client';
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
Layout (/client-component)
+ {children}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx
new file mode 100644
index 000000000000..9b6cf994d322
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx
@@ -0,0 +1,7 @@
+export default function Loading() {
+ return (
+
+
Loading (/client-component)
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx
new file mode 100644
index 000000000000..deef8f3078b4
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx
@@ -0,0 +1,7 @@
+export default function NotFound() {
+ return (
+
+
Not found (/client-component)
;
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx
new file mode 100644
index 000000000000..64012f948278
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx
@@ -0,0 +1,12 @@
+'use client';
+
+import { ClientErrorDebugTools } from '../../components/client-error-debug-tools';
+
+export default function Page() {
+ return (
+
+
Page (/client-component)
+
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx
new file mode 100644
index 000000000000..8c52619b80b1
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+export default function Error({ error, reset }: { error: Error; reset: () => void }) {
+ return (
+
+
Error (/client-component/[...parameters])
+
+ Error: {error.toString()}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx
new file mode 100644
index 000000000000..a387722a8fcf
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx
@@ -0,0 +1,10 @@
+'use client';
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
Layout (/client-component/[...parameters])
+ {children}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx
new file mode 100644
index 000000000000..27a8d577240e
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx
@@ -0,0 +1,7 @@
+export default function Loading() {
+ return (
+
+
Loading (/client-component/parameter/[...parameters])
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx
new file mode 100644
index 000000000000..c56f5aa409f5
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx
@@ -0,0 +1,7 @@
+export default function NotFound() {
+ return (
+
+
Not found (/client-component/[...parameters])
;
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx
new file mode 100644
index 000000000000..31fa4ee21be5
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx
@@ -0,0 +1,15 @@
+import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';
+
+export default function Page({ params }: { params: Record }) {
+ return (
+
+
Page (/client-component/[...parameters])
+
Params: {JSON.stringify(params['parameters'])}
+
+
+ );
+}
+
+export async function generateStaticParams() {
+ return [{ parameters: ['foo', 'bar', 'baz'] }];
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx
new file mode 100644
index 000000000000..92948207a2fe
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+export default function Error({ error, reset }: { error: Error; reset: () => void }) {
+ return (
+
+
Error (/client-component/[parameter])
+
+ Error: {error.toString()}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx
new file mode 100644
index 000000000000..0d13dbc6bcac
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx
@@ -0,0 +1,10 @@
+'use client';
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
Layout (/client-component/[parameter])
+ {children}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx
new file mode 100644
index 000000000000..94ad013d3986
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx
@@ -0,0 +1,7 @@
+export default function Loading() {
+ return (
+
+
Loading (/client-component/[parameter])
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx
new file mode 100644
index 000000000000..48c215c930e2
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx
@@ -0,0 +1,7 @@
+export default function NotFound() {
+ return (
+
+
Not found (/client-component/[parameter])
;
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx
new file mode 100644
index 000000000000..2b9c28b922ac
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx
@@ -0,0 +1,15 @@
+import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';
+
+export default function Page({ params }: { params: Record }) {
+ return (
+
+
Page (/client-component/[parameter])
+
Parameter: {JSON.stringify(params['parameter'])}
+
+
+ );
+}
+
+export async function generateStaticParams() {
+ return [{ parameter: '42' }];
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx
new file mode 100644
index 000000000000..02a192259aec
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+export default function Error({ error, reset }: { error: Error; reset: () => void }) {
+ return (
+
+
Error (/)
+
+ Error: {error.toString()}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx
new file mode 100644
index 000000000000..35c4704735e7
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx
@@ -0,0 +1,38 @@
+import { TransactionContextProvider } from '../components/transaction-context';
+import Link from 'next/link';
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
+
+
Layout (/)
+
+ -
+ /
+
+ -
+ /client-component
+
+ -
+ /client-component/parameter/42
+
+ -
+ /client-component/parameter/foo/bar/baz
+
+ -
+ /server-component
+
+ -
+ /server-component/parameter/42
+
+ -
+ /server-component/parameter/foo/bar/baz
+
+
+
{children}
+
+
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx
new file mode 100644
index 000000000000..1c89093040e8
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx
@@ -0,0 +1,7 @@
+export default function Loading() {
+ return (
+
+
Loading (/)
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx
new file mode 100644
index 000000000000..5e7b156553a6
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx
@@ -0,0 +1,7 @@
+export default function NotFound() {
+ return (
+
+
Not found (/)
;
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx
new file mode 100644
index 000000000000..edaffa368ace
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx
@@ -0,0 +1,10 @@
+import { ClientErrorDebugTools } from '../components/client-error-debug-tools';
+
+export default function Page() {
+ return (
+
+
Page (/)
+
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx
new file mode 100644
index 000000000000..8c728017a4c9
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+export default function Error({ error, reset }: { error: Error; reset: () => void }) {
+ return (
+
+
Error (/server-component)
+
+ Error: {error.toString()}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx
new file mode 100644
index 000000000000..3e6a95d2bc49
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx
@@ -0,0 +1,8 @@
+export default async function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
Layout (/server-component)
+ {children}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx
new file mode 100644
index 000000000000..70deffd9dea6
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx
@@ -0,0 +1,7 @@
+export default async function Loading() {
+ return (
+
+
Loading (/server-component)
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx
new file mode 100644
index 000000000000..57b040b4210d
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx
@@ -0,0 +1,7 @@
+export default function NotFound() {
+ return (
+
+
Not found (/server-component)
;
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx
new file mode 100644
index 000000000000..d318ee23968d
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx
@@ -0,0 +1,12 @@
+import { ClientErrorDebugTools } from '../../components/client-error-debug-tools';
+
+export const dynamic = 'force-dynamic';
+
+export default function Page() {
+ return (
+
+
Page (/server-component)
+
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx
new file mode 100644
index 000000000000..44c78430b2aa
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+export default function Error({ error, reset }: { error: Error; reset: () => void }) {
+ return (
+
+
Error (/server-component/[...parameters])
+
+ Error: {error.toString()}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx
new file mode 100644
index 000000000000..b34d5a11488f
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx
@@ -0,0 +1,8 @@
+export default async function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
Layout (/server-component/[...parameters])
+ {children}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx
new file mode 100644
index 000000000000..f0fa262fa780
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx
@@ -0,0 +1,7 @@
+export default async function Loading() {
+ return (
+
+
Loading (/server-component/[...parameters])
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx
new file mode 100644
index 000000000000..30da42c88a17
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx
@@ -0,0 +1,7 @@
+export default function NotFound() {
+ return (
+
+
Not found (/server-component/[...parameters])
;
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx
new file mode 100644
index 000000000000..5d9d6c8262c5
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx
@@ -0,0 +1,13 @@
+import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';
+
+export const dynamic = 'force-dynamic';
+
+export default async function Page({ params }: { params: Record }) {
+ return (
+
+
Page (/server-component/[...parameters])
+
Params: {JSON.stringify(params['parameters'])}
+
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx
new file mode 100644
index 000000000000..37ba7515505f
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+export default function Error({ error, reset }: { error: Error; reset: () => void }) {
+ return (
+
+
Error (/server-component/[parameter])
+
+ Error: {error.toString()}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx
new file mode 100644
index 000000000000..013b62f15ff5
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx
@@ -0,0 +1,8 @@
+export default async function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
Layout (/server-component/[parameter])
+ {children}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx
new file mode 100644
index 000000000000..6fb1e6e9d479
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx
@@ -0,0 +1,7 @@
+export default async function Loading() {
+ return (
+
+
Loading (/server-component/[parameter])
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx
new file mode 100644
index 000000000000..9150cdeca2ad
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx
@@ -0,0 +1,7 @@
+export default function NotFound() {
+ return (
+
+
Not found (/server-component/[parameter])
;
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx
new file mode 100644
index 000000000000..f88fe1cd4a06
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx
@@ -0,0 +1,13 @@
+import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';
+
+export const dynamic = 'force-dynamic';
+
+export default async function Page({ params }: { params: Record }) {
+ return (
+
+
Page (/server-component/[parameter])
+
Parameter: {JSON.stringify(params['parameter'])}
+
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx
new file mode 100644
index 000000000000..4e7572a3fb3f
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx
@@ -0,0 +1,102 @@
+'use client';
+
+import { useContext, useState } from 'react';
+import { TransactionContext } from './transaction-context';
+import { captureException } from '@sentry/nextjs';
+
+export function ClientErrorDebugTools() {
+ const { transactionActive, toggle } = useContext(TransactionContext);
+
+ const [isFetchingAPIRoute, setIsFetchingAPIRoute] = useState();
+ const [isFetchingEdgeAPIRoute, setIsFetchingEdgeAPIRoute] = useState();
+ const [isFetchingExternalAPIRoute, setIsFetchingExternalAPIRoute] = useState();
+ const [renderError, setRenderError] = useState();
+
+ if (renderError) {
+ throw new Error('Render Error');
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx b/packages/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx
new file mode 100644
index 000000000000..82d14aaccced
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import { createContext, PropsWithChildren, useState } from 'react';
+import { Transaction } from '@sentry/types';
+import { startTransaction, getCurrentHub } from '@sentry/nextjs';
+
+export const TransactionContext = createContext<{ transactionActive: boolean; toggle: () => void }>({
+ transactionActive: false,
+ toggle: () => undefined,
+});
+
+export function TransactionContextProvider({ children }: PropsWithChildren) {
+ const [transaction, setTransaction] = useState(undefined);
+
+ return (
+ {
+ if (transaction) {
+ transaction.finish();
+ setTransaction(undefined);
+ } else {
+ const t = startTransaction({ name: 'Manual Transaction' });
+ getCurrentHub().getScope()?.setSpan(t);
+ setTransaction(t);
+ }
+ },
+ }}
+ >
+ {children}
+
+ );
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/globals.d.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/globals.d.ts
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/globals.d.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/globals.d.ts
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts
similarity index 75%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts
index 7aa8e8ef74e1..fd36f9494e2c 100644
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts
@@ -1,6 +1,6 @@
///
///
-///
+///
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/next.config.js b/packages/e2e-tests/test-applications/nextjs-app-dir/next.config.js
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/next.config.js
rename to packages/e2e-tests/test-applications/nextjs-app-dir/next.config.js
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json b/packages/e2e-tests/test-applications/nextjs-app-dir/package.json
similarity index 96%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json
rename to packages/e2e-tests/test-applications/nextjs-app-dir/package.json
index 8ed25dbf0b8c..7459a5d03b12 100644
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/package.json
@@ -16,7 +16,7 @@
"@types/node": "18.11.17",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
- "next": "13.2.1",
+ "next": "13.2.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts
new file mode 100644
index 000000000000..d8af89f2e9d5
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts
@@ -0,0 +1,3 @@
+export const config = { runtime: 'edge' };
+
+export default () => new Response('Hello world!');
diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts
new file mode 100644
index 000000000000..2ca75a33ba7e
--- /dev/null
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts
@@ -0,0 +1,9 @@
+import type { NextApiRequest, NextApiResponse } from 'next';
+
+type Data = {
+ name: string;
+};
+
+export default function handler(req: NextApiRequest, res: NextApiResponse) {
+ res.status(200).json({ name: 'John Doe' });
+}
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts
similarity index 97%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts
index 4e7a3cbd804d..ae466dab4350 100644
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts
@@ -27,8 +27,6 @@ const config: PlaywrightTestConfig = {
forbidOnly: !!process.env.CI,
/* `next dev` is incredibly buggy with the app dir */
retries: testEnv === 'development' ? 3 : 0,
- /* Opt out of parallel tests on CI. */
- workers: 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'list',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.edge.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.edge.config.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts
similarity index 100%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json b/packages/e2e-tests/test-applications/nextjs-app-dir/test-recipe.json
similarity index 85%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json
rename to packages/e2e-tests/test-applications/nextjs-app-dir/test-recipe.json
index d1fc9eafa240..097eee9daaf3 100644
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/test-recipe.json
@@ -17,6 +17,11 @@
"dependencyOverrides": {
"next": "latest"
}
+ },
+ {
+ "dependencyOverrides": {
+ "next": "canary"
+ }
}
]
}
diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/devErrorSymbolification.test.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts
similarity index 57%
rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/devErrorSymbolification.test.ts
rename to packages/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts
index 25e2b9d19067..654b9b0945b1 100644
--- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/devErrorSymbolification.test.ts
+++ b/packages/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts
@@ -8,28 +8,28 @@ test.describe('dev mode error symbolification', () => {
}
test('should have symbolicated dev errors', async ({ page }) => {
- await page.goto('/client-component');
+ await page.goto('/');
const errorEventPromise = waitForError('nextjs-13-app-dir', errorEvent => {
- return errorEvent?.exception?.values?.[0]?.value === 'client-component-button-click-error';
+ return errorEvent?.exception?.values?.[0]?.value === 'Click Error';
});
- await page.locator('id=exception-button').click();
+ await page.getByText('Throw error').click();
const errorEvent = await errorEventPromise;
const errorEventFrames = errorEvent.exception?.values?.[0]?.stacktrace?.frames;
expect(errorEventFrames?.[errorEventFrames?.length - 1]).toEqual(
expect.objectContaining({
- filename: 'app/client-component/page.tsx',
- abs_path: 'webpack-internal:///(app-client)/./app/client-component/page.tsx',
+ filename: 'components/client-error-debug-tools.tsx',
+ abs_path: 'webpack-internal:///(app-client)/./components/client-error-debug-tools.tsx',
function: 'onClick',
in_app: true,
- lineno: 10,
+ lineno: 32,
colno: 16,
- pre_context: [' id="exception-button"', ' onClick={() => {'],
- context_line: " throw new Error('client-component-button-click-error');",
- post_context: [' }}', ' >', ' throw'],
+ post_context: [' }}', ' >', ' Throw error'],
+ context_line: " throw new Error('Click Error');",
+ pre_context: ['