Skip to content

userAgent device.type is undefined for Macos Apple silicon devices #87236

@Milad1412

Description

@Milad1412

Link to the code that reproduces this issue

https://github.com/Milad1412/reproduce_device_detection_issue

To Reproduce

  1. On a MacOs device start application in either production or dev mode
  2. see the log and you find the issue that device.type is undefined in the console log of server's terminal

Current vs. Expected behavior

I expect to see a valid value for type of device, while I see undefined on Mac.

Provide environment information

Operating System: MacOs 26.1
Browser: Chrome, Safari
pnpm: 10.18.3
node: 22.19.0

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

Middleware

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

next dev (local), next build (local), next start (local)

Additional context

No response

Metadata

Metadata

Assignees

Labels

MiddlewareRelated to Next.js Middleware.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions