You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The crash happens under the following circumstances:
There is a Next.js catch all page route, like pages/[...catchAll].js
The Next.js server is started with dd-trace running, like this NODE_OPTIONS='--require ./datadog' next start and datadog.js has this content: require('dd-trace').init(). This applies to any version of dd-trace between 1.2.0 and the latest 2.3.1.
There is a request to an api route with an invalid URI /api/%ff.
It produces the following stack trace from Next.js
./node_modules/next/dist/shared/lib/router/utils/route-matcher.js:18
throw new _utils.DecodeError('failed to decode param');
^
DecodeError: failed to decode param
at decode (./node_modules/next/dist/shared/lib/router/utils/route-matcher.js:18:23)
at ./node_modules/next/dist/shared/lib/router/utils/route-matcher.js:26:80
at Array.map (<anonymous>)
at ./node_modules/next/dist/shared/lib/router/utils/route-matcher.js:26:67
at Array.forEach (<anonymous>)
at Object.match (./node_modules/next/dist/shared/lib/router/utils/route-matcher.js:22:29)
at NextNodeServer.handleApiRequest (./node_modules/next/dist/server/base-server.js:538:39)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
I don't know whether the actual error is in next.js or in dd-trace, but they are both black boxes to me and I only get a stack trace containing next.js code. I have cross posted this in the Next.js repo: vercel/next.js#35132
Describe the bug
The crash happens under the following circumstances:
pages/[...catchAll].js
NODE_OPTIONS='--require ./datadog' next start
anddatadog.js
has this content:require('dd-trace').init()
. This applies to any version of dd-trace between 1.2.0 and the latest 2.3.1./api/%ff
.It produces the following stack trace from Next.js
I don't know whether the actual error is in next.js or in dd-trace, but they are both black boxes to me and I only get a stack trace containing next.js code. I have cross posted this in the Next.js repo: vercel/next.js#35132
Environment
To reproduce
yarn build
yarn start
The text was updated successfully, but these errors were encountered: