I am getting 500 error on my next js application without changing any code

SIte ID: 9a53a75a-845d-4d68-89fc-a37541fe92ba

The site stopped working. It was working with “@netlify/plugin-nextjs”: “^4.36.1”,
upgrading to 4.38.1 doesn’t help

I simplified my middleware to the following code:

import { NextRequest, NextResponse } from "next/server";

export default async function middleware(req: NextRequest) {
    console.log("req", req);
    return NextResponse.next();
}

It doesn’t work. I receive HTTP ERROR 500
If I remove middleware I receive 200

Have you checked edge functions log? If middleware is not working there could be some error messages

Yes, I checked. Unfortunately no logs there

Initially, my next.js version was 13.3.0. Upgrading to 13.4.7 doesn’t help

I tried to redeploy to the different site
SiteID: f10ccb28-5cce-4431-82a8-d64404b28d1c
The same issue. 500 error with a simple middleware

next js 13.4.7
Next.js Runtime - v4.38.1