Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

middleware assets are not supported #2697

Open
pieh opened this issue Oct 24, 2024 · 0 comments
Open

middleware assets are not supported #2697

pieh opened this issue Oct 24, 2024 · 0 comments
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests

Comments

@pieh
Copy link
Contributor

pieh commented Oct 24, 2024

https://github.com/vercel/next.js/blob/dc1901a2c2184c66247eae7e1e5ea2b0cc9629aa/test/e2e/og-api/index.test.ts#L46-L52 tests if next/og is working in middleware. It relies on bundling assets and not just wasm - to illustrate here's excerpt from prerender-manifest.json generated for test fixture used in above test:

{
  "middleware": {
    "/": {
      "files": [
        "server/edge-runtime-webpack.js",
        "server/middleware.js"
      ],
      "name": "middleware",
      "page": "/",
      "matchers": [
        {
          "regexp": "^/.*$",
          "originalSource": "/:path*"
        }
      ],
      "wasm": [
        {
          "name": "wasm_77d9faebf7af9e421806970ce10a58e9d83116d7",
          "filePath": "server/edge-chunks/wasm_77d9faebf7af9e421806970ce10a58e9d83116d7.wasm"
        },
        {
          "name": "wasm_ef4866ecae192fd87727067cf2c0c0cf9fb8b020",
          "filePath": "server/edge-chunks/wasm_ef4866ecae192fd87727067cf2c0c0cf9fb8b020.wasm"
        }
      ],
      "assets": [
        {
          "name": "noto-sans-v27-latin-regular.5dda3fca77107598.ttf",
          "filePath": "server/edge-chunks/asset_noto-sans-v27-latin-regular.5dda3fca77107598.ttf"
        }
      ]
    }
  }
}

We are bundling wasm part, but currently assets is not handled and result in "blob fetch" error when next/og attempt to load font to render the image

Data
The following is parsed automatically by the Next.js repo e2e test report generator.

test: test/e2e/og-api/index.test.ts
reason: middleware assets are not supported

@pieh pieh added the Next.js e2e test failure Errors identified through the Next.js repo e2e tests label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests
Projects
None yet
Development

No branches or pull requests

1 participant