Skip to content

Standalon server output error: TypeErrorL Cannot convert argument to ad ByteString ... #78137

@yuan1238y

Description

@yuan1238y

Link to the code that reproduces this issue

https://github.com/yuan1238y/my-minimal-nextjs-issue-reproduction

To Reproduce

  1. Build and start. npm run build && npm run start
  2. Open browser to url.

Current vs. Expected behavior

Current:

node .next/standalone/server.js Output:

[TypeError: Cannot convert argument to a ByteString because the character at index 258 has a value of 24341 which is greater than 255.] {
  digest: '3623562099'
}

Expected behavior:

No error output.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024
  Available memory (MB): 7804
  Available CPU cores: 12
Binaries:
  Node: 20.18.3
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.3.0 // Latest available version is detected (15.3.0).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

Output

Which stage(s) are affected? (Select all that apply)

next start (local)

Additional context

I suspect this issue might occur when adding <link rel="preload" as="image" /> during build time, where Unicode characters aren't being handled properly.
If an image doesn't meet the conditions for preload, it won't be added to <head> and won't cause error output.
I also noticed that no matter how many images with Unicode characters exist on the page, the error is only output once per visit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    OutputRelated to the the output configuration option.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions