Persistent 500 Internal Server Error

I’m experiencing a persistent 500 Internal Server Error with the following message:

Error fetching invite: TypeError: Failed to parse URL from /pipeline

I’ve thoroughly investigated and confirmed:

There’s no explicit reference to /pipeline in my project’s code, dependencies, middleware, or configurations.

Middleware is minimal and doesn’t mention /pipeline.

Google Analytics and Tag Manager have been completely removed, ruling out external script issues.

All CSP headers and environmental variables are properly configured.

The error trace clearly originates from within Next.js internals (undici, OpenTelemetry tracing, and internal app-route runtime), not my custom logic.

Full error excerpt from Vercel logs:

TypeError: Invalid URL
    at new URL (node:internal/url:818:25)
    at new Request (node:internal/deps/undici/undici:9586:25)
    at /var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:30289
    at N (/var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:35398)
    at ProxyTracer.startActiveSpan (/var/task/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js:36:24)

Could you please investigate if this issue relates to an internal Vercel configuration, feature, or Next.js runtime behavior? Let me know if you need additional details or access.

Thanks for your help!

Are you using Upstash Redis by any chance? They use a /pipeline endpoint like that, which could be causing the error you’re seeing if your redis URL is undefined

You can get that same error by running new URL('/pipeline') in Next.js, so theoretically if Upstash has some code like new URL(process.env.UPSTASH_REDIS_REST_URL + '/pipeline') without the environment variable set then that could cause this

In that case you would just need to make sure the environment variable is set to fix it

If that’s not it, it’s going to be something else that’s getting traced with OTel, so you might be able to find hints either in your telemetry configuration or by seeing what traces appear in the dashboard

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.